Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

detailssummary API pagination

Luis Gonzalez March 6, 2018

Hi!

Congrats for your product.

I´m using /rest/masterdetail/1.0/detailssummary/lines?spaceKey=XXX&pageSize=99&cql=label=xxxx

The API answer seems to paginate, but there is no link to the next page... nor parameter to access a page in particular.

{
"currentPage": 0,
"totalPages": 3,
"renderedHeadings": [

Trying to find a workaround, if &pageSize=99 added to the url, detailLines returns empty instead of the 30 detailLines that returns without that parameter.

Any suggestion? 

Thanks in advance,

Luis

1 answer

0 votes
WW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2018

I posted this answer on this question, too, but I'll put it here in case someone didn't find my other post.

------------

I was having this same issue, but I figured it out.  You should see the totalPages in the first part of the results.

{"currentPage":0,"totalPages":17, etc.

To see more pages, add &pageIndex=1 to the request to get the next page. 

If there are 17 pages, &pageIndex=16 would be the last page (0 would be what's included in the first page).

Here's what the request would look like to see the second page, using the example, with the additional pageIndex part:

/confluence/rest/masterdetail/1.0/detailssummary/lines?cql=type=page&spaceKey=MYSPACEKEY&headings=key1,key2,key3&pageIndex=1

 

Luis Gonzalez May 22, 2018

Thanks BH!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events