Pagination

All API endpoints that return a list of elements support pagination. For those endpoints a limit URL query parameter is used to specify number of elements per page.

Examples

Request
$ http GET 'https://api.gettactic.com/organizations?limit=2' 'Authorization: Bearer ACCESS_TOKEN'
Response
HTTP/1.1 200 OK
{
"cursor": "orgz_56ce2a2e-0864-411c-a4db-60ca221fd3f4",
"elements": [
{
"id": "orgz_3dafefbf-e3a5-4bf5-9f00-4cc8586a66c5",
"name": "Test Org 3"
},
{
"id": "orgz_56ce2a2e-0864-411c-a4db-60ca221fd3f4",
"name": "Test Org 2"
}
]
}

Use the returned cursor to continue pagination by specifying it as cursor_after. If you want to consume all elements, you continue to do so until cursor is null which also means the list is empty:

Request
$ http GET 'https://api.gettactic.com/organizations?limit=2&cursor_after=orgz_56ce2a2e-0864-411c-a4db-60ca221fd3f4' 'Authorization: Bearer ACCESS_TOKEN'
HTTP/1.1 200 OK
{
"cursor": "orgz_64010772-1522-4c37-83ca-219ae906d843",
"elements": [
{
"id": "orgz_64010772-1522-4c37-83ca-219ae906d843",
"name": "Test Org"
}
]
}
Was this page helpful?