ByCloud Docs
GuidesCLIAPISDK
post/v1/snapshots

Create snapshot

Create a snapshot of a volume

Request Body

required

Content-Type: application/json

volume_id

string<uuid>required

Volume to snapshot

name

stringoptional

description

stringoptional

force

booleanoptional

Force snapshot even if volume is attached

Default: false

metadata

objectoptional

Responses

202

Snapshot creation initiated

Content-Type: application/json

snapshot

objectoptional
400

Invalid request parameters

Content-Type: application/json

error

objectrequired
401

Authentication required or token invalid

Content-Type: application/json

error

objectrequired
404

Volume not found

Content-Type: application/json

error

objectrequired
409

Volume is not in snapshotable state

Content-Type: application/json

error

objectrequired
500

Internal server error

Content-Type: application/json

error

objectrequired
curl -X POST "https://api.spo1.mycloud.com/v1/snapshots" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"volume_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "snapshot-2024-01-15",
"description": "string",
"force": false,
"metadata": {
"environment": "production",
"team": "backend"
}
}'