Forums

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

Export all Confluence Links

Elliott Waters
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 14, 2019

So just a quick question.

I have been asked to export all pages in a Space from confluence with

  • Title
  • Author
  • Last Modified by
  • Date modified
  • Link

Is there any plugin or any way i would be able to spit out a report with these criteria as i have been manually doing it for the past week and it seems to get harder and harder.

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 16, 2019

Hi Elliott,

You could do this by writing a database query that will access your Confluence database and obtain that information.

I can look into what this would be but can you please tell me what you mean by the variable "link"? Do you mean if there are any links on the page, or something else?

Shannon

Elliott Waters
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 17, 2019

No the actual link. for example this pages link is 

https://community.atlassian.com/t5/Confluence-questions/Export-all-Confluence-Links/qaq-p/980807

Basically I need to export the links so users can click on them and it will take it to that page on the actual confluence 

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 21, 2019

Elliott,

Thank you for confirming.

I would recommend that you obtain your information using one of the following ways:

REST API

This is likely the best way to retrieve data from Confluence in a bash or Confluence script. Have a look at Confluence REST API Examples for examples of terminal and python commands for using the API.

The URL below will return a JSON list of all pages in the instance (replace <base-URL> with the base URL for your instance):

http://<base-URL>/rest/api/content?type=page&start=0&limit=99999

You can then use python to parse through the JSON to find the ID and title of each page (useful article on JSON parsing with Python: Working with JSON data in Python).

Database

Your other option is to obtain the data using the database. While the REST API is best to use when using along with a script, you can still obtain a list of page titles and IDs using this database query: 

SELECT title, contentid
FROM content
WHERE contenttype = 'PAGE'
AND prevver IS NULL
AND content_status = 'current';

 When accessing the database, please be sure you are familiar with the process, and if not, please speak to your database administrator. In addition, always make a backup and do not write any changes to the database unless you have that backup and Confluence is completely stopped.

You will need to adjust your database commands in order to get the remainder of the details that you need from the database, so do be sure to pair up with your DBA if you need any assistance with that.

Regards,

Shannon

Like Harsh Dhul likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events