Skip to main content
GET
Rate limit tier: general, 600 requests/min. See Rate limits. Returns the runs of every workflow in your organization that reached a terminal status (processed, error or cancelled) at or after ended_after, oldest ending first. Use it when you start many runs and want to know which finished without asking about each one: one poll covers every run in flight, whatever workflow it belongs to. Follow next_cursor until it is null. See Pagination. Each item is slim: id, workflow_id, document_packet_id, status and ended_at. For the results envelope, fetch GET /v3/runs/{run_id}/.

Polling

Runs do not end in the order they started, so poll by time, not by run id:
  1. Keep the latest ended_at you have seen.
  2. Every minute or two, ask with ended_after set to a couple of minutes before it. A run’s ended_at is stamped just before its ending commits, so a run can appear slightly later than its ended_at says.
  3. Skip the runs you already handled, keyed on id. The overlap makes some runs appear in two polls.
Webhooks push the same endings as they happen; a poll is the way to catch any delivery a webhook missed.

Authorizations

Authorization
string
header
required

API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.

Query Parameters

ended_after
string<date-time>
required

Include only runs that ended at or after this ISO 8601 datetime (inclusive). A run's ended_at is stamped just before its ending commits, so a poller asks again from a couple of minutes before the last ended_at it saw and skips the runs it already has.

limit
integer
default:100

Page size, capped at 500.

Required range: 1 <= x <= 500
cursor
string | null

Opaque token from a previous response's next_cursor.

Response

Successful Response

One keyset page of ended runs, in (ended_at, id) order: oldest ending first.

items
EndedRunV3 · object[]
required

Runs on this page, in the order they ended.

next_cursor
string | null

Opaque token to fetch the next page; pass it back as ?cursor=. null on the last page.