Image sharing#

Use image sharing operations to distribute and manage images. For more information, see Image sharing.

If you are an image producer, use the create image member and delete image member to manage shared images.

If you are an image consumer, use the update image member operation to set the status for the shared image.

List image members#

GET /images/{image_id}/members

This operation returns a collection of members (users) with whom the image has been shared. The response conforms to the schema found in Get image members schema.

If a user with whom this image is shared makes this call, the member list contains only information for that user. If a user with whom this image has not been shared makes this call, the response is HTTP 404.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Error

A general error has occurred.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

404

Not Found

Resource not found.

405

Bad Method

Bad method.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

UUID

Image ID stored through the image API, typically a UUID.

This operation does not accept a request body.

Response#

This table shows the body parameters for the response:

Name

Type

Description

members

Array

The array of image members.

members.created_at

String

The date and time that the image member was created.

members.image_id

String

The UUID of the image.

members.member_id

String

The id of the image member.

members.schema

String

The schema of the image member.

members.status

String

The status of the image member ( pending, accepted, or rejected.

members.updated_at

String

The date and time that the image member was updated.

schema

String

The schema of the image members.

Example: List image members: JSON response

{
    "members": [
        {
            "created_at": "2013-10-07T17:58:03Z",
            "image_id": "dbc999e3-c52f-4200-bedd-3b18fe7f87fe",
            "member_id": "123456789",
            "schema": "/v2/schemas/member",
            "status": "pending",
            "updated_at": "2013-10-07T17:58:03Z"
        },
        {
            "created_at": "2013-10-07T17:58:55Z",
            "image_id": "dbc999e3-c52f-4200-bedd-3b18fe7f87fe",
            "member_id": "987654321",
            "schema": "/v2/schemas/member",
            "status": "accepted",
            "updated_at": "2013-10-08T12:08:55Z"
        }
    ],
    "schema": "/v2/schemas/members"
}

Get image member details#

GET /images/{image_id}/members/{member_id}

This operation shows details of the image member. The response conforms to the schema found in Get image members schema To get a successful response, either the image owner must make the call or the tenant_id of the user making the call must match the specified member_id. Otherwise the response is HTTP 404.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Error

A general error has occurred.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

404

Not Found

Resource not found.

405

Bad Method

Bad method.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

UUID

Image ID stored through the image API, typically a UUID.

{member_id}

String

Image member ID. For example, the tenant ID of the user with whom the image is being shared.

This operation does not accept a request body.

Response#

This table shows the body parameters for the response:

Name

Type

Description

created_at

String

The date and time that the image member was created.

image_id

String

The UUID of the image.

member_id

String

The id of the image member.

schema

String

The schema of the image member.

status

String

The status of the image member ( pending, accepted, or rejected.

updated_at

String

The date and time that the image member was updated.

Example Get image member details: JSON response

{
    "created_at": "2014-02-20T04:15:17Z",
    "image_id": "634985e5-0f2e-488e-bd7c-928d9a8ea82a",
    "member_id": "348129",
    "schema": "/v2/schemas/member",
    "status": "pending",
    "updated_at": "2014-02-20T04:15:17Z"
}

Create image member#

POST /images/{image_id}/members

This operation allows you to add users, by member_id (which is the tenant_id ) to the list of members with whom the image is shared. The member status of a newly created image member is pending. The response conforms to the schema found in Get image members schema.

If the user making the call is not the image owner, the response is HTTP 404.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Error

A general error has occurred.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

413

Over Limit

The number of items returned is above the allowed limit.

415

Bad Media Type

Bad media type. This may result if the wrong media type is used in the cURL request.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the 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 request:

Name

Type

Description

member

String (Required)

The member ID. This is the tenant ID of the user with whom the image is to be shared.

Example: Create image member: JSON request

{
    "member": "554433"
}

Response#

This table shows the body parameters for the response:

Name

Type

Description

created_at

String

The date and time that the image member was created.

image_id

String

The UUID of the image.

member_id

String

The id of the image member.

schema

String

The schema of the image member.

status

String

The status of the image member ( pending, accepted, or rejected.

updated_at

String

The date and time that the image member was updated.

Example: Create image member: JSON response

{
    "created_at": "2013-09-20T19:22:19Z",
    "image_id": "a96be11e-8536-4910-92cb-de50aa19dfe6",
    "member_id": "554433",
    "schema": "/v2/schemas/member",
    "status": "pending",
    "updated_at": "2013-09-20T19:25:31Z"
}

Delete image member#

DELETE /images/{image_id}/members/{member_id}

Deletes the specified account ID/tenant ID from the member list of the specified image.

This operation deletes the image member from the image. This call, which can only be made by the image owner, removes users from the list of members who have access to a shared image.

If the {member_id} is not a member of the specified image, the response is HTTP 404

This table shows the possible response codes for this operation:

Response Code

Name

Description

204

Success

Delete request succeeded.

400

Error

A general error has occurred.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

404

Not Found

Resource not found.

405

Bad Method

Bad method.

413

Over Limit

The number of items returned is above the allowed limit.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

UUID

Image ID stored through the image API, typically a UUID.

{member_id}

String

Image member ID. For example, the tenant ID of the user with whom the image is being shared.

This operation does not accept a request body.

Response#

This operation does not return a response body.

Update image member#

PUT /images/{image_id}/members/{member_id}

Sets the specified status for the specified member of the specified image.

This operation updates the image member. The response conforms to the schema found in Get image members schema.

If the call is made by the image owner, the response is HTTP 403 (Forbidden).

If the call is made by a user who is not the owner and whose tenant ID is not the same as the {member_id} in the operation URI, the response is HTTP 404.

This table shows the possible response codes for this operation:

Response Code

Name

Description

200

Success

Request succeeded.

400

Error

A general error has occurred.

401

Unauthorized

Unauthorized.

403

Forbidden

Forbidden.

405

Bad Method

Bad method.

413

Over Limit

The number of items returned is above the allowed limit.

415

Bad Media Type

Bad media type. This may result if the wrong media type is used in the cURL request.

500

API Fault

API fault.

503

Service Unavailable

The requested service is unavailable.

Request#

This table shows the URI parameters for the request:

Name

Type

Description

{image_id}

UUID

Image ID stored through the image API, typically a UUID.

{member_id}

String

Image member ID. For example, the tenant ID of the user with whom the image is being shared.

This table shows the body parameters for the request:

Name

Type

Description

parameters.status

String (Required)

The status to which this image member should be set. Valid values are as follows:

pending At creation, the creation, the member’s status is set to pending. The image is not visible in the member’s image-list, but the member can still boot instances from the image.

accepted The image is visible in the member’s image-list. The member can boot instances from the image.

rejected The member has decided not to see the image. The image is not visible in the member’s image-list, but the member can still boot instances from the image.

Example: Update image member: JSON request

{
    "status": "accepted"
}

Response#

This table shows the body parameters for the response:

Name

Type

Description

parameters.created_at

String

The date and time that the image member was created.

parameters.image_id

String

The UUID of the image.

parameters.member_id

String

The id of the image member.

parameters.schema

String

The schema of the image member.

parameters.status

String

The status of the image member ( pending, accepted, or rejected.

parameters.updated_at

String

The date and time that the image member was updated.

Example: Update image member: JSON response

{
    "created_at": "2013-09-20T19:22:19Z",
    "image_id": "a96be11e-8536-4910-92cb-de50aa19dfe6",
    "member_id": "554433",
    "schema": "/v2/schemas/member",
    "status": "accepted",
    "updated_at": "2013-09-20T20:15:31Z"
}