Typeship toolsAPI

Pagination

List endpoints page with a cursor. Ask for a limit, follow next_cursor until it is null.

List endpoints on the Typeship API return one page at a time and a cursor for the next:

curl -s "https://typeship.dev/api/v1/projects?limit=20" \
  -H "Authorization: Bearer ak_..."
{
  "data": [ { "id": "prj_...", "object": "project", "...": "..." } ],
  "next_cursor": "eyJ2IjoxLCJhdCI6IjIwMjYtMDgtMThUMTI6MDA6MDAuMDAwWiIsLi4u"
}

Pass next_cursor back as cursor for the following page. When next_cursor is null, you have everything.

ParameterMeaning
limitItems per page, from 1 to 100. Omit for 20.
cursorThe opaque next_cursor from the previous page. Omit for the first page.

Send limit as base-10 digits, for example limit=50. Empty values, fractions, signs, whitespace, nonnumeric text, and values outside 1–100 return 400 input_invalid. Leading zeroes are accepted. An empty or malformed cursor returns 400 cursor_invalid; start again from the first page.

Each query parameter may appear only once, even when repeated values match. List endpoints reject repeated or unrecognized parameters with 400 query_param_invalid, so a misspelled filter cannot silently return an unfiltered list. Use only parameters documented for that operation; new filters are introduced explicitly. The Generation list also accepts target_id to select one Target's Generations.

Results are newest first, with the stable resource ID breaking timestamp ties. Cursors are scoped to the Organization, operation, filters, and ordering that created them. Reusing one with another Organization, endpoint, parent resource, or filter also returns 400 cursor_invalid. You may change limit between pages. Inserts or deletes before the cursor do not shift the next page.

Paginated operations: GET /api/v1/projects, GET /api/v1/targets, GET /api/v1/releases, GET /api/v1/deliveries, GET /api/v1/generations, GET /api/v1/spec-revisions, and GET /api/v1/api-keys. Each list declares its filters, such as project_id or target_id; a filter naming a resource outside your organization returns 404 not_found.

In the Typeship SDK

Paginated methods return a PagePromise. Iterate it to walk every item, or await it for one page:

for await (const project of client.projects.list()) {
  console.log(project.name);
}

const page = await client.projects.list({ limit: 50 });
page.items;
page.hasNextPage();
await page.getNextPage();

In the Typeship CLI

--all walks every page and prints one item per line:

typeship projects list --all | jq -r '.id'
typeship targets list --project-id prj_... --all | jq -r '.id'
typeship releases list --target-id tgt_... --all | jq -r '.id'

On this page