Create snapshot 1
Method | URI | Description |
---|---|---|
POST | /v2/{tenant_id}/snapshots | Creates a snapshot, which is a point-in-time copy of a volume. You can create a volume from the snapshot. |
Normal response codes: 202
Request
This table shows the URI parameters for the create snapshot request:
Name | Type | Description |
---|---|---|
{tenant_id} | String | The unique identifier of the project or account. |
This table shows the query parameters for the create snapshot request:
Name | Type | Description |
---|---|---|
volume_id | String (Required) |
To create a snapshot from an existing volume, specify the ID of the existing volume. |
force | Boolean (Optional) |
[True/False] Indicate whether to snapshot, even if the volume is attached. Default==False. |
name | String (Optional) |
Name of the snapshot. Default==None. |
description | String (Optional) |
Description of snapshot. Default==None. |
Example. Create snapshot: JSON request
{
"snapshot": {
"name": "snap-001",
"description": "Daily backup",
"volume_id": "5aa119a8-d25b-45a7-8d1b-88e127885635",
"force": true
}
}
Response
Example. Create snapshot: JSON response
{
"snapshot": {
"status": "creating",
"description": "Daily backup",
"created_at": "2013-02-25T03:56:53.081642",
"metadata": {},
"volume_id": "5aa119a8-d25b-45a7-8d1b-88e127885635",
"size": 1,
"id": "ffa9bc5e-1172-4021-acaf-cdcd78a9584d",
"name": "snap-001"
}
}