Is it possible to paginate across non-lead related rest API calls? | Community
Skip to main content
Edwin_Afable1
Level 2
Jun 5, 2018 6:54 PM UTC
Solved

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/browseForms2UsingGET

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:

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

Thanks!

Edwin

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Jun 5, 2018 7:28 PM UTC

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).

2 replies

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
Jun 5, 2018 7:28 PM UTC

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).

Translate
Edwin_Afable1
Level 2
Jun 5, 2018 8:25 PM UTC

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

Translate