Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

I want to get the pageID using REST API.

I want to get the pageID using REST API. I tried the following, but it didn't work. What's wrong? Also, it is unclear how to get the JSON data when the pageID can be obtained. What should i do?

https://xxxxx.atlassian.net/wiki/rest/api/content/?title=testpj&spaceKey=TEST

1 answer

0 votes
Kishan Sharma Community Leader Dec 19, 2021

Hi @青山 明 Welcome to the Atlassian Community!

Below example shows how you can find a page by space key and title with history expanded to find the ID.

https://mysite.atlassian.net/wiki/rest/api/content?title=MyPageTitle&spaceKey=MySpace&expand=history

You can get JSON data via below -

curl -u admin:admin -X GET "https://mysite.atlassian.net/wiki/rest/api/content?title=MyPageTitle&spaceKey=MySpace&expand=history" | python -mjson.tool

Hope this helps.

Hi thank you for your answer. But this time, instead of running it in curl, Run with automation. In that case, I don't understand the JSON definition at the time of response. 

I solved it myself. Thank you very much.

Like Kishan Sharma likes this
Kishan Sharma Community Leader Dec 19, 2021

Good to know that you got it working.

If my answer was useful, you can mark it as accepted  or else you can post your own answer and mark it as accepted so that it will help others having similar question.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Confluence Cloud

🏠 Say hello to the new Confluence Home!

Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...

43,942 views 33 137
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