Because we included Odata, every response you receive will be paged. You can request the next page of data with the "next page" url, which is included in the response from the API.
By using paging you can reduce the response payload and easily intergrate Odyssee API to front end.
By default page size is set to 20 items on server side. If you require less than 20 as the page size you can add $top=[page size]
to the url, to reduce page size.
Zapier Integration Because put in place the paging can be difficult when configuring Zapier, the paging is disabled when using Zapier.
IMPORTANT! When using paging, it is possible that items are added or deleted during your request for the next page. If that happens, results may vary.
Auto paging using OData (JSON only)
You will receive a "@odata.nextlink"
node in the response to JSON requests.
Response example
{ "@odata.context": "https://developers.odysseemobile.com/api/$metadata#Company", "value": [ ....... ], "@odata.nextLink': "https://developers.odysseemobile.com/api/Company?$skip=20" }
Use the "@odata.nextlink"
url as your Request url to receive the next page. This is the recommended setting for JSON requests.
Manually implementing paging (XML)
You can implement paging easily with OData $top
& $skip
functions without using its own paging support (@odata.nextlink)
E.g.
Your Page size= 20 $top value=20 $skip value= changes from request to request
1st page of companies:
https://developers.odysseemobile.com/api/Company?$top=20&$skip=0
2nd page of companies:
https://developers.odysseemobile.com/api/Company?$top20&$skip=20
3 rd page of companies:
https://developers.odysseemobile.com/api/Company?$top20&$skip=40
$skip
value is calculated by adding page size to its value.
Skip Value=Skip Value + page sizePlease note that skip value will be 0 for the first page.