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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.