diff --git a/api-ref/source/v3/parameters.yaml b/api-ref/source/v3/parameters.yaml index 9a5c2f0785d..40465764cd0 100644 --- a/api-ref/source/v3/parameters.yaml +++ b/api-ref/source/v3/parameters.yaml @@ -2059,6 +2059,12 @@ os-unset_image_metadata: in: body required: true type: object +os-update_snapshot_status: + description: | + The ``os-update_snapshot_status`` action. + in: body + required: true + type: object os-vol-host-attr:host: description: | Current back-end of the volume. @@ -2483,6 +2489,12 @@ snapshot_id_4: in: body required: true type: string +snapshot_progress: + description: | + A percentage value for snapshot build progress. + in: body + required: false + type: string snapshots_number: description: | The number of snapshots that are allowed for each project. diff --git a/api-ref/source/v3/samples/snapshot-status-update-request.json b/api-ref/source/v3/samples/snapshot-status-update-request.json new file mode 100644 index 00000000000..7790715abfb --- /dev/null +++ b/api-ref/source/v3/samples/snapshot-status-update-request.json @@ -0,0 +1,6 @@ +{ + "os-update_snapshot_status": { + "status": "creating", + "progress": "80%" + } +} diff --git a/api-ref/source/v3/volumes-v3-snapshots-actions.inc b/api-ref/source/v3/volumes-v3-snapshots-actions.inc index 3657fa30b8a..6835b67e9ad 100644 --- a/api-ref/source/v3/volumes-v3-snapshots-actions.inc +++ b/api-ref/source/v3/volumes-v3-snapshots-actions.inc @@ -3,7 +3,8 @@ Snapshot actions (snapshots, action) ==================================== -Administrator only. Resets status for a snapshot. +Administrator only, depending on policy settings. +Resets, updates status for a snapshot. Reset a snapshot's status @@ -36,3 +37,37 @@ Request Example .. literalinclude:: ./samples/snapshot-status-reset-request.json :language: javascript + + +Update status of a snapshot +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. rest_method:: POST /v3/{project_id}/snapshots/{snapshot_id}/action + +Update fields related to the status of a snapshot. +Specify the ``os-update_snapshot_status`` action in the request body. + +Response codes +-------------- + +.. rest_status_code:: success ../status.yaml + + - 202 + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - project_id: project_id_path + - snapshot_id: snapshot_id_path + - os-update_snapshot_status: os-update_snapshot_status + - status: status_2 + - progress: snapshot_progress + +Request Example +--------------- + +.. literalinclude:: ./samples/snapshot-status-update-request.json + :language: javascript