hgaviyappa@localhost: confluence $curl -H "Authorization: f4TqMwy7tkeJf3h3cabt5C17" -X GET "https://confluence.eng.vmware.com/rest/api/content/129820786/property" | python -mjson.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 154 0 154 0 0 6364 0 --:--:-- --:--:-- --:--:-- 6416
{
"data": {
"authorized": false,
"errors": [],
"successful": false,
"valid": true
},
"message": "Cannot find content with id ContentId{id=129820786}",
"statusCode": 404
}
(confluence) hgaviyappa@localhost: confluence $
I am sure I am using the right page-id.
My page path: https://confluence.eng.vmware.com/display/<space_name>/<header>
How can i solve this issue.
It appears you are trying to reach the Confluence Server REST API using an access token. Confluence only supports basic authentication for API requests (though we have a feature request for extended authentication functionality here: CONFSERVER-55421).
The following command should work (after inserting your username/password):
curl -u username:password -X GET "https://confluence.eng.vmware.com/rest/api/content/129820786/property" | python -mjson.tool
For more code examples, see Confluence REST API examples.
(As a sidenote: I assume that is a test API token in your question, but if that API token is from some public, production application, I recommend revoking/regenerating the token for security purposes, since it has been published to this public forum.)
Thanks!
Zak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.