# Snapshots

Volume snapshot management

## List snapshots

> Lists all Block Storage snapshots

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Block Storage API (Cinder)","version":"3.71"},"tags":[{"name":"snapshots","description":"Volume snapshot management"}],"servers":[{"url":"https://{host}/cinder","description":"PCD Block Storage API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"parameters":{"AllTenantsQuery":{"name":"all_tenants","description":"Shows details for all project. Admin only.","schema":{"type":"string"},"in":"query"},"SortQuery":{"name":"sort","description":"Comma-separated list of sort keys and optional sort directions","schema":{"type":"string"},"in":"query"},"SortKeyQuery":{"name":"sort_key","description":"Sorts by an attribute","schema":{"type":"string"},"in":"query"},"SortDirQuery":{"name":"sort_dir","description":"Sorts by direction (asc or desc)","schema":{"enum":["asc","desc"],"type":"string"},"in":"query"},"LimitQuery":{"name":"limit","description":"Requests a page size of items","schema":{"minimum":1,"type":"integer"},"in":"query"},"OffsetQuery":{"name":"offset","description":"Used in conjunction with limit to return items starting from the offset position","schema":{"minimum":0,"type":"integer"},"in":"query"},"MarkerQuery":{"name":"marker","description":"The ID of the last-seen item","schema":{"type":"string"},"in":"query"},"WithCountQuery":{"name":"with_count","description":"Whether to show count in response (microversion 3.45+)","schema":{"type":"boolean"},"in":"query"}},"schemas":{"SnapshotsSimple":{"type":"object","properties":{"snapshots":{"type":"array","items":{"$ref":"#/components/schemas/SnapshotSimple"}},"snapshots_links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}},"count":{"description":"Total count of snapshots (microversion 3.45+)","type":"integer"}}},"SnapshotSimple":{"type":"object","properties":{"id":{"format":"uuid","description":"The UUID of the snapshot","type":"string"},"name":{"nullable":true,"description":"The snapshot name","type":"string"},"links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}},"Link":{"type":"object","properties":{"href":{"format":"uri","type":"string"},"rel":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/v3/snapshots":{"get":{"tags":["snapshots"],"parameters":[{"$ref":"#/components/parameters/AllTenantsQuery"},{"$ref":"#/components/parameters/SortQuery"},{"$ref":"#/components/parameters/SortKeyQuery"},{"$ref":"#/components/parameters/SortDirQuery"},{"$ref":"#/components/parameters/LimitQuery"},{"$ref":"#/components/parameters/OffsetQuery"},{"$ref":"#/components/parameters/MarkerQuery"},{"$ref":"#/components/parameters/WithCountQuery"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotsSimple"}}},"description":"OK"}},"summary":"List snapshots","description":"Lists all Block Storage snapshots"}}}}
```

## Create snapshot

> Creates a volume snapshot

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Block Storage API (Cinder)","version":"3.71"},"tags":[{"name":"snapshots","description":"Volume snapshot management"}],"servers":[{"url":"https://{host}/cinder","description":"PCD Block Storage API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"schemas":{"SnapshotCreateRequest":{"type":"object","properties":{"snapshot":{"required":["volume_id"],"type":"object","properties":{"volume_id":{"format":"uuid","description":"The UUID of the source volume","type":"string"},"name":{"description":"The snapshot name","type":"string"},"description":{"description":"The snapshot description","type":"string"},"force":{"description":"Create snapshot even if volume is in-use","type":"boolean"},"metadata":{"description":"Metadata key and value pairs","type":"object","additionalProperties":{"type":"string"}}}}}},"SnapshotResponse":{"type":"object","properties":{"snapshot":{"$ref":"#/components/schemas/Snapshot"}}},"Snapshot":{"type":"object","properties":{"id":{"format":"uuid","description":"The UUID of the snapshot","type":"string"},"name":{"nullable":true,"description":"The snapshot name","type":"string"},"description":{"nullable":true,"description":"The snapshot description","type":"string"},"size":{"description":"The size of the snapshot, in gibibytes (GiB)","type":"integer"},"status":{"description":"The snapshot status","type":"string"},"volume_id":{"format":"uuid","description":"The UUID of the source volume","type":"string"},"metadata":{"description":"Metadata key and value pairs","type":"object","additionalProperties":{"type":"string"}},"created_at":{"format":"date-time","description":"The date and time when the resource was created","type":"string"},"updated_at":{"nullable":true,"format":"date-time","description":"The date and time when the resource was updated","type":"string"},"user_id":{"format":"uuid","description":"The UUID of the user","type":"string"},"os-extended-snapshot-attributes:project_id":{"format":"uuid","description":"The project ID","type":"string"},"os-extended-snapshot-attributes:progress":{"description":"The snapshot progress","type":"string"},"group_snapshot_id":{"nullable":true,"format":"uuid","description":"The UUID of the group snapshot","type":"string"},"consumes_quota":{"description":"Whether this resource consumes quota (microversion 3.65+)","type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}},"Link":{"type":"object","properties":{"href":{"format":"uri","type":"string"},"rel":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/v3/snapshots":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotCreateRequest"}}},"required":true},"tags":["snapshots"],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}},"description":"Accepted"}},"summary":"Create snapshot","description":"Creates a volume snapshot"}}}}
```

