Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get title and link from my public page via API?

How can I get the title and link of my Confluence pages through the API?
I would like to get via JavaScript or PHP.

2 answers

How about using the get content by id REST API? Example frontend JS:

var pageId = '12345';
var url = AJS.contextPath() + '/rest/api/content/' + pageId;

$.get(url).done(function(response) {
var links = response._links;
var pageUrl = links.base + links.context + links.webui;
var pageTitle = response.title;

console.log(pageTitle, pageUrl);

Theoretically you don't even need to build the URL from the response object. You could just append the pageId to "/pages/viewpage.action?pageId=" to get the link.

Best regards,

0 votes
Neil Atlassian Team Jan 07, 2020

The Confluence Cloud API documentation has details about the GET content method, along with some code snippets for Node, Python, and PHP.. and curl.

Suggest an answer

Log in or Sign up to answer
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

108 views 0 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you