Snapshots
Snapshot Schema
id
String - A unique identifier for each snapshot. This is automatically generated.name
String - The human-readable name for the snapshot.size
BigInt (String) - The storage size of this snapshot given in bytes.region
String - The identifier for the region this snapshot exists in (eg.ARC-IS-HAF-1
).status
String - The snapshot status. Possible values arecreating
,active
, anderror
.resource_id
String - The id of the resource (e.g. instance) that was snapshotted.created_at
String - A time value given in ISO8601 combined date and time format that represents when the snapshot was created.
List Snapshots
Lists all snapshots of an account.
GET /compute/v1/snapshots (HTTP 200 - OK)
Query parameters
per_page
Integer Optional - A positive integer lower than or equal to 100 to select the number of items to return (default: 50).page
Integer Optional - A positive integer to choose the page to return.
Response body
The response will be a JSON object with pagination details and a key called snapshots
.
This will be set to an array of snapshot objects, each of which will contain the instance snapshot object, see Snapshot Schema:
{
"snapshots": [
{
"id": "ff942497-62f6-4a9d-8dc4-3766ebc2b8a2",
"name": "snapshot name",
"size": "85899345920",
"region": "ARC-IS-HAF-1",
"status": "active",
"resource_id": "<snapshotted-resource-id>",
"created_at": "2020-04-06T10:47:46.786Z"
}
],
"total_count": 1,
"page": 1,
"per_page": 50
}
Get Snapshot
Get details of one snapshot with a given ID.
GET /compute/v1/snapshots/<snapshot_id> (HTTP 200 - OK)
Path parameters:
snapshot_id
String - Snapshot id
Response body
The response will be a JSON object that contains the snapshot
attributes, see Snapshot Schema:
{
"snapshot": {
"id": "ff942497-62f6-4a9d-8dc4-3766ebc2b8a2",
"name": "snapshot name",
"size": "85899345920",
"region": "ARC-IS-HAF-1",
"status": "active",
"resource_id": "<snapshotted-resource-id>",
"created_at": "2020-04-06T10:47:46.786Z"
}
}
Delete a Snapshot
Delete a snapshot with the given ID
DELETE /compute/v1/snapshots/<snapshot_id> (HTTP 204 - No content)
Path parameters:
snapshot_id
String - Snapshot id
Examples (cURL)
# List all snapshots
curl -H "X-Auth-Token: $TOKEN" \
"https://api.genesiscloud.com/compute/v1/snapshots"
# Get a snapshot by id
curl -H "X-Auth-Token: $TOKEN" \
"https://api.genesiscloud.com/compute/v1/snapshots/<snapshot_id>"
# Delete a snapshot by id
curl -H "X-Auth-Token: $TOKEN" \
-X DELETE "https://api.genesiscloud.com/compute/v1/snapshots/<snapshot_id>"