Pagination

Most of the endpoints of the API returning a large number of resources are paginated. For example, you can list macros, List all rules, etc... These API endpoints share common request parameters and response structures.

Cursor-based pagination

Cursor-based pagination provides lower latency when listing resources. It replaced previous offset-based pagination.

Request parameters:

ParameterTypeDescription
cursorstring (Optional)Value indicating your position in the list of resources. If omitted, the first resources of the list will be returned. E.g: WyJuZXh0IiwgMjksIDkyOV0=.
limitinteger (Optional)Maximum number of resources to return. E.g: 20. Defaults to 30
order_bystring (Optional)Attribute used to order resources. E.g: created_datetime:desc

Response attributes:

AttributeTypeDescription
datalistA list of resources. E.g: a list of tickets.
objectstringThe type of the data contained in the data attribute. E.g: list.
uristringThe URL to access the resources requested. E.g: /api/macros
meta.prev_cursorstring (Optional)Cursor to use to fetch the previous resources in the list. E.g: WyJwcmV2IiwgMjksIDkyOV0=
meta. next_cursorstring (Optional)Cursor to use to fetch the next resources in the list. E.g: WyJuZXh0IiwgMjksIDkyOV0=

Response example

{
    "data": [...]
    "object": "list",
    "uri": "/api/macros",
    "meta": {
        "prev_cursor": null,
        "next_cursor": "WyJuZXh0IiwgMjksIDkyOV0="
    }
}