Pagination
Paginating through resources
Most key resources in HeyTeam API support for bulk fetches and return the result data in lists (in the 'data' key of the response).
Pagination MethodHeyTeam uses offset-based pagination approach to return large collection data. HeyTeam will soon start using cursor-based pagination approach to return large collection data in a more resource efficient manner.
The actual Offset based pagination method returns three things :
- A portion of the collection you are querying for (in the
datakey) - The links to switch between pages (in the
linkskey) - The meta information of the page (in the
metakey)
Example of a paginated responses :
`
{
"data": [
{
...
},
...
],
"links": {
"first": "https://[your-domain].heyteam.com/eapi/requirements?page=1",
"last": "https://[your-domain].heyteam.com/eapi/requirements?page=18",
"prev": "https://[your-domain].heyteam.com/eapi/requirements?page=1",
"next": "https://[your-domain].heyteam.com/eapi/requirements?page=3"
},
"meta": {
"current_page": 2,
"from": 21,
"last_page": 18,
"path": "https://[your-domain].heyteam.com/eapi/requirements",
"per_page": 20,
"to": 40,
"total": 356
}
}Updated 3 months ago