SOLVED

Re: Is it possible to paginate across non-lead related rest API calls?

Go to solution
Edwin_Afable1
Level 2

Is it possible to paginate across non-lead related rest API calls?

Hello Marketo community,

I'm trying to find a way to retrieve all form IDs via this endpoint: http://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Forms/browseFo...

However, I don't see a nextPageToken value passed in the response, is there a way to get all forms from this endpoint? I referenced the paging tokens page, http://developers.marketo.com/rest-api/paging-tokens/ , but couldn't find a way to paginate across all the forms in our instance. I'm thinking it involves the offset parameter in the request, but the documentation doesn't say much on how it's used (i.e. it only states that it's used for paging:

pastedImage_4.png

Here's a sample response from a call to this endpoint:

pastedImage_3.png

Thanks!

Edwin

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Is it possible to paginate across non-lead related rest API calls?

offset == index of the next batch to retrieve. Consider the forms to be a (dense) list with integer keys.

nextPageToken is used when the pagination is more complex (and opaque to the user).

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Is it possible to paginate across non-lead related rest API calls?

offset == index of the next batch to retrieve. Consider the forms to be a (dense) list with integer keys.

nextPageToken is used when the pagination is more complex (and opaque to the user).

Edwin_Afable1
Level 2

Re: Is it possible to paginate across non-lead related rest API calls?

Thanks again - I was able to paginate using a loop and retrieve all IDs