Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do you export space page titles into an excel file? Is this possible?

Ashley Bird
Contributor
May 5, 2021

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.

2 answers

2 accepted

0 votes
Answer accepted
Pramodh M
Community Champion
May 5, 2021

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 

0 votes
Answer accepted
David at David Simpson Apps
Atlassian Partner
May 5, 2021

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.

Screenshot 2021-05-05 at 18.45.16.png

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events