ImageListDetails
From Hostway API Documentation
Revision as of 12:56, 24 May 2013 by Mike.robski (Talk | contribs)
GET /images/detail?name={imageName}&status={imageStatus}&type={imageType}&zone={zoneId}
This operation will list all images including their details.
Contents |
Request
GET /images/detail?name={imageName}&status={imageStatus}&type={imageType}&zone={zoneId}
URI Parameters
- name - string
- Optional image name to search for.
- status - string
- Optional Image status to search for. Values: ACTIVE, SAVING, DELETED.
- type - string
- Optional type of the image to search for. Values: BASE, SERVER.
- zone - string
- Optional the Zone where the image is available.
Response
Status Code
- 200 OK
- Success
- 401 Unauthorized
- Failure - This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
Response Body
{ "images":[ { "status":"{status}", "updated":null, "name":"{display_image_name}", "links":[ {"href":"https://api.hostway.com/images/{image_id}/", "rel":"self"}, {"href":"https://api.hostway.com/images/{image_id}/", "rel":"bookmark"} ], "created":"yyyy-mm-ddThh:mm:ss", "id":"{image_id}", "zones": ["{zone_id}"] }, { "status":"{status}", "updated":null, "name":"{display_image_name}", "links":[ {"href":"https://api.hostway.com/images/{image_id}/", "rel":"self"}, {"href":"https://api.hostway.com/images/{image_id}/", "rel":"bookmark"} ], "created":"yyyy-mm-ddThh:mm:ss", "id":"{image_id}", "zones": ["{zone_id_1}", "{zone_id_2}"] } ] }
Parameters
- id - string
- Unique identifier for this image.
- links - array
- Hypermedia for this resource.
- name - string
- Display name for this image.
- status - string
- Current state of this image. Valid values are ACTIVE, SAVING, DELETED.
- ACTIVE - Image is ready to be used.
- SAVING - Image is being uploaded or saved from a running Server instance.
- DELETED - Image was recently deleted or is in the process of being deleted.
- created - string
- The date and time the image was created. ISO 8601 format, YYYY-MM-DDTHH:MM:SS.
- updated
- Unused always null.
- zones
- Zones where the image is available.
Examples
Successfully list image details
Request
GET /images/detail Authorization: Basic {Base64-encoded username:password string}
Response
200 OK { "images": [ { "status": "ACTIVE", "updated": null, "name": "test_public_image", "links": [ {"href": "https://api.hostway.com/images/123/", "rel": "self"}, {"href": "https://api.hostway.com/images/123/", "rel": "bookmark"} ], "created": "2011-11-09T03:19:48", "id": "123", "zones": ["AUS001"] }, { "status": "SAVING", "updated": null, "name": "test_debian_image", "links": [ {"href": "https://api.hostway.com/images/233/", "rel": "self"}, {"href": "https://api.hostway.com/images/233/", "rel": "bookmark"} ], "created": "2011-09-30T02:38:57", "id": "233", "zones": ["AUS001"] }, { "status": "ACTIVE", "updated": null, "name": "test_private_image", "links": [ {"href": "https://api.hostway.com/images/145/", "rel": "self"}, {"href": "https://api.hostway.com/images/145/", "rel": "bookmark"} ], "created": "2011-11-09T03:19:01", "id": "145", "zones": ["AUS001"] } ] }
Failure while trying to make an unauthorized request
Request
GET /images/detail Authorization: Basic {invalid authorization}
Response
401 Unauthorized
See also