Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How to get parent page id in confluence rest api



I have been trying to retrieve the parent page ID using the child's page ID, but I am unable to retrieve this information using REST API.

I have tried using the following endpoints but the response did not return the parent page ID :


Can someone please let me know how I can get the ID of the parent page using the REST API in python?

Thank you!

2 answers

1 accepted

2 votes
Answer accepted
Thiago Masutti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 25, 2022

Hi @Prem Methuku 
Welcome to the Atlassian Community.

If you have the target pageID, then you can use the following REST API call to the get the list of ancestors (aka parents) of the current page.



Kind regards,
Thiago Masutti

That works! Thanks Thiago.

If you (or somebody else for that matter) will be using the Python library you can just call

page = confluence.get_page_by_id(page_id=page_id, expand='ancestors')
parent_id = page['ancestors'][-1]['id']

 and get the parent_id from a list of ancestors.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events