Hi,
I am using the below command to update the existing confulence page from widdows.
curl -u userID:"PASSKEY" -X PUT -H "Content-Type:application/json" -d '{"id":"135769759","type":"page", "title":"Configuration Management Plan","space":{"key":"THEPAGE"},"body":{"storage":{"value": "<p>This is the updated text for the CMP page</p>","representation":"storage"}}' https://confluence.sw.mycompany.com/rest/api/content/135769759 | python -mjson.tool
But when i run the above command i get the following error:
curl: (3) [globbing] nested brace in column 68
curl: (3) [globbing] unmatched close brace/bracket in column 72
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 89 0 64 100 25 61 23 0:00:01 0:00:01 --:--:-- 61
{
"statusCode": 500,
"message": "",
"reason": "Internal Server Error"
}
Please help me to resolve this.
I have followed the example provided here ("Update a Page")
https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/.
However when i extract the content of the above page, with the below mentioned command, it returns me the JSON data perfectly. So i assume the reference to page and the object parameters are correct.
curl -u user:"PASSKEY" https://confluence.sw.mycompany.com/rest/api/content/135769759?expand=body.storage | python -m json.tool
Hi, i was able to resolve the curl related errors .ie.
curl: (3) [globbing] nested brace in column 68
curl: (3) [globbing] unmatched close brace/bracket in column 72
However, i am still getting Internal Server Error as shown below:
curl -u USER:"PASSKEY" -X PUT -H "Content-Type:application/json" -d '{"id":"135769759","type":"page","title":"Configuration Management Plan","space":{"key":"THEPAGE"},"body":{"storage":{"value":"<p>This is the updated text for the CMP page</p>","representation":"storage"}}' https://confluence.sw.mycompany.com/rest/api/content/135769759 | python -mjson.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 238 0 64 100 174 64 174 0:00:01 0:00:01 --:--:-- 217
{
"statusCode": 500,
"message": "",
"reason": "Internal Server Error"
}
Please check and help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.