Is it possible to paginate across non-lead related rest API calls? | Community
Skip to main content
Edwin_Afable1
New Participant
June 5, 2018
Solved

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

  • June 5, 2018
  • 1 reply
  • 2113 views

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.
Best answer by SanfordWhiteman

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

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
June 5, 2018

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
New Participant
June 5, 2018

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