---
site_name: Deltacloud API
title: Storage snapshots
---
A storage_snapshot captures the point-in-time state of a storage_volume. Each snapshot has a created timestamp, and a storage_volume attribute referring to the volume from which the snapshot was made.
To list all available storage snapshots use call GET /api/storage_snapshots. For Amazon EC2 this list includes any snapshots that are available to the requesting client account, including those that may not have been created by that account. As this list is very long the example below shows only part of the response:
Example request:
GET /api/storage_snapshots?format=xml HTTP/1.1 Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa== User-Agent: curl/7.20.1 (i386-redhat-linux-gnu) Host: localhost:3001 Accept: */*
Server response:
HTTP/1.1 200 OK Content-Type: application/xml Date: Thu, 28 Jul 2011 22:08:36 GMT Content-Length: 156897 <?xml version='1.0' encoding='utf-8' ?> <storage_snapshots> <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-45b8d024' id='snap-45b8d024'> <created>Thu Jul 28 21:54:19 UTC 2011</created> <storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'></storage_volume> </storage_snapshot> <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-d5a1c9b4' id='snap-d5a1c9b4'> <created>Thu Jul 28 21:46:12 UTC 2011</created> <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'></storage_volume> </storage_snapshot> <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-dda6cebc' id='snap-dda6cebc'> <created>Thu Jul 28 21:51:55 UTC 2011</created> <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'></storage_volume> </storage_snapshot> <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-d010f6b9' id='snap-d010f6b9'> <created>Mon Oct 20 18:23:59 UTC 2008</created> <storage_volume href='http://localhost:3001/api/storage_volumes/vol-351efb5c' id='vol-351efb5c'></storage_volume> </storage_snapshot> <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-a310f6ca' id='snap-a310f6ca'> <created>Mon Oct 20 18:25:53 UTC 2008</created> <storage_volume href='http://localhost:3001/api/storage_volumes/vol-001efb69' id='vol-001efb69'></storage_volume> </storage_snapshot> (...) </storage_snapshots>
To get all details for a specified storage snapshot, as shown below, use call GET /api/storage_snapshots/:id.
Example request:
GET /api/storage_snapshots/snap-45b8d024?format=xml HTTP/1.1 Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa== User-Agent: curl/7.20.1 (i386-redhat-linux-gnu) Host: localhost:3001 Accept: */*
Server response:
HTTP/1.1 200 OK Content-Type: application/xml Date: Thu, 28 Jul 2011 22:08:36 GMT Content-Length: 329 <?xml version='1.0' encoding='utf-8' ?> <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-45b8d024' id='snap-45b8d024'> <created>Thu Jul 28 21:54:19 UTC 2011</created> <storage_volume href='http://localhost:3001/api/storage_volumes/vol-0bc0de60' id='vol-0bc0de60'></storage_volume> </storage_snapshot>
To create a new storage_snapshot use call POST /api/storage_snapshots. Clients must specify the storage_volume from which the snapshot is created by supplying the volume_id parameter. The Deltacloud server responds with HTTP 201 Created after a succesful operation and provides details of the new storage_snapshot. Clients may specify operation parameters as multipart/form-data, or as application/x-www-form-urlencoded data:
Example request:
POST /api/storage_snapshots?format=xml HTTP/1.1 Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa== User-Agent: curl/7.20.1 (i386-redhat-linux-gnu) Host: localhost:3001 Accept: */* Content-Length: 22 Content-Type: application/x-www-form-urlencoded volume_id=vol-99fbe5f2
Server response:
HTTP/1.1 201 Created Date: Thu, 28 Jul 2011 21:46:48 GMT Content-Length: 329 <?xml version='1.0' encoding='utf-8' ?> <storage_snapshot href='http://localhost:3001/api/storage_snapshots/snap-d5a1c9b4' id='snap-d5a1c9b4'> <created>Thu Jul 28 21:46:12 UTC 2011</created> <storage_volume href='http://localhost:3001/api/storage_volumes/vol-99fbe5f2' id='vol-99fbe5f2'></storage_volume> </storage_snapshot>
To delete the specified storage_snapshot use call DELETE /api/storage_snapshots/:id. The operation returns a HTTP 204 No Content after a succesful operation:
Example request:
DELETE /api/storage_snapshots/snap-dda6cebc?format=xml HTTP/1.1 Authorization: Basic AU1J3UB2121Afd1DdyQWxLaTYTmJMNF4zTXBoRGdhMDh2RUw5ZDAN9zVXVa== User-Agent: curl/7.20.1 (i386-redhat-linux-gnu) Host: localhost:3001 Accept: */*
Server response:
HTTP/1.1 204 No Content Date: Thu, 28 Jul 2011 22:26:07 GMTBlob storage