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

Not able to Create Child Page


Not able to create the child page using rest api, posting JSON Code and error code below.please do the needfull.

Rest API Method Call: POST

JSON Code:



"value":"<p>This is a child page</p>",


Error Code:405.





1 answer

0 votes
Dario B Atlassian Team Feb 21, 2020



The body of the request looks correct to me (assuming that the space key and ancestor id are correct) and error 405 means "method not allowed" so I am not sure what is going wrong here (maybe calling a different endpoint that only accepts PUT requests?).

However, I have tested this against my instance and everything works fine:

curl -u <EMAIL-ADDRESS>:<API-TOKEN> -X POST -H 'Content-Type: application/json' -d '{"type":"page","title":"created using rest api","ancestors":[{"id":380665857}], "space":{"key":"QWER"},"body":{"storage":{"value":"<p>This is a new page created using REST API</p>","representation":"storage"}}}' "https://<NAME>"

{"id":"634617857","type":"page","status":"current","title":"created using rest api","space":{"id":380600321,"key":"QWER","name":...........
[...] }


Can you kindly run the same test against your instance (replace <EMAIL-ADDRESS>, <API-TOKEN> and <NAME> with the appropriate data) and paste the result in here removing the sensitive data as in above example? 




Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

8,465 views 6 6
Join discussion

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