## List snapshots with details

> Lists all Block Storage snapshots with details

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Block Storage API (Cinder)","version":"3.71"},"tags":[{"name":"snapshots","description":"Volume snapshot management"}],"servers":[{"url":"https://{host}/cinder","description":"PCD Block Storage API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"parameters":{"AllTenantsQuery":{"name":"all_tenants","description":"Shows details for all project. Admin only.","schema":{"type":"string"},"in":"query"},"SortQuery":{"name":"sort","description":"Comma-separated list of sort keys and optional sort directions","schema":{"type":"string"},"in":"query"},"SortKeyQuery":{"name":"sort_key","description":"Sorts by an attribute","schema":{"type":"string"},"in":"query"},"SortDirQuery":{"name":"sort_dir","description":"Sorts by direction (asc or desc)","schema":{"enum":["asc","desc"],"type":"string"},"in":"query"},"LimitQuery":{"name":"limit","description":"Requests a page size of items","schema":{"minimum":1,"type":"integer"},"in":"query"},"OffsetQuery":{"name":"offset","description":"Used in conjunction with limit to return items starting from the offset position","schema":{"minimum":0,"type":"integer"},"in":"query"},"MarkerQuery":{"name":"marker","description":"The ID of the last-seen item","schema":{"type":"string"},"in":"query"},"WithCountQuery":{"name":"with_count","description":"Whether to show count in response (microversion 3.45+)","schema":{"type":"boolean"},"in":"query"}},"schemas":{"SnapshotsDetail":{"type":"object","properties":{"snapshots":{"type":"array","items":{"$ref":"#/components/schemas/Snapshot"}},"snapshots_links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}},"count":{"description":"Total count of snapshots (microversion 3.45+)","type":"integer"}}},"Snapshot":{"type":"object","properties":{"id":{"format":"uuid","description":"The UUID of the snapshot","type":"string"},"name":{"nullable":true,"description":"The snapshot name","type":"string"},"description":{"nullable":true,"description":"The snapshot description","type":"string"},"size":{"description":"The size of the snapshot, in gibibytes (GiB)","type":"integer"},"status":{"description":"The snapshot status","type":"string"},"volume_id":{"format":"uuid","description":"The UUID of the source volume","type":"string"},"metadata":{"description":"Metadata key and value pairs","type":"object","additionalProperties":{"type":"string"}},"created_at":{"format":"date-time","description":"The date and time when the resource was created","type":"string"},"updated_at":{"nullable":true,"format":"date-time","description":"The date and time when the resource was updated","type":"string"},"user_id":{"format":"uuid","description":"The UUID of the user","type":"string"},"os-extended-snapshot-attributes:project_id":{"format":"uuid","description":"The project ID","type":"string"},"os-extended-snapshot-attributes:progress":{"description":"The snapshot progress","type":"string"},"group_snapshot_id":{"nullable":true,"format":"uuid","description":"The UUID of the group snapshot","type":"string"},"consumes_quota":{"description":"Whether this resource consumes quota (microversion 3.65+)","type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}},"Link":{"type":"object","properties":{"href":{"format":"uri","type":"string"},"rel":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/v3/snapshots/detail":{"get":{"tags":["snapshots"],"parameters":[{"$ref":"#/components/parameters/AllTenantsQuery"},{"$ref":"#/components/parameters/SortQuery"},{"$ref":"#/components/parameters/SortKeyQuery"},{"$ref":"#/components/parameters/SortDirQuery"},{"$ref":"#/components/parameters/LimitQuery"},{"$ref":"#/components/parameters/OffsetQuery"},{"$ref":"#/components/parameters/MarkerQuery"},{"$ref":"#/components/parameters/WithCountQuery"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotsDetail"}}},"description":"OK"}},"summary":"List snapshots with details","description":"Lists all Block Storage snapshots with details"}}}}
```

## Show snapshot details

> Shows details for a snapshot

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Block Storage API (Cinder)","version":"3.71"},"tags":[{"name":"snapshots","description":"Volume snapshot management"}],"servers":[{"url":"https://{host}/cinder","description":"PCD Block Storage API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"schemas":{"SnapshotResponse":{"type":"object","properties":{"snapshot":{"$ref":"#/components/schemas/Snapshot"}}},"Snapshot":{"type":"object","properties":{"id":{"format":"uuid","description":"The UUID of the snapshot","type":"string"},"name":{"nullable":true,"description":"The snapshot name","type":"string"},"description":{"nullable":true,"description":"The snapshot description","type":"string"},"size":{"description":"The size of the snapshot, in gibibytes (GiB)","type":"integer"},"status":{"description":"The snapshot status","type":"string"},"volume_id":{"format":"uuid","description":"The UUID of the source volume","type":"string"},"metadata":{"description":"Metadata key and value pairs","type":"object","additionalProperties":{"type":"string"}},"created_at":{"format":"date-time","description":"The date and time when the resource was created","type":"string"},"updated_at":{"nullable":true,"format":"date-time","description":"The date and time when the resource was updated","type":"string"},"user_id":{"format":"uuid","description":"The UUID of the user","type":"string"},"os-extended-snapshot-attributes:project_id":{"format":"uuid","description":"The project ID","type":"string"},"os-extended-snapshot-attributes:progress":{"description":"The snapshot progress","type":"string"},"group_snapshot_id":{"nullable":true,"format":"uuid","description":"The UUID of the group snapshot","type":"string"},"consumes_quota":{"description":"Whether this resource consumes quota (microversion 3.65+)","type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}},"Link":{"type":"object","properties":{"href":{"format":"uri","type":"string"},"rel":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/v3/snapshots/{snapshot_id}":{"get":{"tags":["snapshots"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}},"description":"OK"}},"summary":"Show snapshot details","description":"Shows details for a snapshot"}}}}
```

