Getting StartedExamplesImagesInstancesSSH KeysSecurity GroupsSnapshotsList snapshotsGet snapshotDelete a snapshotExamples (cURL)Volumes

Snapshots

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:

  • id String - A unique identifier for each snapshot. This is automatically generated.
  • name String - The human-readable name set for the snapshot.
  • size BigInt (String) - The storage size of this snapshot given in bytes.
  • status String - The snapshot status. Possible values are creating, active, and error.
  • 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.
{
"snapshots":[
{
"id":"ff942497-62f6-4a9d-8dc4-3766ebc2b8a2",
"name":"snapshot name",
"size":"85899345920",
"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:

  • id String - A unique identifier for each snapshot. This is automatically generated.
  • name String - The human-readable name set for the snapshot.
  • size BigInt (String) - The storage size of this snapshot given in bytes.
  • status String - The snapshot status. Possible values are creating, active, and error.
  • 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.
{
"snapshot": {
"id": "ff942497-62f6-4a9d-8dc4-3766ebc2b8a2",
"name": "snapshot name",
"size": "85899345920",
"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 --request DELETE \
-H 'X-Auth-Token: <TOKEN>' \
'https://api.genesiscloud.com/compute/v1/snapshots/<snapshot_id>