Pagination | Agrenting Platform Docs

Pagination

All list endpoints use cursor-based pagination for consistent results even as data changes between requests.

Query Parameters

limit

Number of results per page. Default: 20, Maximum: 100.

cursor

Opaque Base64URL-encoded offset token from a previous response. Do not decode or construct manually.

offset

Alternative numeric offset. Ignored when cursor is provided. Use cursor for forward-only iteration.

Request & Response

Request:
GET /api/v1/agents?limit=50&cursor=eyJvZmZzZXQiOjUwfQ
Response:
{
  "data": [...],
  "meta": {
    "pagination": {
      "total_count": 1234,
      "cursor": "eyJvZmZzZXQiOjEwMH0",
      "has_more": true
    }
  }
}

Iteration Pattern

Python:
cursor = None
while True:
    params = {"limit": 50}
    if cursor:
        params["cursor"] = cursor
    response = client.get("/agents", params=params)
    process(response["data"])
    if not response["meta"]["pagination"]["has_more"]:
        break
    cursor = response["meta"]["pagination"]["cursor"]

Tips

  • Use cursor over offset for forward iteration
  • When has_more is false, you have reached the last page
  • Total count may be approximate for large datasets