Pagination
Most lists return everything in one response; test runs page with a cursor, secret versions with before, and two lists are capped.
Most list endpoints return every matching object in one response, in a fixed order. Two lists page,
each in its own way, and two return only the newest items. There is no shared limit parameter.
Lists that page
| List | Page size | How to get the next page |
|---|---|---|
| List test runs | 50 runs, newest first | Send the response's nextCursor as cursor. nextCursor is null on the last page |
| List a secret's versions | 100 versions, newest first | Send the oldest version you have as before. A page with fewer than 100 versions is the last |
Test runs, page by page. The response below is trimmed to the fields that matter here:
curl "https://api.clankertest.com/v1/workspaces/acme/test-runs?product=storefront" \ -H "Authorization: Bearer $CLANKER_API_KEY"
{ "runs": [{ "number": 1289, "state": "finished", "result": "passed" }], "nextCursor": 1240 }
curl "https://api.clankertest.com/v1/workspaces/acme/test-runs?product=storefront&cursor=1240" \ -H "Authorization: Bearer $CLANKER_API_KEY"
The cursor is a run number: the next page holds the runs numbered below it, so runs published while
you page do not shift the pages you have not read yet. Keep the same filters, such as product,
result or commit, on every page.
A secret's history in one environment:
curl "https://api.clankertest.com/v1/workspaces/acme/products/storefront/secrets/DATABASE_URL/environments/staging/versions?before=101" \ -H "Authorization: Bearer $CLANKER_API_KEY"
The CLI takes the same parameter:
clanker vault secret history --product storefront --env staging --name DATABASE_URL --before 101.
Lists that return the newest only
| List | Returns |
|---|---|
| List events | The workspace's 50 most recent events, newest first |
| List notifications | Your 100 newest notifications, newest first |
Neither takes a cursor; older items are not available through the API.
Lists that return everything
Every other list returns all matching objects at once. Narrow them with their filters instead of paging:
| List | Filters | Order |
|---|---|---|
| List tickets | team, project, owner, category | Status category, then status position, then rank |
| List projects | team, product, archived | Priority order |
| List teams | archived | Name |
| List products, environments | archived | Name |
| List deployments | product, environment, archived | Product name, then environment name |
| List ticket statuses, tags | team | Board order; tags by name |
| List agents | person | Member's name, then client |
| List members | None | Name |
| Views, comments, a ticket's messages, invites, keys and secrets | None | Each endpoint says |
Ticket lists leave out plans; Get a ticket returns one ticket with its plan.
Not pagination
before and after on Reorder a ticket,
Reorder a project and Reorder a ticket status
name a position to move to, not a page.