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

Not able to list all the pages,child pages and descendants of particular space through Rest API.

FarhaShaik January 6, 2023

I am using Confluence Rest API to List the child pages and descendants of particular space content where the limit I mentioned is 999 although I can only get response of few pages, How to get complete pages through content of space.
Which API url I can use ?

Note: https://<domain>/confluence/rest/api/content/{contentID}/child?limit=999&expand=page.children.page.children.page.children.page.children.page.children.page.children

The above URL lists upto 5loops as I repeated 5 times of (page.children) rather than this how can i list the child and descendants ?


Note: https://testbapps.alacriti.com/confluence/rest/api/space/{space_key}/content?limit=999

With the above URL getting response of content but repeatedly and I want to get only main Pages of Content. So What URL I can use ?

1 answer

1 accepted

0 votes
Answer accepted
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 8, 2023

Hi @FarhaShaik ,

welcome to the Atlassian community!

Rest API https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space/#api-wiki-rest-api-space-spacekey-content-get is the correct way to retrieve all pages in a space.

Depth parameter is, by default, all so it should retrieve all pages within your space.

depth

string

Filter the results to content at the root level of the space or all content.

Default: all

Valid values: allroot

About the limit of results, you cannot get 999 items in one shot because of a limit in the result. This limit is to avoid perfomance issues. So you need to use startAt parameter and pagination (https://developer.atlassian.com/cloud/confluence/rest/v1/intro/#status-code).

Hope this helps,

Fabio

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events