Create image member
POST /v2/images/{image_id}/members
Normal response codes: 200
- The specified images must exist.
- You can only add a member to an image which visibility attribute is private.
- You must be the owner of the specified image.
- With correct permissions, you can see the member status of the image as pending through API calls.
- Even if you have correct permissions, if the visibility attribute is set to public, the request returns the HTTP 403 error code. Ensure that you meet the preconditions and run the request again. If the request fails again, review your API request.
- If the specified member is already a member for the image, the service returns the HTTP 409 Conflict error code. In case you meant a different member, double-check that you specified the correct member.
- Add a member to the image that will be shared.
After the image provider creates an image with the visibility attribute set to "private", add a member (project ID) who will share the image.
To add a member to the image, use "Create image member".
- Start using the shared image.
The status of the member who the image was shared with changes to "accepted" for using the image.
To change the member status of the image, use "Update image member".
By changing the member status of the image to "accepted", the shared image will be displayed in the image list retrieved using "List images".
- Stop using shared images.
The image provider deletes the member for whom usage is to be stopped from the image being shared.
To delete a member from an image, use "Delete image member".
By deleting a member of an image, the member will no longer be able to view or use the image being shared.
Request
This table shows the URI parameters for the create image member request:
Name | Type | Description |
---|---|---|
image_id | uuid | Image ID stored through the image API. Typically a UUID. |
This table shows the body parameters for the create image member request:
Name | Type | Description |
---|---|---|
member | string | Image member ID. For example, the project ID of the user with whom the image is being shared. |
Example. Create image member: JSON request
{
"member": "8989447062e04a818baf9e073fd04fa7"
}
Response
{
"created_at": "2013-09-20T19:22:19Z",
"image_id": "a96be11e-8536-4910-92cb-de50aa19dfe6",
"member_id": "8989447062e04a818baf9e073fd04fa7",
"schema": "/v2/schemas/member",
"status": "pending",
"updated_at": "2013-09-20T19:25:31Z"
}