Anne Gentle ac4cc65cb5 Adds migrated RST + YAML files from WADL
Contains .inc files which have all the contents of the .rst files
but are grouped together for easier editing.
Contains parameters.yaml, which has all parameters in one file.
Contains request and response samples (JSON and XML) that are
pointed to from the .inc files.

Change-Id: I42d5451300f95774a3ec4df66bc95cb36795844d
2016-05-02 17:42:49 -05:00

99 lines
1.3 KiB
ReStructuredText

.. -*- rst -*-
=======
Members
=======
Add members to image
====================
.. rest_method:: PUT /v1/images/{image_id}/members/{owner_id}
Adds one or more members to an image.
If you omit the request body, this call adds the membership to the
image, leaves the existing memberships unmodified, and sets the
``can_share`` attribute to ``false`` for new memberships.
Error response codes:204,
Request
-------
.. rest_parameters:: parameters.yaml
- can_share: can_share
- image_id: image_id
- owner_id: owner_id
Request Example
---------------
.. literalinclude:: ../samples/image-members-add-request.json
:language: javascript
Remove member
=============
.. rest_method:: DELETE /v1/images/{image_id}/members/{owner_id}
Removes a member from an image.
Error response codes:204,
Request
-------
.. rest_parameters:: parameters.yaml
- member_id: member_id
- image_id: image_id
- owner_id: owner_id
Replace member
==============
.. rest_method:: PUT /v1/images/{image_id}/members
Replaces a membership list for an image.
Error response codes:204,
Request
-------
.. rest_parameters:: parameters.yaml
- memberships: memberships
- can_share: can_share
- image_id: image_id
Request Example
---------------
.. literalinclude:: ../samples/image-members-add-request.json
:language: javascript