Hello,
I would like to audit the content in each space and to start I need to export the content into an excel file. I can export into other file types but this is not exactly what I'm looking for. Maybe this is a simple step I missing, not sure.
Hi @Ashley Bird
Welcome to the Community!!
Here is the solution I have found :-)
We need jq to parse JSON Output of API
First get all the Space Key in your Confluence Site, following is the API to do so
curl --request GET \
--url 'https://ORG-NAME.atlassian.net/wiki/rest/api/space' \
--user 'USERNAME:TOKEN' \
--header 'Accept: application/json' | jq '.results | .[].key'
If you are looking at only one Space and once you have got all the Space Key from the above command follow the below API to get the Page titles in respective Space
curl --request GET \
--url 'https://ORG-NAME.atlassian.net/wiki/rest/api/space/{SPACE-KEY}/content'
--user 'USERNAME:TOKEN'
--header 'Accept: application/json' | jq '.page.results | .[].title'
Replace ORG-NAME, USERNAME, TOKEN, and SPACE-KEY Variables
Thanks,
Pramodh
If you can parse JSON into your excel spreadsheet, then the REST API would be a good place to start.
An example for getting all the pages and blogposts from Confluence Cloud for a space with space key "analytics":
https://dsapps.atlassian.net/wiki/rest/api/space/analytics/content
Likely you'll have to login to get this from your own Confluence, but you can get hold of all your Confluence space content in batches of 100 pages e.g.
This shows the page titles and can show much more if required.
More details here:
https://developer.atlassian.com/cloud/confluence/rest/api-group-space/#api-api-space-spacekey-content-get
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.