Volumes: List, Delete and Snapshot

Volumes

You can interact with volumes in your account by requesting /api/volumes, we'll leave out the standard headers (token and accept type) for brevity and assume they were assigned to a local variable called headers, see Fundamentals and Authentication on how to specify them

RestClient.get("https://manage.scalarium.com/api/volumes', headers)

Please be aware that only Account Admins can interact with volumes. When we speak of the volumes ID we always mean the internal Scalarium ID.

List All

When you request /api/volumes you get a list of all volumes in your account.

RestClient.get("https://manage.scalarium.com/api/volumes', headers)

Show Details on Volume

When you request /api/volumes/VOL-ID you get detailed information on one volume:

RestClient.get("https://manage.scalarium.com/api/volumes/VOL-ID', headers)

A response would look like this:

{
  "id":"5054bf92fbb30e27d08140a2df7d49b0",
  "aws_instance_id":"i-45c17e02",
  "raid_array_id":null,
  "volume_id":"vol-56705b39",
  "availability_zone":
  "us-west-1c",
  "status":"in-use",
  "attachment_status":"attached",
  "created_at":"2011/08/26 08:46:13 +0000",
  "attached_at":"2011/10/21 02:01:22 +0000",
  "updated_at":"2011/10/21 17:58:34 +0000",
  "device":null,
  "size":2,
  "credential_id":"3fbef44fef7e50dd2ad69c8a5da0d853",
  "name":"Synced from AWS",
  "mount_point":null,
  "snapshot_id":null,
  "instance_id":null
}

List Snapshots

You can list all snapshots of a volume when you request /api/volumes/VOL-ID/snapshots:

RestClient.get("https://manage.scalarium.com/api/volumes/VOL-ID/snapshots', headers)

An example result would look like this:

[
  {
   "volume_id": "vol-56705b39",
   "status":"completed",
   "progress":"100%",
   "started_at":"2012/01/02 16:53:19 +0000",
   "id":"snap-26050a46"
  },
  {
     "volume_id":"vol-56705b39",
     "status":"completed",
     "progress":"70%",
     "started_at":"2012/01/02 16:53:06 +0000",
     "id":"snap-7e050a1e"
  }
]

Create Snapshot

You can create a snapshot of a volume by POSTing to /api/volumes/VOL-ID/snapshot:

RestClient.post("https://manage.scalarium.com/api/volumes/VOL-ID/snapshot', headers)