Docs
Dashboard
API reference / BasicsBeta

Pagination

Page through any list with limit and after, until next is null.

Every list works the same way. Ask for a page with limit, and you get { data, next }. next is a cursor: pass it back as after to get the following page. When next is null, you have them all.

Page through a list

curl "https://api.boxline.dev/v1/agent/runs?limit=50" \  -H "x-api-key: $BOXLINE_API_KEY"# {"data": [...], "next": "eyJvIjoiY3JlYXRlZF9kZXNjIiwidCI6…"}curl "https://api.boxline.dev/v1/agent/runs?limit=50&after=eyJvIjoiY3JlYXRlZF9kZXNjIiwidCI6…" \  -H "x-api-key: $BOXLINE_API_KEY"

Rules

  • next is opaque: do not build or change it. Send it back with the same filters and sort as the page it came from. A cursor from another list, or changed, gets 400 invalid_cursor.
  • New items do not shift the pages you are reading, as offsets would.
  • Lists that return total (sessions, profiles) still do. There is no offset: a list takes after only, and offset is 400 invalid_request.
  • The session event log also returns nextAfter, the last event’s number. Keep it to poll for new events later: there, next becomes null once you have caught up.

Every list

Listlimit default / maximumOrder
GET /v1/sessions50 / 500The sort you ask for (newest first by default)
GET /v1/profiles50 / 200Newest first
GET /v1/credentials100 / 200Name order
GET /v1/credentials/audit50 / 200Newest first
GET /v1/extensions50 / 200Newest first
GET /v1/project/api-keys100 / 100Oldest first
GET /v1/agent/runs20 / 100Newest first
GET /v1/tasks50 / 200Newest first
GET /v1/tasks/:id/runs20 / 100Newest first
GET /v1/crawls20 / 100Newest first
GET /v1/crawls/:id (the crawl's pages; limit=0 for none)50 / 100The order pages were found
GET /v1/sessions/:id/events500 / 2000Oldest first
GET /v1/sessions/:id/pages1000 / 1000First visit
GET /v1/webhooks100 / 200Oldest first
GET /v1/webhooks/:id/deliveries20 / 100Newest first

In the SDKs

Every list method of the SDKs takes limit and after and returns the first page, with data, next, and total where the list has it. Iterate it (Node: for await, Python: for, async Python: async for) to go through every item: the SDK asks for the following pages as you go. A crawl’s pages have their own helper, bx.crawl.pages(id).

These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.