Activities rest api nextpagetoken with type specified

Bryan_Meyerovic
Level 2

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?

Tags (1)
3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Activities rest api nextpagetoken with type specified

That's expected behavior.

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

Bryan_Meyerovic
Level 2

Re: Activities rest api nextpagetoken with type specified

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?

SanfordWhiteman
Level 10 - Community Moderator

Re: Activities rest api nextpagetoken with type specified

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.