Pagination
Retrieve complete collections with bounded pages and opaque cursors.
Projects, services, variables, and deployments support cursor pagination. Request an explicit limit and continue using the returned cursor until the collection ends.
Request a page
curl --fail-with-body \
--header "Authorization: Bearer $OPENSTEAD_API_KEY" \
"https://api.openstead.tech/api/v1/workspaces/$OPENSTEAD_WORKSPACE_ID/projects?limit=100"{
"projects": [],
"page": {
"limit": 100,
"nextCursor": null,
"hasMore": false
}
}The example represents an empty final page. When hasMore is true, nextCursor contains an opaque continuation token.
Continue the same collection
Set CURSOR to the exact page.nextCursor returned by the preceding request.
curl --fail-with-body --get \
--header "Authorization: Bearer $OPENSTEAD_API_KEY" \
--data-urlencode "limit=100" \
--data-urlencode "cursor=$CURSOR" \
"https://api.openstead.tech/api/v1/workspaces/$OPENSTEAD_WORKSPACE_ID/projects"Keep the caller, workspace, path, and filters the same. URL-encode the token; do not decode, edit, or manufacture it. An incompatible cursor returns 400 invalid_cursor.
Limits and ordering
| Collection | Without pagination parameters | With limit or cursor |
|---|---|---|
| Projects | Complete legacy list; no page field | Default 100; maximum 200 |
| Services | Complete legacy list, including archived entries | Default 100; maximum 200 |
| Service variables | Complete masked metadata list | Default 100; maximum 200 |
| Deployments | Up to 100 records with page metadata | Maximum 200 |
Limits must be integers from 1 to 200. Paginated results are ordered by creation time descending, then ID descending. Pagination is not a frozen snapshot: new records created after the first page may need a fresh listing.
Use an SDK iterator
import os
from openstead import Openstead
with Openstead() as client:
for service in client.services.iter(
workspace_id=os.environ["OPENSTEAD_WORKSPACE_ID"],
limit=100,
):
print(service.id, service.name)import Openstead from '@layerrail/openstead';
const client = new Openstead();
for await (const service of client.services.iterate({
workspaceId: process.env.OPENSTEAD_WORKSPACE_ID!,
})) {
console.log(service.id, service.name);
}SDK iterators follow bounded pages and detect non-advancing cursors. A plain list() returns a single API response.
Logs use a separate cursor
Log readers use numeric after and cursor values, with a maximum limit of 500. Do not send a collection's opaque cursor to a log endpoint.