Glance RESTful GET method does not return image.

Asked by steve chu on 2011-05-03

http://glance-host-ip:9292/imanges/
{"images": [{"name": "My Image 1", "container_format": "ovf", "disk_format": "raw", "checksum": "780939ee6b6bc1132a7a203d72a0a210", "id": 6, "size": 120313}]}
-------------
http://glance-host-ip:9292/images/detail
{"images": [{"status": "active", "name": "My Image 1", "deleted": false, "container_format": "ovf", "created_at": "2011-04-26T14:32:53.141262", "disk_format": "raw", "updated_at": "2011-04-26T14:32:53.243560", "id": 6, "location": "file:///var/lib/glance/images/6", "checksum": "780939ee6b6bc1132a7a203d72a0a210", "is_public": true, "deleted_at": null, "properties": {}, "size": 120313}]}
-------------
I do not see image being returned as part of the RESTful GET method response. Where is the image?

Please help!

Question information

Language:
English Edit question
Status:
Answered
For:
Glance Edit question
Assignee:
No assignee Edit question
Last query:
2011-05-03
Last reply:
2011-05-31
Jay Pipes (jaypipes) said : #1

Steve, please read the spec at http://glance.openstack.org/glanceapi.html. :)

GET /images

returns a JSON structure describing the public images.

GET /images/<ID>

returns the image files themselves, with image metadata in the HTTP headers.

Cheers!
jay

Marek Goldmann (mgoldman) said : #2

Jay,

The API is inconsistent IMHO.

GET /images/<ID>

should return the image description in JSON format.

GET /images/<ID>/data

should return the actual data.

--Marek

Jay Pipes (jaypipes) said : #3

Hi Marek,

I appreciate your comments, and perhaps we can look at changing this in a 2.0 API. However, I would like to note that Glance's API is virtually identical to that of Swift. We took our cues for using HEAD /images/<ID> and GET /images/<ID> directly from there...

Can I ask, what client/programming language are you using?

Cheers!
-jay

Can you help with this problem?

Provide an answer of your own, or ask steve chu for more information if necessary.

To post a message you must log in.