Skip to navigation

Pagination

Ada’s APIs use cursor-based pagination when retrieving large lists. API calls can include an optional limit query parameter to specify the number of records returned per request.

Request example

GET
/api/v2/end-users/
import requests
url = "https://example.ada.support/api/v2/end-users/"
querystring = {"cursor":"5f7e0e2c1e7c7e000f0f9c3a","limit":"10"}
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())

Query parameters

  • limit: The number of records to return.
  • cursor: The id that marks the start or beginning of the returned records. This is also provided in the next_page_url from the previous response.

Response example

Response
{
"data": [
{
"end_user_id": "5f7e0e2c1e7c7e000f0f9c3a",
"profile": {
"first_name": "Ada",
"last_name": "Lovelace",
"display_name": "Ada Lovelace",
"avatar": "https://example.com/avatars/ada.png",
"email": "ada.lovelace@ada.cx",
"language": "en-US",
"metadata": {},
"system_properties": {
"sunshine_user_id": "5f7e0e2c1e7c7e000f0f9c3a"
}
},
"created_at": "2020-09-20T00:00:00+00:00",
"updated_at": "2020-09-20T00:00:00+00:00"
}
],
"meta": {
"next_page_url": "https://example.ada.support/api/v2/end-users/?cursor=65a17e3f43bec88e2792d0eb"
}
}

Use the next_page_url to continue fetching additional data with subsequent requests.