-
Re: Retrieve total number of contents for pagination
mtuljapurkar Feb 19, 2014 8:39 PM (in response to applebeary)Hi Yulan He,
You can use the following fields, usually at the bottom of the json response:
startIndex - Indicates the index from where the page starts
itemsPerPage - Indicates the number of items in the page
links.next - A friendly field, that can be directly used to obtain the next page
Here is an example request and the expected response data, indicating the fields that help in achieving pagination:
GET http(s)://<JiveURL>/api/core/v3/contents?filter=tag(<Add your comma separated list of tags here>)
throw 'allowIllegalResourceCall is false.';
{
"list" : [ {...},{...},...{...} ],
"startIndex" : 0,
"itemsPerPage" : 25,
"links" : {
"next" : "<NextURL>&count=25&startIndex=25"
}
- Mandar
-
Re: Retrieve total number of contents for pagination
applebeary Feb 20, 2014 11:57 AM (in response to mtuljapurkar)Hi Mandar,
Thank you for your reply. Yes, I can request this API, but how do I set up a total number of pages in pagination without keep tracking next url till the last page?
Best Regards,
Yulan
-
Re: Retrieve total number of contents for pagination
mtuljapurkar Feb 21, 2014 7:43 PM (in response to applebeary)Got it!
I remember that I had to expose this as a customisation for /search. We probably need to do this for /content as well.
Are you going to customise this?
Thanks,
Mandar
-
Re: Retrieve total number of contents for pagination
amit.mahajan Feb 23, 2014 11:27 PM (in response to mtuljapurkar)Ohh, it seems not required, deleted it
-
-
-