ImageListDetails
(Difference between revisions)
Line 7: | Line 7: | ||
== Result == | == Result == | ||
=== JSON === | === JSON === | ||
− | |||
− | |||
<big><source lang="javascript"> | <big><source lang="javascript"> | ||
{ | { | ||
"images":[ | "images":[ | ||
{ | { | ||
− | "status":" | + | "status":"{status}", |
"updated":null, | "updated":null, | ||
− | "name":" | + | "name":"{display_image_name}", |
"links":[ | "links":[ | ||
{ | { | ||
− | "href":"http:// | + | "href":"http://{server_name}/images/{image_id}/", |
"rel":"self" | "rel":"self" | ||
}, | }, | ||
{ | { | ||
− | "href":"http:// | + | "href":"http://{server_name}/images/{image_id}/", |
"rel":"bookmark" | "rel":"bookmark" | ||
} | } | ||
], | ], | ||
"created":"2011-09-30T02:38:57", | "created":"2011-09-30T02:38:57", | ||
− | "id":" | + | "id":"{image_id}" |
}, | }, | ||
{ | { | ||
− | "status":" | + | "status":"{status}", |
"updated":null, | "updated":null, | ||
− | "name":" | + | "name":"{display_image_name}", |
"links":[ | "links":[ | ||
{ | { | ||
− | "href":"http:// | + | "href":"http://{server_name}/images/{image_id}/", |
"rel":"self" | "rel":"self" | ||
}, | }, | ||
{ | { | ||
− | "href":"http:// | + | "href":"http://{server_name}/images/{image_id}/", |
"rel":"bookmark" | "rel":"bookmark" | ||
} | } | ||
], | ], | ||
"created":"2011-12-27T02:59:27", | "created":"2011-12-27T02:59:27", | ||
− | "id":" | + | "id":"{image_id}" |
} | } | ||
] | ] | ||
Line 58: | Line 56: | ||
; name - ''string'' | ; name - ''string'' | ||
− | : | + | : Display name for this image. |
; status - ''string'' | ; status - ''string'' | ||
Line 71: | Line 69: | ||
; updated | ; updated | ||
: Unused always null. | : Unused always null. | ||
+ | |||
+ | == Response Codes == | ||
+ | ; Success: HTTP/1.1 200 OK | ||
+ | |||
+ | ; Failure: HTTP/1.1 401 Unauthorized - 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. | ||
+ | |||
+ | == Examples == | ||
+ | '''List image including details''' | ||
+ | :'''GET''' <nowiki>http://{api_url}/images/detail</nowiki> | ||
+ | |||
+ | ''Request Headers:'' | ||
+ | Content-Type:application/json | ||
+ | Charset=UTF-8 | ||
+ | Authorization:Base64-encoded username & password string | ||
+ | |||
+ | ''Response Code:'' | ||
+ | <pre>HTTP/1.1 200 OK</pre> | ||
+ | |||
+ | ''Response Body:'' | ||
+ | <big><source lang="javascript"> | ||
+ | { | ||
+ | "images": [ | ||
+ | { | ||
+ | "status": "ACTIVE", | ||
+ | "updated": null, | ||
+ | "name": "dimitrov_public_image", | ||
+ | "links": [ | ||
+ | { | ||
+ | "href": "http://{api_server}/images/vmi2011Nov08_2D2fLloqt/", | ||
+ | "rel": "self" | ||
+ | }, | ||
+ | { | ||
+ | "href": "http://{api_server}/images/vmi2011Nov08_2D2fLloqt/", | ||
+ | "rel": "bookmark" | ||
+ | } | ||
+ | ], | ||
+ | "created": "2011-11-09T03:19:48", | ||
+ | "id": "vmi2011Nov08_2D2fLloqt" | ||
+ | }, | ||
+ | { | ||
+ | "status": "SAVING", | ||
+ | "updated": null, | ||
+ | "name": "debian", | ||
+ | "links": [ | ||
+ | { | ||
+ | "href": "http://{api_server}/images/debian_lenny_template/", | ||
+ | "rel": "self" | ||
+ | }, | ||
+ | { | ||
+ | "href": "http://{api_server}/images/debian_lenny_template/", | ||
+ | "rel": "bookmark" | ||
+ | } | ||
+ | ], | ||
+ | "created": "2011-09-30T02:38:57", | ||
+ | "id": "debian_lenny_template" | ||
+ | }, | ||
+ | { | ||
+ | "status": "SAVING", | ||
+ | "updated": null, | ||
+ | "name": "test by shimde", | ||
+ | "links": [ | ||
+ | { | ||
+ | "href": "http://{api_server}/images/vmi2011Dec26_2C7D8Dbur/", | ||
+ | "rel": "self" | ||
+ | }, | ||
+ | { | ||
+ | "href": "http://{api_server}/images/vmi2011Dec26_2C7D8Dbur/", | ||
+ | "rel": "bookmark" | ||
+ | } | ||
+ | ], | ||
+ | "created": "2011-12-27T02:59:27", | ||
+ | "id": "vmi2011Dec26_2C7D8Dbur" | ||
+ | }, | ||
+ | { | ||
+ | "status": "ACTIVE", | ||
+ | "updated": null, | ||
+ | "name": "jello_private_image", | ||
+ | "links": [ | ||
+ | { | ||
+ | "href": "http://{api_server}/images/vmi2011Nov08_xBHzvNEy8/", | ||
+ | "rel": "self" | ||
+ | }, | ||
+ | { | ||
+ | "href": "http://{api_server}/images/vmi2011Nov08_xBHzvNEy8/", | ||
+ | "rel": "bookmark" | ||
+ | } | ||
+ | ], | ||
+ | "created": "2011-11-09T03:19:01", | ||
+ | "id": "vmi2011Nov08_xBHzvNEy8" | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </source></big> | ||
+ | |||
+ | |||
+ | '''Unauthorized request''' | ||
+ | :'''GET''' <nowiki>http://{api_url}/images/detail</nowiki> | ||
+ | |||
+ | ''Request Headers:'' | ||
+ | Content-Type:application/json | ||
+ | |||
+ | ''Response Code:'' | ||
+ | <pre>HTTP/1.1 401 Unauthorized</pre> | ||
+ | |||
+ | ''Response Body:'' | ||
+ | 401 Unauthorized | ||
+ | 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. | ||
+ | |||
<!-- THIS CODE ENABLES DISQUS COMMENTS ON THE PAGE - DELETE TO DISABLE COMMENTING--> | <!-- THIS CODE ENABLES DISQUS COMMENTS ON THE PAGE - DELETE TO DISABLE COMMENTING--> |
Revision as of 18:26, 12 April 2012
This operation will list all images including their details.
GET /images/detail
Contents |
Parameters
Result
JSON
{ "images":[ { "status":"{status}", "updated":null, "name":"{display_image_name}", "links":[ { "href":"http://{server_name}/images/{image_id}/", "rel":"self" }, { "href":"http://{server_name}/images/{image_id}/", "rel":"bookmark" } ], "created":"2011-09-30T02:38:57", "id":"{image_id}" }, { "status":"{status}", "updated":null, "name":"{display_image_name}", "links":[ { "href":"http://{server_name}/images/{image_id}/", "rel":"self" }, { "href":"http://{server_name}/images/{image_id}/", "rel":"bookmark" } ], "created":"2011-12-27T02:59:27", "id":"{image_id}" } ] }
- 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.
Response Codes
- Success
- HTTP/1.1 200 OK
- Failure
- HTTP/1.1 401 Unauthorized - 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.
Examples
List image including details
- GET http://{api_url}/images/detail
Request Headers:
Content-Type:application/json Charset=UTF-8 Authorization:Base64-encoded username & password string
Response Code:
HTTP/1.1 200 OK
Response Body:
{ "images": [ { "status": "ACTIVE", "updated": null, "name": "dimitrov_public_image", "links": [ { "href": "http://{api_server}/images/vmi2011Nov08_2D2fLloqt/", "rel": "self" }, { "href": "http://{api_server}/images/vmi2011Nov08_2D2fLloqt/", "rel": "bookmark" } ], "created": "2011-11-09T03:19:48", "id": "vmi2011Nov08_2D2fLloqt" }, { "status": "SAVING", "updated": null, "name": "debian", "links": [ { "href": "http://{api_server}/images/debian_lenny_template/", "rel": "self" }, { "href": "http://{api_server}/images/debian_lenny_template/", "rel": "bookmark" } ], "created": "2011-09-30T02:38:57", "id": "debian_lenny_template" }, { "status": "SAVING", "updated": null, "name": "test by shimde", "links": [ { "href": "http://{api_server}/images/vmi2011Dec26_2C7D8Dbur/", "rel": "self" }, { "href": "http://{api_server}/images/vmi2011Dec26_2C7D8Dbur/", "rel": "bookmark" } ], "created": "2011-12-27T02:59:27", "id": "vmi2011Dec26_2C7D8Dbur" }, { "status": "ACTIVE", "updated": null, "name": "jello_private_image", "links": [ { "href": "http://{api_server}/images/vmi2011Nov08_xBHzvNEy8/", "rel": "self" }, { "href": "http://{api_server}/images/vmi2011Nov08_xBHzvNEy8/", "rel": "bookmark" } ], "created": "2011-11-09T03:19:01", "id": "vmi2011Nov08_xBHzvNEy8" } ] }
Unauthorized request
- GET http://{api_url}/images/detail
Request Headers:
Content-Type:application/json
Response Code:
HTTP/1.1 401 Unauthorized
Response Body:
401 Unauthorized 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.