Glance RESTful GET method does not return image.

asked 2011-05-03 16:38:39 -0600

steve-chu gravatar image


{"images": [{"name": "My Image 1", "container_format": "ovf", "disk_format": "raw", "checksum": "780939ee6b6bc1132a7a203d72a0a210", "id": 6, "size": 120313}]}


{"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!

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2011-05-03 18:13:53 -0600

jaypipes gravatar image

Steve, please read the spec at . :)

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

edit flag offensive delete link more

answered 2011-05-31 08:01:57 -0600


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.


edit flag offensive delete link more

answered 2011-05-31 14:06:23 -0600

jaypipes gravatar image

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

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2011-05-03 16:38:39 -0600

Seen: 79 times

Last updated: May 31 '11