• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Glance
  5. Image Sharing (Native OpenStack APIs)
  6. Updating the Image Sharing Status in Batches (Native OpenStack API)

Updating the Image Sharing Status in Batches (Native OpenStack API)

Function

This API is used to update the image sharing status when a tenant accepts or rejects a shared image.

URI

  • URI format

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

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    image_id

    Yes

    String

    Specifies the image ID.

    member_id

    Yes

    String

    Specifies the member ID.

Request

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    status

    Yes

    String

    Specifies whether a shared image will be accepted or declined.

    Available values include:

    • accepted: indicates that a shared image is accepted. After an image is accepted, the image is displayed in the image list. You can use the image to create ECSs.
    • rejected: indicates that a shared image is declined. After an image is declined, the image is not displayed in the image list. However, you can still use the image to create ECSs.
  • Example request
    PUT https://{Endpoint}/v2/images/d164b5df-1bc3-4c3f-893e-3e471fd16e64/members/edc89b490d7d4392898e19b2deb34797
    {
        "status":"accepted"
    }

Response

  • Parameter description

    Parameter

    Type

    Description

    status

    String

    Specifies the image sharing status.

    created_at

    String

    Specifies the time when a shared image was created. The value is in UTC format.

    updated_at

    String

    Specifies the time when a shared image was updated. The value is in UTC format.

    image_id

    String

    Specifies the image ID.

    member_id

    String

    Specifies the member ID.

    schema

    String

    Specifies the sharing schema.

  • Example response
    STATUS CODE 200
    {
        "status": "accepted",
        "created_at": "2016-09-01T02:05:14Z",
        "updated_at": "2016-09-01T02:37:11Z",
        "image_id": "d164b5df-1bc3-4c3f-893e-3e471fd16e64",
        "member_id": "edc89b490d7d4392898e19b2deb34797",
        "schema": "/v2/schemas/member"
    }

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    You do not have the rights to perform the operation.

    404 Not Found

    The requested resource was not found.

    500 Internal Server Error

    Internal service error.

    503 Service Unavailable

    The service is unavailable.