REST API - Reading pages from a container of a canvas board
Asked by Benjamin Sch?n:

Hello there!

I am using the confluence rest api to get a page and then read multiple child pages which are in a container of a canvas board.

The container looks like this:

![Container.PNG](/t5/image/serverpage/image-id/71781iDFD53FA706D220FC/image-size/large?v=v2&px=999 "Container.PNG")

The problem is that the container only shows up to 20 elements and then the following is displayed:

\<div class=\\ "containerfooter\\"\>  
\<div class=\\ "morerows\\"\> \<span class=\\ "morecaption\\"\>More\</span\> \<span class=\\ "morespinner\\"\>\</span\> \</div\>  
\</div\>

I call the rest api with the following url:

WEBSITE:PORT/rest/api/content/ID?expand=body.view

I have tried using other extensions for the body like body.storage but it didn't helped.

Has anyone a solution?

How to recreate the problem:

1. Create a page

2. Add a canvas board to this page:

![Step2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/72837i8B182DD6993C126A/image-dimensions/356x215?v=v2 "Step2.PNG")

Use the "Tasks Canvas" preset

3. Click on the canvas board and go to edit -\> properties -\> Scroll down to content and select: pages and cards

4. Now publish this page

5. Create a second page which is a child of the page with the canvas board:

![Step5.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/72846iF1F168794353F151/image-size/large?v=v2&px=999 "Step5.PNG")

6. Now go to the page with the canvas board and click on the plus icon of an container and add the child page to this container by writing its title into the textfield

7. You now need to add more child pages to this container so it contains more than 20

It will look like this:

![Step7.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/72847iD56E0E7F0931B13E/image-dimensions/376x96?v=v2 "Step7.PNG")

8. Call the REST API with the ID of the page with the canvas board: WEBSITE:PORT/rest/api/content/ID?expand=body.view

-\> If you do not find the ID you can go the page -\> Click on the three dots -\> Page Information -\> Find the ID in the url e.g. pageId=123456789

9. The information of a child page in the container should look like this:

\<div id=\\ "cardid-153059338\\" class=\\ "boardcontent themedheader \\" pageid=\\ "153059338\\"\>  
\<div class=\\ "boardcontentwrapper\\"\>  
\<div class=\\ "boardcontentbody\\"\>  
\<div class=\\ "cardactions\\"\>  
\<button class=\\ "aui-button aui-button-compact aui-button-subtle aui-dropdown2-trigger aui-dropdown2-trigger-arrowless\\" aria-controls=\\ "cardoptions-cardid-153059338\\"\> \<span class=\\ "aui-icon aui-icon-small aui-iconfont-arrow-down aui-iconfont-arrow-down-small\\"\>Card Actions\</span\> \</button\>  
\<aui-dropdown-menu id=\\ "cardoptions-cardid-153059338\\"\>  
\<aui-section\>  
\<aui-item-link class=\\ "removecard\\" data-card=\\ "cardid-153059338\\"\> Remove \</aui-item-link\>  
\</aui-section\>  
\</aui-dropdown-menu\>  
\</div\>  
\<div class=\\ "cardheading pagecard custom5\\"\> \<a class=\\ "pagelink cardtitle\\" id=\\ "pageid_153059338\\" pageid=\\ "153059338\\" href=\\ "/display/QRN/TestPage\\" target=\\ "_blank\\"\>TestPage\</a\> \</div\>  
\</div\>  
\</div\>  
\</div\>  
10. You will see that after the 20th page the containerfooter with the caption "More" is displayed


Answers:
author: Benjamin Sch?n
body: I solved the issue now. The problem was the canvas board.

There is a setting "Maximum board rows" which is set default to 20.

When you set this to a higher number it will fix the issue.


author: Dario B
body: Hi [@Benjamin Sch?n](/t5/user/viewprofilepage/user-id/3625282) ,

Just a wild guess but it worked for me when getting the content of a page with a Jira issue macro. Have you tried to call:

* WEBSITE:PORT/rest/api/content/ID?expand=**body.export_view**

Can you please test this and let me know if it works?

Cheers,  
Dario

comments: author: Benjamin Sch?n
body: Hi [@Dario B](/t5/user/viewprofilepage/user-id/502402)

thank you for your suggestion! I have tried it but I get the same result as with body.view. The items are still hidden behind the span tag.

Best regards,

Benjamin


author: Dario B
body: Hi [@Benjamin Sch?n](/t5/user/viewprofilepage/user-id/3625282) ,

Not sure I will be able to help here. Anyway, would you mind providing the exact steps I can follow to reproduce the issue and run some tests?

Specifically, what do you mean exactly when you say that you have:
> multiple elements which are in a container

Are those macros or anything else?

Cheers,  
Dario


author: Benjamin Sch?n
body: Hi [@Dario B](/t5/user/viewprofilepage/user-id/502402) ,

I have now updated the question with the steps to recreate the issue so everyone will directly see it.

Best regards,

Benjamin


author: Dario B
body: Thanks a lot for updating this thread [@Benjamin Sch?n](/t5/user/viewprofilepage/user-id/3625282) !

I didn't have had any chance to test this yet and I was going to do it today but apparently it is not needed anymore :)

Cheers,  
Dario


Tags: atl-adm

rest-api