09-28-2023 02:23 AM
Hello,
I currently have around 8 locations specified within my customer; when I make a request to get the locations (https://developer.webex.com/docs/api/v1/locations/list-locations), whilst setting a max, I get an expected response back containing a links header.
First request:
https://webexapis.com/v1/locations?max=2&orgId=[ORG_ID]
Returns the first two locations along with the following URL within a Links header
https://webexapis.com/v1/locations?max=2&orgId=[ORG_ID]&cursor=bWF4PTImY3Vyc29yPVRXRnlheWR6SUVKaGNtND0
If I use the above returned URL to attempt to return the second page of results - I just get the first two locations back again.
What is the correct syntax for the request to get paginated results?
Thank you.
09-28-2023 03:35 AM
I've had a colleague point out to me that the cursor itself is base64 encoded; but even when decoded and I use the following
max=2&cursor=TWFyaydzIEJhcm4=
I still only get the last result from my list of locations rather than the 3rd and 4th.
09-28-2023 10:45 AM
The link URL should be 'transparent' in that you shouldn't need to decode/parse/modify it to use it.
It seems like there may be a problem with this specific API resource, as the link functionality should work as you expect, see Pagination.
I would suggest opening a formal support request to see if this might be a defect: Webex Developer Support
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide