Skip to main content
Bryan_Meyerovic
Level 2
June 5, 2019
Question

Activities rest api nextpagetoken with type specified

So I'm calling the activities endpoint with a paging token that has a date of days ago, I also pass in a very little used activity (clicksharedlink).  Instead of returning no results and being the last page, it returns no results and keeps giving me moreresults=true until i've paged through to sometime around the current day i think.

Is this a bug or expected behavior?  Seems like it's paging on filtered out activity types.

Is there a way to translate the nextpagingtoken back into a datetime?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

SanfordWhiteman
Level 10
June 6, 2019

That's expected behavior.

(And the paging token shouldn't be expected to map to a specific datetime.)

Translate
Bryan_Meyerovic
Level 2
June 6, 2019

Edit: how do I determine the first occurrence of a specific activity type?  Do I just have to page through a few hundred times starting at my earliest activity date until I get a hit?

Translate
SanfordWhiteman
Level 10
June 6, 2019

Alas, yes. Unless it's a very rare activity type and you could, for example, call a webhook when it's first fired and use that as your mark.

Translate