Pagination

Pagination

Written by James Chan
Last update: Monday, Jun 21, 2021

Most API endpoints returning multiple objects (lists) support pagination. These lists share a common structure and can take at least these two parameters:

ParameterDescriptionlimita limit on the number of objects to be returned. Between 1 and 50. Optional, default: 30skipa.k.a. offset - the number of items to skip. Optional, default: 0 (i.e. return the first page of results)

List response format:

{
    items: [
        { ... },
        { ... },
        { ... }
    ],
    totalCount: 10,
    limit: 25,
    skip: 0
}

Attribute and Description

  1. items: an array containing the actual response elements, paginated by any request parameters.

  2. totalCount: the total size of the result set, i.e. all available elements in the list request without any pagination

  3. limit: the currently used limit

  4. skip: current offset in the list

Website API

5 articles in this category.
Written by James Chan.