Re: We don’t get all Marketo activities data

Anonymous
Not applicable

We don’t get all Marketo activities data

Hi,

We are pulling Marketo activities data with Python code, each time we are doing 100 loops with one activity type id.

I wonder if we are doing it right, is it ok to stop pulling although the 'moreResult' is True? Should we stop pulling just when 'moreResult'  is false?

I don't think it should be the problem because although we stop pulling when 'moreResult'  is True ,we are pulling incrementally and we save the last activity date from the last iteration and in the next iteration we get paging token for this date and start 100 loops again.

What do you think can be the problem? We check and it's looks like we didn't achieve the Rate limit.

Thanks!

Shiran

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: We don’t get all Marketo activities data

Don't stop polling until moreResult is false. There will be pages with no content in-between.

Anonymous
Not applicable

Re: We don’t get all Marketo activities data

I did it and I am still missing data... any other suggestions??  😕

SanfordWhiteman
Level 10 - Community Moderator

Re: We don’t get all Marketo activities data

Explain more about what you're doing and missing. 100 loops doesn't make sense here: you should be looping until done.

Anonymous
Not applicable

Re: We don’t get all Marketo activities data

As you suggest I deleted the 100 loops and extract data till I got 'moreResults' = false. I will write my scenario.

I want to extract all the email delivered activity meaning activity Type Id=7 since 09-25-17 so first I sent the following call to get the next_page_token

https://891-VEY-973.mktorest.com/rest/v1/activities/pagingtoken.json?access_token=XX&sinceDatetime=2...

After I have the next_page_token I am calling to the specific activity Type Id with the next_page_token I got.

https://891-VEY-973.mktorest.com/rest/v1/activities.json?access_token=XX&nextPageToken=YY&activityTy...

and each time I  continue to call the next page if the 'moreResults' = true, I stopped when 'moreResults' = false.

https://891-VEY-973.mktorest.com/rest/v1/activities.json?access_token=XX&nextPageToken=KETE6A====&ac...

https://891-VEY-973.mktorest.com/rest/v1/activities.json?access_token=XX&nextPageToken=KEOQ====&acti...

...

...

Did you understand? Do you have any suggestions?? Do I do it right?

Thanks!