## Update snapshot

> Updates a snapshot

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Block Storage API (Cinder)","version":"3.71"},"tags":[{"name":"snapshots","description":"Volume snapshot management"}],"servers":[{"url":"https://{host}/cinder","description":"PCD Block Storage API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"schemas":{"SnapshotUpdateRequest":{"type":"object","properties":{"snapshot":{"type":"object","properties":{"name":{"description":"The snapshot name","type":"string"},"description":{"description":"The snapshot description","type":"string"}}}}},"SnapshotResponse":{"type":"object","properties":{"snapshot":{"$ref":"#/components/schemas/Snapshot"}}},"Snapshot":{"type":"object","properties":{"id":{"format":"uuid","description":"The UUID of the snapshot","type":"string"},"name":{"nullable":true,"description":"The snapshot name","type":"string"},"description":{"nullable":true,"description":"The snapshot description","type":"string"},"size":{"description":"The size of the snapshot, in gibibytes (GiB)","type":"integer"},"status":{"description":"The snapshot status","type":"string"},"volume_id":{"format":"uuid","description":"The UUID of the source volume","type":"string"},"metadata":{"description":"Metadata key and value pairs","type":"object","additionalProperties":{"type":"string"}},"created_at":{"format":"date-time","description":"The date and time when the resource was created","type":"string"},"updated_at":{"nullable":true,"format":"date-time","description":"The date and time when the resource was updated","type":"string"},"user_id":{"format":"uuid","description":"The UUID of the user","type":"string"},"os-extended-snapshot-attributes:project_id":{"format":"uuid","description":"The project ID","type":"string"},"os-extended-snapshot-attributes:progress":{"description":"The snapshot progress","type":"string"},"group_snapshot_id":{"nullable":true,"format":"uuid","description":"The UUID of the group snapshot","type":"string"},"consumes_quota":{"description":"Whether this resource consumes quota (microversion 3.65+)","type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}},"Link":{"type":"object","properties":{"href":{"format":"uri","type":"string"},"rel":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/v3/snapshots/{snapshot_id}":{"put":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotUpdateRequest"}}},"required":true},"tags":["snapshots"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}},"description":"OK"}},"summary":"Update snapshot","description":"Updates a snapshot"}}}}
```

## Delete snapshot

> Deletes a snapshot

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Block Storage API (Cinder)","version":"3.71"},"tags":[{"name":"snapshots","description":"Volume snapshot management"}],"servers":[{"url":"https://{host}/cinder","description":"PCD Block Storage API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"responses":{"Accepted":{"description":"Request is accepted, but processing may take some time"}}},"paths":{"/v3/snapshots/{snapshot_id}":{"delete":{"tags":["snapshots"],"responses":{"202":{"$ref":"#/components/responses/Accepted"}},"summary":"Delete snapshot","description":"Deletes a snapshot"}}}}
```

