This article does not apply to iXpole Api version 1.0

In this article you will learn all about filtering, sorting and pagination in API calls

Let's get you started

When you are consuming our API, you need filtering, sorting and pagination to get the records you want.

  1. Filtering
  2. Sorting
  3. Pagination

Filtering

When you are using iXpole API version 2.0, you can retrieve objects using the GET api/{object} endpoint. (eg GET api/contacts). The endpoint will always return an array of objects, even if the result would be just 1 object. You can filter the objects by adding the fields you wish to use as filter in the query string.

GET api/contacts?firstName=joeri
You can combine multiple fields in 1 filters

GET api/contacts?firstName=joeri&lastName=vlemmings

You can go to the API documentation and navigate to the object in question. There you can see a list of fields which can be used for filtering.


Empty values If you would like to filter on an empty value (null or ''), you can do so by setting the filter value to 'empty'.

GET api/contacts?ssoid=empty


Sorting

When you need to apply sorting, you can also do this using the query string.

GET api/contacts?sort=firstName

By default, the sort direction is ascending. You can make the sorting descending by applying following sorting technique. The field and the direction should be seperated by a double-point

GET api/contacts?sort=firstName:desc

Pagination

The iXpole API allways limits the number of records which will be returned to 100. You can use the page option to get the next set of records.

GET api/contacts?page=2

If you don't provide a page number in the request, we will show you the first page


Note

You can combine all types of query parameters in 1 single request

GET api/contacts?ticketRole=A&sort=firstName&page=2