3.42.8. Create snapshot

 
MethodURIDescription
POST/v1.1/{tenant_id}/os-snapshots

Creates a snapshot.

Normal response codes: 201

 3.42.8.1. Request

This table shows the URI parameters for the create snapshot request:

NameTypeDescription

{tenant_id}

​String

The unique identifier of the tenant or account.

 

Example 3.355. Create snapshot: JSON request

{
    "snapshot": {
        "display_name": "snap-001",
        "display_description": "Daily backup",
        "volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
        "force": true
     }
}

 

Example 3.356. Create snapshot: XML request

<?xml version="1.0" encoding="UTF-8"?>
<snapshot xmlns="http://docs.openstack.org/volume/api/v1"
          name="snap-001"
          display_name="snap-001"
          display_description="Daily backup"
          volume_id="521752a6-acf6-4b2d-bc7a-119f9148cd8c"
          force="true" />

This operation does not require a request body.

 3.42.8.2. Response

 

Example 3.357. Create snapshot: JSON response

{
    "snapshot": {
        "id": "3fbbcccf-d058-4502-8844-6feeffdf4cb5",
        "display_name": "snap-001",
        "display_description": "Daily backup",
        "volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
        "status": "available",
        "size": 30,
        "created_at": "2012-02-29T03:50:07Z"
     }
}

 

Example 3.358. Create snapshot: XML response

<?xml version="1.0" encoding="UTF-8"?>
<snapshot xmlns="http://docs.openstack.org/volume/api/v1"
          id="3fbbcccf-d058-4502-8844-6feeffdf4cb5"
          display_name="snap-001"
          display_description="Daily backup"
          volume_id="521752a6-acf6-4b2d-bc7a-119f9148cd8c"
          status="available"
          size="30"
          created_at="2012-02-29T03:50:07Z" />

This operation does not return a response body.

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page


loading table of contents...