Browse this section
API reference

Pagination

Cursor-based pagination on all list endpoints.

List endpoints accept limit (1–100, default 25) and cursor, and return next_cursor when more results exist.

curl "https://api.brewmycode.com/v1/runs?agent=agt_01j9…&limit=50" \
  -H "Authorization: Bearer $BMC_API_KEY"
{
  "data": [ { "id": "run_…", "status": "succeeded", "…": "…" } ],
  "next_cursor": "eyJvZmZzZXQiOjUwfQ"
}

Pass cursor=eyJvZmZzZXQiOjUwfQ to fetch the next page. Cursors are stable for 24 hours. Most list endpoints support filters documented on the resource page and order=asc|desc by creation time.

SDKs expose auto-paginating iterators:

for run in bmc.runs.list(agent="agt_01j9…"):
    print(run.id, run.status)