List of Incoming and Outgoing Links for Entire Space

Our documentation team would like to be able to get a full list (report) of the Incoming and Outgoing links for all pages in the documentation space. We're able to get this information on a page by page basis with "Tools->Page Information" from any given page, but it would be great for auditing to be able to get this printed out in list form (or similar) like:

PageA
 Incoming Links:
   PageB, PageC
 Outgoing Links: 
   PageF, PageD

Is this possible? I've looked for plugins in the marketplace but haven't found anything that quite does what I want. No one here has a lot of experience connecting via the REST API, but are willing to go that route if that's the best way to get this kind of report. 

A nudge in the right direction, even "try this code via the REST API" would be super appreciated. 

1 answer

1 accepted

In case anyone is looking to do this, we found the following link quite helpful: https://answers.atlassian.com/questions/38519644

You can then modify the query to include or exclude spaces as needed. This example modifies the query to show all links on pages in NEWSPACE that don't point to a page in NEWSPACE or CURSPACE. I've also added an order by on the first two columns as that made the most sense for our needs.

SELECT s.spacename as Space, c.title as Page, l.destspacekey as SpaceOrProtocol, l.destpagetitle as Destination
FROM LINKS l
JOIN CONTENT c ON c.contentid = l.contentid
JOIN SPACES s ON s.spaceid = c.spaceid
WHERE c.prevver IS NULL
AND (l.destspacekey!='NEWSPACE' AND l.destspacekey!='CURSPACE' AND s.spacename ='NEWSPACE')
ORDER BY 1,2;

All you need is sql access to your confluence database. The format is perfectly usable for audit/reporting.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

461 views 19 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you