Skip to main content

Pagination and sorting

Pagination

By default, collection endpoints with filters and pagination support return only the first 100 items, which means that only 100 items are displayed. To get a different set of items, use the offset and and limit parameters in the query string; limit should not exceed that of server limit.

For example:

GET /v5/Users returns users 1-100
GET /v5/Users/?limit=50 returns users 1-50
GET /v5/Users/?offset=20&limit=30 returns users 21-50
GET /v5/Users/?offset=40 returns users 41-140

Use the “paging” section of the JSON response to get the total number of items in the totalItemCount parameter, then send subsequent requests with increasing offsets and a fixed limit until you get all the data.

For example if your first request is …/Users?offset=0&limit=25, and the response includes totalItemCount: 100, continue with the calls:

…/Users?offset=25&limit=25
…/Users?offset=50&limit=25
…/Users?offset=75&limit=25

Nested/embedded collections are not paged.

Sorting

Sorting of data must support multiple-field based sorting of resources with an optional direction via the orderby parameter. For example:

GET v5/milestones?orderby=name asc,description desc