Pagination
Every list endpoint returns the same envelope and uses opaque, cursor-based paging. You request a page size with limit, and follow next_cursor until the API tells you there's nothing more. Cursors are encrypted tokens tied to the exact query that produced them.
The list envelope
- Name
object- Type
- string
- Description
Always
list.
- Name
data- Type
- array
- Description
The page of resources, newest-first unless the endpoint documents otherwise.
- Name
has_more- Type
- boolean
- Description
Whether more pages exist. Stop walking when this is
false.
- Name
next_cursor- Type
- string
- Description
Pass this back as
cursorto fetch the next page.nullon the last page.
- Name
url- Type
- string
- Description
The path this list was fetched from.
Response
{
"object": "list",
"data": [
{ "object": "template", "id": "template_00a1b2c3d4e5f607" }
// ...
],
"has_more": true,
"next_cursor": "hf8a2c1b9d0e...",
"url": "/v1/templates"
}
Request parameters
- Name
limit- Type
- integer
- Description
Page size,
1–100(default10). Some endpoints have a fixed size and ignore this: audit events page at 25, Lab runs at 50.
- Name
cursor- Type
- string
- Description
The previous response's
next_cursor, passed back verbatim.
Walking a collection
Fetch the first page, then keep passing next_cursor back as cursor until has_more is false.
# First page
curl -s -G https://api.synexcloud.com/v1/templates \
-H "Authorization: Bearer $SYNEX_API_KEY" \
-d limit=50
# Next page
curl -s -G https://api.synexcloud.com/v1/templates \
-H "Authorization: Bearer $SYNEX_API_KEY" \
-d limit=50 \
-d cursor=hf8a2c1b9d0e...
Cursor rules
Cursors are opaque, encrypted tokens. Treat them as a black box — you only
ever read next_cursor and pass it straight back as cursor.
- Never construct or modify a cursor. A malformed or tampered cursor returns
400invalid_cursor. - Don't persist cursors long-term. To resume later, restart from the first page.
- Cursors are tied to their query. Changing filters, ordering, or
limitmid-walk invalidates the cursor — start a fresh walk instead.