ServerSnapshot
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 /accounts/{accountId}/flexcloud/servers/{server_id}/snapshots/{snapshot_id}
This operation will return details of a single server.
Parameters
- accountId - string
- The selected account Id.
- 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}/accounts/{accountId}/flexcloud/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}/accounts/{accountId}/flexcloud/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}/accounts/{accountId}/flexcloud/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 /accounts/{accountId}/flexcloud/servers/{server_id}/snapshots/{snapshot_id}
This operation will delete a single server snapshot.
Parameters
- accountId - string
- The selected account Id.
- server_id - string
- The selected server Id.
- 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}/accounts/{accountId}/flexcloud/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}/accounts/{accountId}/flexcloud/servers/123/snapshots/{fake_server_id}
Response Code:
HTTP/1.1 404 Not Found
Failure while trying to update server with a wrong account number
- DELETE http(s)://{api_server}/accounts/fake/flexcloud/servers/123/snapshots/567
Response Code:
HTTP/1.1 404 Not Found
Alternative URI /servers/{server_id}/snapshots/{snapshot_id}
An alternative way to execute this call is to omit the accountId portion of the URI. In this case the system assumes the request is executed for the account identified in the authorization header.
GET /servers/{server_id}/snapshots/{snapshot_id}