cinder/api-ref/source/v1/volumes-v1-snapshots.inc
Ha Van Tu e82d639e96 [api-ref] Correct response code in Cinder API v1
This patch corrects reponses code in Cinder API v1

Change-Id: I3491f0af455b30a6db66dc38ae3983e8799aa851
2016-09-08 11:53:36 +07:00

189 lines
3.0 KiB
ReStructuredText

.. -*- rst -*-
=========
Snapshots
=========
Creates, lists, shows information for, and deletes snapshots. Shows
and updates snapshot metadata.
Show snapshot details (v1)
==========================
.. rest_method:: GET /v1/{tenant_id}/snapshots/{snapshot_id}
Shows details for a snapshot.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- snapshot_id: snapshot_id
Response Example
----------------
.. literalinclude:: ./samples/snapshot-show-response.json
:language: javascript
Delete snapshot (v1)
====================
.. rest_method:: DELETE /v1/{tenant_id}/snapshots/{snapshot_id}
Deletes a snapshot.
Normal response codes:202,
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- snapshot_id: snapshot_id
List snapshots with details (v1)
================================
.. rest_method:: GET /v1/{tenant_id}/snapshots/detail
Lists all snapshots, with details.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Example
----------------
.. literalinclude:: ./samples/snapshots-list-response.json
:language: javascript
Create snapshot (v1)
====================
.. rest_method:: POST /v1/{tenant_id}/snapshots
Creates a snapshot.
Normal response codes:201
Request
-------
.. rest_parameters:: parameters.yaml
- snapshot: snapshot
- tenant_id: tenant_id
Request Example
---------------
.. literalinclude:: ./samples/snapshot-create-request.json
:language: javascript
List snapshots (v1)
===================
.. rest_method:: GET /v1/{tenant_id}/snapshots
Lists all snapshots.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
Response Example
----------------
.. literalinclude:: ./samples/snapshots-list-response.json
:language: javascript
Show snapshot metadata (v1)
===========================
.. rest_method:: GET /v1/{tenant_id}/snapshots/{snapshot_id}/metadata
Shows metadata for a snapshot.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: tenant_id
- snapshot_id: snapshot_id
Response Example
----------------
.. literalinclude:: ./samples/snapshot-metadata-show-response.json
:language: javascript
Update snapshot metadata (v1)
=============================
.. rest_method:: PUT /v1/{tenant_id}/snapshots/{snapshot_id}/metadata
Updates metadata for a snapshot.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- metadata: metadata
- tenant_id: tenant_id
- snapshot_id: snapshot_id
Request Example
---------------
.. literalinclude:: ./samples/snapshot-metadata-update-request.json
:language: javascript
Response Example
----------------
.. literalinclude:: ./samples/snapshot-metadata-update-response.json
:language: javascript