ImageListDetails

(Difference between revisions)
Jump to: navigation, search
(Examples)
Line 4: Line 4:
  
 
== Parameters ==
 
== Parameters ==
No parameters
 
  
 
== Result ==
 
== Result ==
 
=== JSON ===
 
=== JSON ===
<big><source lang="javascript">
+
<nowiki>
 
{
 
{
 
   "images":[
 
   "images":[
Line 47: Line 46:
 
   ]
 
   ]
 
}
 
}
</source></big>
+
</nowiki>
 
+
  
 
; id - ''string''
 
; id - ''string''
Line 77: Line 75:
  
 
== Examples ==
 
== Examples ==
'''List image including details'''
+
'''Successfully list image details'''
 
:'''GET''' <nowiki>http://{api_server}/images/detail</nowiki>
 
:'''GET''' <nowiki>http://{api_server}/images/detail</nowiki>
  
Line 89: Line 87:
  
 
''Response Body:''
 
''Response Body:''
<big><source lang="javascript">
+
<nowiki>
 
     {
 
     {
 
       "images": [
 
       "images": [
Line 145: Line 143:
 
         ]
 
         ]
 
     }
 
     }
</source></big>
+
</nowiki>
  
  
'''Unauthorized request'''
+
'''Failure while trying to make an unauthorized request'''
 
:'''GET''' <nowiki>http://{api_server}/images/detail</nowiki>
 
:'''GET''' <nowiki>http://{api_server}/images/detail</nowiki>
  
 
''Request Headers:''
 
''Request Headers:''
 
     Content-Type:application/json
 
     Content-Type:application/json
 +
    Charset=UTF-8
 +
    Authorization:Base64-encoded <span style="color:red">fake_authentication_string</span>
  
 
''Response Code:''
 
''Response Code:''

Revision as of 14:57, 4 July 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://{api_server}/images/{image_id}/",
               "rel":"self"
            },
            {
               "href":"http://{api_server}/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://{api_server}/images/{image_id}/",
               "rel":"self"
            },
            {
               "href":"http://{api_server}/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

Successfully list image details

GET http://{api_server}/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": "test_public_image", 
             "links": [
                {
                   "href": "http://{api_server}/images/123/", 
                   "rel": "self"
                }, 
                {
                   "href": "http://{api_server}/images/123/", 
                   "rel": "bookmark"
                }
              ], 
              "created": "2011-11-09T03:19:48", 
              "id": "123"
           },
           {
              "status": "SAVING", 
              "updated": null, 
              "name": "test_debian_image", 
              "links": [
                 {
                    "href": "http://{api_server}/images/233/", 
                    "rel": "self"
                 }, 
                 {
                    "href": "http://{api_server}/images/233/", 
                    "rel": "bookmark"
                 }
              ], 
              "created": "2011-09-30T02:38:57", 
              "id": "233"
           }, 
           {
              "status": "ACTIVE", 
              "updated": null, 
              "name": "test_private_image", 
              "links": [
                 {
                    "href": "http://{api_server}/images/145/", 
                    "rel": "self"
                 }, 
                 {
                    "href": "http://{api_server}/images/145/", 
                    "rel": "bookmark"
                 }
              ], 
              "created": "2011-11-09T03:19:01", 
              "id": "145"
            }
        ]
    }


Failure while trying to make an unauthorized request

GET http://{api_server}/images/detail

Request Headers:

   Content-Type:application/json
   Charset=UTF-8
   Authorization:Base64-encoded fake_authentication_string

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.


blog comments powered by Disqus


Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox