We are trying to export entire confluence space via REST API using
https://confluecesite/rest/api/content?spacekey=spacekey&expand=body.storage,metadata.labels,history.lastupdated,restrictions.read.restrictions.user,restrictions.update.restrictions.user,children.comments,children.attachment&start=0&limit=99999
But the JSON Output excludes few pages. Not sure, what is our mistake.
Any idea?
@Suresh Venkat - Currently there are no REST API methods in Confluence for Space export or import.
Open Feature request - https://jira.atlassian.com/browse/CONFSERVER-40457
https://confluence.atlassian.com/confkb/confluence-space-import-via-scripting-tools-1041075950.html
Hello Suresh,
Take a look at this Atlassian documentation on pagination. In particular, the section on "GET the next page of results". If I am reading the documentation correctly, you would get the next page of results like this:
https://confluece/rest/api/content?spacekey=spacekey&expand=body.storage,metadata.labels&start=99999&limit=99999
This may or may not be the solution, but the concept of pagination when using Atlassian REST API is a pretty good idea to keep in mind.
If you would like to automate the process, please consider Bob Swift's Confluence Command Line Interface - CLI. This documentation will show you how to export multiple Spaces via command line.
Regards,
Hyrum
Please note that I am a product engineer for Power Scripts and that I work for Anova Apps (Appfire).
It looks like you're new here. Sign in or register to get started.