## Perform snapshot action

> Performs various actions on a snapshot

```json
{"openapi":"3.0.3","info":{"title":"OpenStack Block Storage API (Cinder)","version":"3.71"},"tags":[{"name":"snapshots","description":"Volume snapshot management"}],"servers":[{"url":"https://{host}/cinder","description":"PCD Block Storage API v3","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"schemas":{"ResetSnapshotStatusRequest":{"type":"object","properties":{"os-reset_status":{"required":["status"],"type":"object","properties":{"status":{"description":"The snapshot status","type":"string"}}}}},"ManageSnapshotRequest":{"type":"object","properties":{"snapshot":{"required":["volume_id"],"type":"object","properties":{"volume_id":{"format":"uuid","description":"The UUID of the volume","type":"string"},"ref":{"description":"Driver-specific reference object","type":"object"}}}}},"UnmanageSnapshotRequest":{"type":"object","properties":{"os-unmanage":{"type":"object"}}}},"responses":{"Accepted":{"description":"Request is accepted, but processing may take some time"}}},"paths":{"/v3/snapshots/{snapshot_id}/action":{"post":{"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResetSnapshotStatusRequest"},{"$ref":"#/components/schemas/ManageSnapshotRequest"},{"$ref":"#/components/schemas/UnmanageSnapshotRequest"}]}}},"required":true},"tags":["snapshots"],"responses":{"202":{"$ref":"#/components/responses/Accepted"}},"summary":"Perform snapshot action","description":"Performs various actions on a snapshot"}}}}
```
