API getting stuck? Returns 0 when successful and has more results | Community
Skip to main content
Matt_Stone2
New Participant
January 29, 2017
Solved

API getting stuck? Returns 0 when successful and has more results

  • January 29, 2017
  • 1 reply
  • 2443 views

Has anyone encountered a REST call that returns successful, returns moreResults = 1, but doesn't return any results? I'm setting up a warehouse to log all of our interesting moments and am backfilling it to start with. For the most part this has worked fine, but there's a certain period of time that I run into the problem I described -- 0 results, yet there's no errors, success = 1 and moreResults = 1. Additionally, I know for a fact there's results, as I can change the paging token to a month later and it pulls results just fine.

Could this just be a load issue at that particular time of the call? Or has anyone else encountered something like this?

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

That's expected behavior -- there are a couple of threads about this. It has to do with the way the cursor (paging token) paginates results. Unfortunately, it does mean you will spend API calls where there are no results, but if you continue to chase the next token you should be fine.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
January 29, 2017

That's expected behavior -- there are a couple of threads about this. It has to do with the way the cursor (paging token) paginates results. Unfortunately, it does mean you will spend API calls where there are no results, but if you continue to chase the next token you should be fine.

Matt_Stone2
New Participant
January 29, 2017

Got it -- did as you said and it eventually got through them. The period of time it was getting stuck was before I came aboard and there must have been a significant change to our instance since I didn't encounter any kind of slowage like that any other time. I assume the archived activities it won't return are activities for deleted leads?

SanfordWhiteman
New Participant
January 29, 2017

Not completely sure of the reason(s) for the gappiness. It's been said that it's a load-shedding measure, but that doesn't make much sense to me... maybe that plus an algorithm that guesses the cursor forward into a massive table and sometimes misses.