Forum Discussion

cike's avatar
cike
Champion
10 years ago

REST call (API v1) limited number of results

I'm using different REST API calls like this:

/search/messages?q=is_root:true&sort_by=-date&page_size=10&page=${page_var}

 The call works pretty well as long as the paging variable ${page_var} is less or equals 100. But if the variable is greater than 100 the call ends with an empty response:

<response status="success">
   <messages/>
</response>

The community contains more than 1 million posts and if use the API to get the message count, I get the correct value as well:

/search/messages/count?q=is_root:true

<response status="success">
   <value type="int">170076</value>
</response>

 Is there an internal limitation, which causes this behavior? I guess for calls like /topics/recent there will be a limit, too.

 

Will it be possible to bypass this behavior by using version 2 of the Lithium API?

 

Thanks and best regards,

Christian