Skip to main content

List resources endpoint may return paginated items. Each paginated response may include a special value attributelast_evaluated_key. Presence of such attribute means more items are available. API client must include last_evaluated_key in reuquest body to fetch next page.

Response will not includelast_evaluated_keyfor the last page to indicate the end of the list.

How pagination works

  1. Includepage_size in the request body
  2. Response body includes itemsand last_evaluated_key
  3. Include page_sizeand last_evaluated_key on subsequent request body
  4. Repeat until response body does not includelast_evaluated_key
Pagination is forward-only

Key Request Attributes for Pagination

Include following attributes in the request body when using pagination:
FieldTypeRequiredDescription
page_sizeintegerNoMax items to return per page (up to 50)
last_evaluated_keystringNoCursor for the next page, returned from previous response

Key Response Attributes for Pagination

FieldMeaning
itemsResults for the current page
last_evaluated_keyPresent only when more pages exist

Example: Fetch Jobs with Pagination

First Page — Request

{
  "@entity": "in.co.sandbox.tds.reports.jobs.search",
  "tan": "AHMQ00112A",
  "quarter": "Q1",
  "form": "24Q",
  "financial_year": "FY 2024-25",
  "from_date": 1765530000000,
  "to_date": 1765536568538,
  "page_size": 10
}

First Page — Response

{
  "code": 200,
  "timestamp": 1715757773000,
  "transaction_id": "109469b2-0748-4135-a569-e86fc9e45756",
  "data": {
    "@entity": "in.co.sandbox.tds.reports.paginated_list",
    "items": [
      { /* job item */ },
      { /* job item */ },
      { /* job item */ }
    ],
    "last_evaluated_key": "ZDVkMzAyZmUtMWFjYS00YjkxLTgyMWUtMTQxYmM4ZGE1NmNmIA=="
  }
}

Next Page — Request

{
  "@entity": "in.co.sandbox.tds.reports.jobs.search",
  "tan": "AHMQ00112A",
  "quarter": "Q1",
  "form": "24Q",
  "financial_year": "FY 2024-25",
  "from_date": 1765530000000,
  "to_date": 1765536568538,
  "page_size": 10,
  "last_evaluated_key": "ZDVkMzAyZmUtMWFjYS00YjkxLTgyMWUtMTQxYmM4ZGE1NmNmIA=="
}