Pagination
How It Works
Field
Type
Description
Request Parameters
Parameter
Type
Required
Default
Description
Paginating Forward
# Step 1 — First request, no cursor needed
curl -X GET "https://api.occuspace.io/v2/locations?limit=3" \
-H "Authorization: Bearer YOUR_API_TOKEN"
# Response pagination object:
# {
# "has_more": true,
# "next_cursor": "eyJsb2NhdGlvbl9pZCI6MTU2MX0",
# "prev_cursor": null
# }
# Step 2 — Pass next_cursor to fetch the next page
curl -X GET "https://api.occuspace.io/v2/locations?limit=3&cursor=eyJsb2NhdGlvbl9pZCI6MTU2MX0" \
-H "Authorization: Bearer YOUR_API_TOKEN"
# Response pagination object:
# {
# "has_more": true,
# "next_cursor": "eyJsb2NhdGlvbl9pZCI6MTU2NH0",
# "prev_cursor": "eyJsb2NhdGlvbl9pZCI6MTU1OX0"
# }
# Step 3 — Continue until has_more is false
curl -X GET "https://api.occuspace.io/v2/locations?limit=3&cursor=eyJsb2NhdGlvbl9pZCI6MTU2NH0" \
-H "Authorization: Bearer YOUR_API_TOKEN"
# Response pagination object:
# {
# "has_more": false,
# "next_cursor": null,
# "prev_cursor": "eyJsb2NhdGlvbl9pZCI6MTU2MX0"
# }Paginating Backward
Pagination With Metric Endpoints
Pagination With Child Locations
Last updated