-
Notifications
You must be signed in to change notification settings - Fork 7
vtiffenberg edited this page Sep 8, 2014
·
2 revisions
- /api/collections/:id.json
- /api/collections/:id.rss
Any combination of the given parameters is possible:
-
page
: a number indicating which page to return. The first page is 1. 50 results are returned per page. -
group
: returns sites that are included in a group, given its id -
updated_since
: returns sites that were updated since the given date. For example: ?updated_since=2012-03-29 -
search
: returns sites that match the given search. Search is performed on the name, property values and labels associated to those.
Any other query parameter filters sites by that property. For example, issuing ?beds=10
will return sites whose 'beds' property equals 10.
If you need to filter by a property whose code has one of the query parameters mentioned above, you can prefix it with an @
symbol. For example: ?@page=3
Filtering by property allows you to perform more powerful conditions. For example:
-
?beds=>10
: filters by the property 'beds' greater than 10 -
?beds=>=10
: filters by the property 'beds' greater or equal to 10 -
?beds=<10
: filters by the property 'beds' less than 10 -
?beds=<=10
: filters by the property 'beds' less than or equal to 10
That is, prefixing the value with a comparison operator filters by that operator.
Any query parameter that is not a field code in the collection results in an HTTP 400 Bad Request.
- /api/sites/:id.json
- /api/sites/:id.rss