Forums

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

confluence page not created with rest api

yugi_moto
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 18, 2020

Hi ,

I am trying to create a page using post man 

1.  for ex: in a space, status  is 200 but it is providing the list of all spaces details and the page is not created.

http://mydomain.com/confluence/rest/api/content/

{"type":"page","title":"Pagetest",
"space":{"key":"Digital-Space"},"body":{"storage":{"value":"<p>This is <br/> a new page</p>","representation":
"storage"}}}

2. Tried from a parent page, still the same.

http://mydomain.com/confluence/rest/api/content/

body:{"type":"page","space":{"key":"Digital-SRE"},"title":"newpostman","ancestors":[{"id":"1691278"}]}

1 answer

0 votes
Ivan Lima
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 20, 2020

Hey @yugi_moto, If you're getting status 200, it's most likely your page has been created. I don't see anything wrong with the JSON body you shared. It aligns with the examples you will find at Confluence REST API examples. However, looking at your first item, it seems that your page got created as an orphaned page. Have a look at Space Tools > Reorder Page to double-check whether you will find your "Pagetest" over there.

Cheers,

IL.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events