I'm having issues with creating a page (child of another page which I provide the ID for) in the company's Confluence wiki via command line. I get status code 403, which tells me I could not create content with type "page".
My command ("user" and "mycompany" being placeholder names for this post):
curl -u user -X POST -H 'Content-Type: application/json' -d'{"type":"page","title":"new page","ancestors":[{"id":54362173}],"space":{"key":"TST"},"body":{"storage":{"value":"<p>This is a new page</p>","representation":"storage"}}}' https://mycompany.atlassian.net/wiki/rest/api/content/ | python -m json.tool
It asks for my password and I provide the correct one, and then this is the output I get:
{
"data": {
"authorized": false,
"errors": [],
"valid": true
},
"message": "Could not create content with type page",
"statusCode": 403
}
I have permissions to create a page via the Confluence interface (and I have, several times), but this seems to be telling me otherwise. Can anyone shed some light into why this is happening and what I can do to fix it?
Also, I should mention I've gotten comment-posting via command-line to work, so I do indeed have permissions for the wiki. But for creating and editing pages via this method, I'm having this problem.