I added an attachment successfully to the confluence page but i am unable to update that page. I do have admin permissions to create a page and edit it. I do not know why its not working. Below is the command that i have used to update a page in confluence.
curl -u username:password -X PUT -H 'Content-Type: application/json' -d'{"id":"pageid","type":"page","title":"LOAD-UI REPORTS","space":{"key":"TST"},"body":{"storage":{"value":"<p>This is the updated text for the loadui reports page</p>","representation":"storage"}},"version":{"number":2}}' https://jira.hilton.com/confluence/rest/api/content/pageid | python -mjson.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
397 177 0 177 0 220 359 446 --:--:-- --:--:-- --:--:-- 0
{
"data": {
"authorized": false,
"errors": [],
"valid": true
},
"message": "Could not update Content of type : class com.atlassian.confluence.pages.Page with id 38012230",
"statusCode": 400
}
Please let me know what i am doing wrong here.