cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
613
Views
0
Helpful
2
Replies

Web Linking pagination implementation for the Locations Endpoint

markwalsh
Level 1
Level 1

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.

2 Replies 2

markwalsh
Level 1
Level 1

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.


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