Skip to content

Filtering and paginating

The listing of entities can be filtered, sorted and paginated with a set of lightweight HTTP parameters (AFS1).

Filtering

Filtering can be done with where parameters. They are cumulative. Some examples :

  • api.check-position.com/monitors?where[id]=1
  • api.check-position.com/url-monitors?where[url][like]=%website.com%&where[id][<]=10
  • api.check-position.com/checks?where[id][in]=1,2,3

More examples

Ordering

The order_by parameter can do a simple or multiple sort based on the entity fields given. Some examples :

  • api.check-position.com/monitors?order_by[id]=desc
  • api.check-position.com/checks?order_by[id]=asc&order_by[domain]=desc

More examples

Pagination

Pagination is done with limit and offset parameters. Some examples :

  • api.check-position.com/monitors?limit=10 (fist page of 10 results)
  • api.check-position.com/monitors?limit=10&offset=10 (second page of 10 results)

More examples