Hi,
I am trying to create a Child page in Confluence using restAPI but getting a 403 error response.
Request:
{
"type":"page",
"title":"New child page",
"ancestors":[
{"id":206583541}
],
"space":{"key":"/rest/api/space/MySpace"},
"body":
{"storage":
{"value":"<p>This is a new child page</p>",
"representation":"storage"}
}
}
Respone:
{
"statusCode": 403,
"data": {
"authorized": false,
"valid": true,
"errors": [],
"successful": false
},
"message": "Could not create content with type page"
}
Note: I am able to run a GET and PUT (update the confluence pages) succesfully.
I was able to resolve the issue by fixing my request.
The space key had to be updated from:
"space": {
"key": "/rest/api/space/MySpace"
},
to
"space": {
"key": "MySpace"
},
Hi Pooja,
How does PUT and GET working, can you please share an example?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you really pass "/rest/api/space/MySpace" string as a space key?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavel,
Yes I do pass /rest/api/space/MySpace as space key.
Also, I am able to create the page manually in confluence, so I am guessing its not permission issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!
Register todayOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.