Cinder-volume using API's(No JSON Object could be decoded)
Hello,
I am not able to list Cinder volumes through REST API's
Below was the curl command i am using
curl -s -H "X-Auth-Token: $TOKEN_ID" -X GET -H "Content-type: application/json" http://10.10.10.51:9292/v2.0/$tenant_id/volumes/detail |python -m json.tool
No JSON object could be decoded
Was there any changes required on syntax? How to get the cinder volumes details using APi's
UPDATE
I modified the port to 8776,
curl -s -H "X-Auth-Token: $TOKEN_ID" -X GET -H "Content-type: application/json" \
http://10.10.10.51:8776/v2.0/$tenant_id/volumes/detail |python -m json.tool
Now i am getting like below response. I am not getting the exact information.
{ "choices": [ { "id": "v1.0", "links": [ { "href": "http://10.10.10.51:8776/v1/v2.0/80e2ada69b4449a9a6506f3407f46528/volumes/detail", "rel": "self" } ], "media-types": [ { "base": "application/xml", "type": "application/vnd.openstack.volume+xml;version=1" }, { "base": "application/json", "type": "application/vnd.openstack.volume+json;version=1" } ], "status": "CURRENT" }, { "id": "v2.0", "links": [ { "href": "http://10.10.10.51:8776/v1/v2.0/80e2ada69b4449a9a6506f3407f46528/volumes/detail", "rel": "self" } ], "media-types": [ { "base": "application/xml", "type": "application/vnd.openstack.volume+xml;version=1" }, { "base": "application/json", "type": "application/vnd.openstack.volume+json;version=1" } ], "status": "CURRENT" } ] }
Regards,
RHK
Because this question is old (and answered), you're probably not going to get many people looking at it. You probably want to post a new question.