-
Re: Is there any way to retrieve the contents in a pagination way
lauren.vesceraAug 12, 2019 1:28 PM (in response to xrichard)
Hi Richard,
Thank you for reaching out. The quickest way to get the best answer for your question is to submit a ticket to our support team. Please let me know if you need directions on how to do so.
Best,
Lauren
-
Re: Is there any way to retrieve the contents in a pagination way
gbrettmiller Aug 12, 2019 3:02 PM (in response to xrichard)The default number of items returned from an API call like that is typically 25. If there are more than 25 items you will need to run the API call multiple times to get them all.
The returned JSON from the API call will include an object such as:
"links" : {
"next" : "https://developers.jivesoftware.com/api/.../contents?count=25&startIndex=25",
}
Just use that link to initiate another API call to retrieve the next page of items. (If there are multiple pages of results, that "links" object will also include a "previous" link. )
This is for API v3 on-prem, it may be different on cloud.
-
Re: Is there any way to retrieve the contents in a pagination way
xrichard Aug 13, 2019 9:06 AM (in response to gbrettmiller)Brett, thanks for your reply.
So does it means there's still no available API to retrieve the total content number?
-
Re: Is there any way to retrieve the contents in a pagination way
gbrettmiller Aug 13, 2019 1:07 PM (in response to xrichard)Yes, that is correct, there is no available API that returns the total content number. (As far as I know)
-
-
-
Re: Is there any way to retrieve the contents in a pagination way
mcollinge Aug 13, 2019 1:34 AM (in response to xrichard)1 person found this helpfulif there's exist another API can retrieve the total contents number, so that i can paginate the data from my side.
FYI, there isn't a way to see the total number of results. Jive coded it like that for performance reasons.
-
Re: Is there any way to retrieve the contents in a pagination way
petar.bozovic Aug 14, 2019 9:40 AM (in response to xrichard)The API call will return "next" when there is pagination. Set the count=100, as 100 is the max amount you can request. Create a function to ITERATE over each "next" link and store these value's/links. Create a count of how many links you get and multiply it by 100.