ServerSnapshot
(Created page with "This article describes operations for getting details of a server snapshot. Other types of operations on a server snapshot are: ServerSnapshotCreate, [[ServerSnapshotActi...") |
(→GET /servers/server_id/snapshots/snapshot_id) |
||
Line 3: | Line 3: | ||
='''GET''' /servers/'''server_id'''/snapshots/'''snapshot_id'''= | ='''GET''' /servers/'''server_id'''/snapshots/'''snapshot_id'''= | ||
− | This operation will return details of a single server. | + | This operation will return snapshot details of a single server. |
== Parameters == | == Parameters == |
Revision as of 19:27, 12 April 2013
This article describes operations for getting details of a server snapshot. Other types of operations on a server snapshot are: ServerSnapshotCreate, ServerSnapshotActions, etc.
Contents |
GET /servers/server_id/snapshots/snapshot_id
This operation will return snapshot details of a single server.
Parameters
- server_id
- The unique identifier of the server.
- snapshot_id
- The unique identifier of the server snapshot to get
Result
JSON
{ "snapshot": { "id": "{snapshot_id}", "name": "{snapshot_name}" "description": "{description}", "status": "{status}", "guid": "{guid}", "parent_guid": "{parent_guid}", "relation_guid": "{relation_guid}", "create_time": "{create_time}", "links": [{"href": "http://{api_server}/servers/{server_id}/snapshots/{snapshot_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; Values: 'ACTIVE', 'BUILD', 'DELETED'
- create_time - string
- Created time of this server snapshot
- links - array
- Hypermedia for this resource.
Response Codes
- Success
- OK (200)
- Failure
-Unauthorized (401) : 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. -ItemNotFound (404) : The resource requested is not found.
Examples
Successfully get server details
- GET http(s)://{api_server}/servers/snapshots/snapshot_jello614636-USOTE-0214_2012Jul19_m5yf9Bz8a
- Request Headers:
Content-Type:application/json Charset=UTF-8 Authorization:Base64-encoded username & password string
- Response: OK (200):
{ "snapshot": { "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://{api_server}/servers/jello614636-USOTE-0214/snapshots/snapshot_jello614636-USOTE-0214_2012Jul19_m5yf9Bz8a/", "rel": "self"}], }
- When a server is in pending status (has not completed the provisioning process), the creation timestamp and hostId that are returned will be empty strings.
Failure while trying to get server details without proper authorization - Response: Unauthorized (401):
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.
Failure while trying to get server details for a non-existent server id - Response: ItemNotFound (404):
{ "itemNotFound": { "message": "Resource not found", "code": 404, "details": "", "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf" } }
DELETE /servers/{server_id}/snapshots/snapshot_id
This operation will delete a single server snapshot.
Parameters
- snapshot_id - string
- Id of the server snapshot to delete.
Response Codes
- Success
- HTTP/1.1 202 Accepted or HTTP/1.1 204 No Content
- 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.
- HTTP/1.1 404 Not Found : The resource requested is not found.
Examples
Successfully delete a specific server
- DELETE http(s)://{api_server}/servers/123/snapshots/567
Response Code:
HTTP/1.1 202 Accepted
Failure while trying to update a non-existent server
- DELETE http(s)://{api_server}/servers/123/snapshots/{fake_server_id}
Response Code:
HTTP/1.1 404 Not Found