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