Skip to content

Pagination

"List all" endpoints typically return a paginated list object, which contains the following properties:

json
{
    "object": "paginated_list",
    "data": [...],
    "total": 2,
    "count": 2,
    "limit": 25,
    "current_page": 1,
    "total_pages": 1,
    "links": null
}

Each paginated request will contain the following information:

FieldDescription
objectThe paginated list object identifier (paginated_list).
dataAn array of objects of the resource being listed.
totalThe total number of results available for the resource being listed including any applied filters.
countThe number of results present in the response.
limitThe largest number of results that can be present in the response. See increase page limit.
current_pageThe current page of results.
total_pagesThe total number of pages of results.
linksLinks to the next and previous pages of results. See page links.

Where there are two or more pages of results, the pagination object's links property contains links to the next and previous pages of results as you paginate through results:

json
{
  "links": {
      "next": "https://id.amiqus.co/api/v2/clients?page=3",
      "previous": "https://id.amiqus.co/api/v2/clients?page=2"
  }
}

Any query parameters present on the current request are also applied to page links, making it easy to navigate between results. When there is only one page of results, links is null.

Increase page limit

The number of results per page can be increased or decreased using the limit query parameter. All endpoints have minimum and maximum page limits, which by default are 1..100. Some endpoints may have different limits.

Example paging query parameters:

https://id.amiqus.co/api/v2/clients?limit=1
https://id.amiqus.co/api/v2/clients?limit=100&page=2