Cursor based pagination
Endpoints that return multiple items use cursor-based pagination:
- Each paginated endpoint includes optional
cursor
field in it's response. - To fetch the next page, include
cursor
query parameter with the value extracted from previous page response. - If cursor is absent or set to null it indicates there are no more pages
Examples
Retrieve first page of recent mentions for project 111
curl -X POST \
'https://sentione.com/api/public/v2/projects/111/mentions/recent/search' \
-H 'X-API-KEY: your_secret_key_here' \
-H 'Content-Type: application/json' \
-d '{"filters":{},"sortType":"PublishedAtDescending"}'
{
"data": [ /* up to 25 Mention objects */ ],
"cursor": "def456"
}
Example: Retrieve second page of recent mentions for project 111
curl -X POST \
'https://sentione.com/api/public/v2/projects/111/mentions/recent/search?cursor=def456' \
-H 'X-API-KEY: your_secret_key_here' \
-H 'Content-Type: application/json' \
-d '{"filters":{},"sortType":"PublishedAtDescending"}'
{
"data": [ /* next 25 Mention objects */ ],
"cursor": null
}