Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to do exactly what this url describes but through the REST API

Deleted user June 10, 2019

Has anyone been able to do this through REST?
Is there another approach? I want to delete a number of pages, but the all need this id, not easy to divine from query. Thanks

https://confluence.atlassian.com/confkb/how-to-get-confluence-page-id-648380445.html

REST API pageid delete page via REST how do I obtain PAGEID?

1 answer

1 vote
Ismael Jimoh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2019

Hi @[deleted] 

You should be able to get the page id via rest api by:

  • Perform a Rest API CQL call that fetches you the page
  • Look through the returned JSON body for the value of the page id.

Examples for performing Rest API on Confluence can be found here

Do let me know if you have any further questions.

Cheers.

Deleted user June 11, 2019

I thought there would be something less hack-like and more deterministic like "get me the page id of this page that I just retrieved"  Navigating through all the json noise to identify the page id seems ugly; Anyhow, I did find something more apropos by:
curl -u admin:admin -X GET "http://localhost:8080/confluence/rest/api/content?title=myPage%20Title
&spaceKey=TST&expand=history" | python -mjson.tool
...doing the equivalent in C#
Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events