deb-manila/api-ref/source/share-metadata.inc
Daniel Gonzalez 3e86e3deac Migrate API reference into tree
The API Documentation team has requires [1] that
projects maintain their api-reference in-tree and
build it to the developer.openstack.org website.

This version of the API reference uses os-api-ref
and compiles API documentation close to that of
the OpenStack compute service (nova).

Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>

[0] http://lists.openstack.org/pipermail/openstack-dev/2016-May/093765.html

Implements: bp move-manila-api-reference-in-tree
Change-Id: I67bb3354162d6e0e00fa2788edde864cc14920ee
2016-07-25 15:55:00 +00:00

145 lines
2.6 KiB
ReStructuredText

.. -*- rst -*-
==============
Share metadata
==============
Shows, sets, updates, and unsets share metadata.
Show share metadata
===================
.. rest_method:: GET /v2/{tenant_id}/shares/{share_id}/metadata
Shows the metadata for a share.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- share_id: share_id
- tenant_id: tenant_id_1
Response parameters
-------------------
.. rest_parameters:: parameters.yaml
- metadata: metadata_3
Response example
----------------
.. literalinclude:: samples/share-show-metadata-response.json
:language: javascript
Set share metadata
==================
.. rest_method:: POST /v2/{tenant_id}/shares/{share_id}/metadata
Sets the metadata on a share.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), conflict(409)
Request
-------
.. rest_parameters:: parameters.yaml
- metadata: metadata_2
- share_id: share_id
- tenant_id: tenant_id_1
Request example
---------------
.. literalinclude:: samples/share-set-metadata-request.json
:language: javascript
Response parameters
-------------------
.. rest_parameters:: parameters.yaml
- metadata: metadata
Response example
----------------
.. literalinclude:: samples/share-set-metadata-response.json
:language: javascript
Update share metadata
=====================
.. rest_method:: PUT /v2/{tenant_id}/shares/{share_id}/metadata
Updates the metadata for a share.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- metadata: metadata_2
- share_id: share_id
- tenant_id: tenant_id_1
Request example
---------------
.. literalinclude:: samples/share-update-metadata-request.json
:language: javascript
Response parameters
-------------------
.. rest_parameters:: parameters.yaml
- metadata: metadata_3
Response example
----------------
.. literalinclude:: samples/share-update-metadata-response.json
:language: javascript
Unset share metadata
====================
.. rest_method:: DELETE /v2/{tenant_id}/shares/{share_id}/metadata/{key}
Un-sets the metadata on a share.
To unset a metadata key value, specify only the key name in the
URI.
Normal response codes: 202
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- share_id: share_id
- tenant_id: tenant_id_1