Pagination

Pagination and sorting for public list endpoints

Public list endpoints whose paths end in /paginated use the same offset-based pagination contract.

/paginated endpoints are transitional. In API v1, the base paths will return paginated responses and the /paginated suffix will be removed.

The older non-paginated list endpoints (the same paths without the /paginated suffix) remain available but are deprecated; each endpoint page documents them below its paginated counterpart.

Query Parameters

ParameterTypeDescriptionDefaultExample
offsetintegerNumber of matching items to skip.0offset=100
limitintegerMaximum number of matching items to return. Accepted range: 0–1,000. A value of 0 returns only the total count.100limit=500
sortFieldstringField used to order the results. The accepted fields depend on the endpoint.Endpoint-specificsortField=title
sortOrderstringDirection used for sortField: asc or desc.Endpoint-specificsortOrder=asc

Each endpoint documents its accepted sort fields and default order. Results also include a stable tie-breaker so repeated requests use a deterministic order.

Response

{
  total: number // Number of matching items across all pages
  offset: number // Offset applied to this response
  limit: number // Limit applied to this response
  data: Array<Item> // Items in this page
}

To request the next page, increase offset by the number of items in data. Pagination is complete when offset + data.length is greater than or equal to total.

# First page
curl -H "Authorization: ApiKey your.api.key.here" \
  "https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/tcase/paginated?offset=0&limit=100"

# Next page
curl -H "Authorization: ApiKey your.api.key.here" \
  "https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/tcase/paginated?offset=100&limit=100"