cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
272
Views
0
Helpful
4
Replies

How to use pagination with thousandeyes python sdk

j-davis
Level 1
Level 1

Hello. I'm using the thousandeyes python sdk to develop a client for our use. I cannot, for the life of me, determine how pagination works with the sdk. I don't see any methods at all that perform this function. Neither in the endpoint_agents library (what i'm currently working with) or in the core. I see the pagination links provided by the model, but this is just the data, not a way to perform pagination using the client api. 

The docs say there is built-in pagination control, but it's not documented anywhere that i can find: 

https://developer.cisco.com/docs/thousandeyes/libraries-sdks/#features

Thanks in advanced!

 

4 Replies 4

Torbjørn
VIP
VIP

It handles pagination automatically(and opaquely), you should not have to do anything related to pagination when using the SDK. Are you running into any issues related to pagination specifically?

Note that my experience with this SDK is _very_ limited

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

Okay, so let me explain. I'm trying to work a list of all my endpoint agents, including deleted. I have over 17K agents in my list. The max value the SDK api-call will give me is 5K. 

 

The REST API provides the link for 'next', but the SDK client doesn't have any method for calling it. I also can't figure out a way to have the SDK client call a URI i provide. 

I can write my own client, but that seems silly. I feel like i'm missing it, and it seems odd to me to mention pagination, provide the pagination model, but not have any methods for working with it. 

Thanks for looking!

The SDK _should_ be handling it for you AFAIK. I would create an issue on Github for this and inform your Cisco account manager/partner manager. 

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

Not an expert, but from what I can gather on the GitHub code it’s done by the paginatior class https://github.com/thousandeyes/thousandeyes-sdk-java/blob/4b4a9232f9b1bb90a16b443a72f8f731419c3fce/core/client/src/main/java/com/thousandeyes/sdk/pagination/Paginator.java

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io