Filtering
Filtering, pagination and sorting is done with query string parameters.
Available query parameters
Parameter | Description | Format |
---|---|---|
page | Which page to get. | page=1 |
limit | How many items to get per page. | limit=100 |
filter | Result filtering. | filter=status:eq:open,name:like:john |
search | Full text search across multiple fields, where available. | search=john |
sort | Which field and direction to sort the results. | sort=created_at:desc,name:asc |
Available operators
Operator | Description | Example |
---|---|---|
eq | Equals (one) | status:eq:active |
eq | Equals (at least one of multiple) | status:eq:active|pending |
gt | Greater than | created_at:gt:2018-01-01 |
gte | Greater than or equal to | amount:gte:50.00 |
lt | Less than | created_at:lt:2018-01-01 |
lte | Less than or equal to | amount:lte:50.00 |
like | Partial text search | name:like:john |
Example
?filter=status:eq:open|closed,created_at:lt:2018-01-01,name:like:john&sort=name:asc
Updated about 2 years ago