Creating Snapshots
POST /v3/{project_id}/snapshots
Creates a volume snapshot, which is a point-in-time, complete copy of a volume. This request requires an authentication token, which you should include in the request headers.
info
Source: create-a-snapshot
Request
Body Parameters
| Name | In | Type | Description |
|---|---|---|---|
| project_id | path | string | The UUID of the project in a multi-tenancy cloud. |
| snapshot | body | object | A snapshot object. |
| volume_id | body | string | The UUID of the volume. |
| name | body | string | The name of the snapshot. |
| description (Optional) | body | string | A description for the snapshot. Default is None. |
| force (Optional) | body | boolean | Indicates whether to backup, even if the volume is attached. Default is false. |
| metadata (Optional) | body | object | One or more metadata key and value pairs for the snapshot. |
Sample Request
Using curl
curl -ks -X POST -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
-d '{
"snapshot": {
"name": "snapshot1",
"volume_id": "b0738bcc-3513-4066-852d-c70b8d966ffd",
"force": true
}
}' https://api.vietnix.cloud:8776/v3/f5d834d636c642c7bfe8af86139c6f26/snapshots
Using HTTP request
POST https://api.vietnix.cloud:8776/v3/f5d834d636c642c7bfe8af86139c6f26/snapshots
with body
{
"snapshot": {
"name": "snapshot1",
"volume_id": "b0738bcc-3513-4066-852d-c70b8d966ffd",
"force": true
}
}
Response
Parameters
| Name | Type | Description |
|---|---|---|
| snapshot | object | A snapshot object. |
| user_id | string | The UUID of the user. New in version 3.41 |
| volume_id | string | If the snapshot was created from a volume, the volume ID. |
| name | string | The name of the snapshot. |
| status | string | The status for the snapshot. |
| description | string | A description for the snapshot. |
| created_at | string | The date and time when the resource was created. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm. For example, 2015-08-27T09:49:58-05:00. The ±hh:mm value, if included, is the time zone as an offset from UTC. |
| metadata | object | One or more metadata key and value pairs for the snapshot, if any. |
| id | string | The snapshot UUID. |
| size | integer | The size of the volume, in gibibytes (GiB). |
| count (Optional) | integer | The total count of requested resource before pagination is applied. New in version 3.45 |
| updated_at | string | The date and time when the resource was updated. If the resource has not been updated, this field will be null. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm. For example, 2015-08-27T09:49:58-05:00. The ±hh:mm value, if included, is the time zone as an offset from UTC. |
Status Codes
Success
| Code | Reason |
|---|---|
| 202 - Accepted | Request was accepted for processing, but the processing has not been completed. A 'location' header is included in the response which contains a link to check the progress of the request. |
Error
| Code | Reason |
|---|---|
| 400 - Bad Request | Some content in the request was invalid. |
| 404 - Not Found | The requested resource could not be found. |
Sample Response
{
"snapshot": {
"id": "d54589c3-7e86-47d5-a59d-0eae51dbd992",
"created_at": "2025-10-07T07:19:27.702681",
"updated_at": null,
"name": "snapshot1",
"description": null,
"volume_id": "b0738bcc-3513-4066-852d-c70b8d966ffd",
"volume_type_id": "e9f2ecf9-697f-4af7-b084-8d4d072d7974",
"status": "creating",
"size": 10,
"metadata": {}
}
}