AnsweredAssumed Answered

How to handle API pagination by programing

Question asked by thomaslambert on Aug 22, 2014
Latest reply on Sep 1, 2014 by thomaslambert

Hello all,

 

I'm developing a sort of Jive API wrapper for google apps script. I try to be very clean in the programming, and in order to have small function, I like to call my custom fetch function. This function will then handle options, logging for debugging and pagination.

 

However I'm having some trouble on a specific call.

When I call something like  https://myinstance.jiveon.com/api/core/v3/people/?ids=20387,2147 a links.next is returned

https://myinstance.jiveon.com/api/core/v3/people/?sort=firstNameAsc&fields=%40summary&origin=unknown&count=25&startIndex=2

Even though I only asked for 2 results and I just got those.

 

How could I know in the context of that function, that no pagination is needed ?


Thank you

Thomas

Outcomes