ServerSnapshotList

(Difference between revisions)
Jump to: navigation, search
(Created page with "This operation returns a list of all server snapshots. ='''GET''' /servers/'''server_id'''/snapshots/'''snapshot_id'''/= == Parameters == ; server_id : Th...")
 
Line 1: Line 1:
This operation returns a list of all [[ServerSnapshot|server snapshots]].
+
This operation will return a list of all [[ServerSnapshot|server snapshots]].
  
 
='''GET''' /servers/'''server_id'''/snapshots/'''snapshot_id'''/=
 
='''GET''' /servers/'''server_id'''/snapshots/'''snapshot_id'''/=

Revision as of 19:23, 12 April 2013

This operation will return a list of all server snapshots.

Contents

GET /servers/server_id/snapshots/snapshot_id/

Parameters

server_id
The unique identifier of the server.
snapshot_id
The unique identifier of the server snapshot

Result

JSON

{
            'snapshots': [
                {
                    "id": "{snapshot_id}",
                    "name": "{display_name}",
                    "description": "{description}",
                    "guid": "{guid}",
                    "parent_guid": "{parent_guid}",
                    "relation_guid": "{releation_guid}",
                    "status": '{status}',
                    "create_time": "{create_time}",
                    "links": [{'href': 'http://{api_server}/servers/{server_id}/', 'rel': 'self'}],
                },
                {
                    "id": "{snapshot_id}",
                    "name": "{display_name}",
                    "description": "{description}",
                    "guid": "{guid}",
                    "parent_guid": "{parent_guid}",
                    "relation_guid": "{releation_guid}",
                    "status": '{status}',
                    "create_time": "{create_time}",
                    "links": [{'href': 'http://{api_server}/servers/{server_id}/', 'rel': 'self'}],
                }
            ]
        }
}
id - string
Unique identifier for this server snapshot.
name - string
Display name of this server snapshot.
description - string
Description of this server snapshot.
guid - string
GUID of this server snapshot.
parent_guid - string
Parent GUID of this server snapshot.
relation_guid - string
Relation GUID of this server snapshot.
status - string
Status of this server snapshot; one out of 'ACTIVE', 'BUILD', 'DELETED'
create_time - string
Created time of this server snapshot
links - array
Hypermedia for this resource.

Response Codes

Success
HTTP/1.1 202 ACCEPTED
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 server snapshots

GET http(s)://{api_server}/servers/{server_id}/snapshots/


Request Headers:

   Content-Type:application/json
   Charset=UTF-8
   Authorization:Base64-encoded username & password string

Response Code:

HTTP/1.1 200 OK

Response Body:

{
    'snapshots': [
        { 
            "id": "snapshot_jello614636-USOTE-0214_2012Jul18_Fkmm7a2ZM", 
            "name": "fitnesse snapshot
            "description": "fitnesse test snapshot", 
            "status": "ACTIVE", 
            "guid": "5c51c729-2cbe-4eb8-a116-6fef5a5f5c12", 
            "parent_guid": "e039d899-4207-4984-a408-7400a3eaf27b", 
            "relation_guid": "491aee4b-34bc-45e5-ac47-7ef9fb96c4c4", 
            "create_time": "2012-07-18 15:48:12", 
            "links": [
                {
                    "href": "http://{api_server}/servers/{server_id}/snapshots/snapshot_jello614636-USOTE-0214_2012Jul18_Fkmm7a2ZM/", 
                    "rel": "self"
                }] 
        },
        {
            "id": "snapshot_jello614636-USOTE-0214_2012Jul19_Hzxp5LHGz", 
            "name": "fitnesse snapshot"
            "description": "fitnesse test snapshot", 
            "status": "DELETED", 
            "guid": "cdc39fc9-cda9-4eae-aeb9-274e5f8d1642", 
            "parent_guid": "491aee4b-34bc-45e5-ac47-7ef9fb96c4c4", 
            "relation_guid": "b4833231-b685-415b-9977-42d7424d6646", 
            "create_time": "2012-07-19 12:36:55", 
            "links": [
                {
                    "href": "http://10.10.150.59:6543/servers/{server_id}/snapshots/snapshot_jello614636-USOTE-0214_2012Jul19_Hzxp5LHGz/", 
                    "rel": "self"
                }], 
        },
        { 
            "id": "snapshot_jello614636-USOTE-0214_2012Jul19_m5yf9Bz8a",  
            "name": "fitnesse snapshot"
            "description": "fitnesse test snapshot", 
            "status": "ACTIVE", 
            "guid": "a4e76fdf-8696-4848-ba81-cfe090e1401d", 
            "parent_guid": "491aee4b-34bc-45e5-ac47-7ef9fb96c4c4", 
            "relation_guid": "42130087-f34c-4823-885d-8a908017ed8d", 
            "create_time": "2012-07-19 16:28:09", 
            "links": [
                {
                    "href":  "http://10.10.150.59:6543/servers/{server_id}/snapshots/snapshot_jello614636-USOTE-0214_2012Jul19_m5yf9Bz8a/", 
                    "rel": "self"
                }], 
        }
   ]
}

Failure while trying to make unauthorized access

GET http(s)://{api_server}/servers/{server_id}/snapshots/

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