Example: REST API pagination

Hey everyone,

We’ve received some questions about how to query data from Shotgun via the REST API when there’s more data being requested than fits into a single “page” returned by the API for a single request.

I’ve written up a short example script in Python in this gist that will hopefully act as a starting point for those of you needing to query large amounts of data from Shotgun.

I hope this helps, and please let us know if there’s anything that’s unclear in the example. I’ll be happy to provide additional information or guidance if anyone needs it!

8 Likes

We’ve also had a few questions come up about doing the same as above, but for POST calls instead of GET. We’ve adapted the above GET example to work for POST calls – see the below!

5 Likes