Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2014-03-27 08:02:31 -0600

RHK gravatar image

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

Regards, RHK

click to hide/show revision 2
No.2 Revision

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

decoded

Was there any changes required on syntax? How to get the cinder volumes details using APi's

Regards, RHK

click to hide/show revision 3
No.3 Revision

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

Regards, RHK

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" } ] }

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