• Image Management Service

ims
  1. Help Center
  2. Image Management Service
  3. API Reference
  4. APIs
  5. Image Sharing (Extension APIs)
  6. Updating the Status of Image Members in Batches

Updating the Status of Image Members in Batches

Function

This API is an extension one and used to update the image sharing status after the tenant accepts or rejects the shared images.

URI

  • URI format

    PUT /v1/cloudimages/members

Request

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    images

    Yes

    List<String>

    Specifies the image IDs.

    project_id

    Yes

    String

    Specifies the project ID.

    status

    Yes

    String

    Specifies whether a shared image will be accepted or declined.

    The value can be one of the following:

    • accepted: indicates that shared images will be accepted.
    • rejected: indicates that shared images will be declined.
  • Example request
    PUT /v1/cloudimages/members
    {
       
       "images": [
              "d164b5df-1bc3-4c3f-893e-3e471fd16e64",
              "0b680482-acaa-4045-b14c-9a8c7dfe9c70"
          ],
          "project_id": "edc89b490d7d4392898e19b2deb34797",
          "status": "accepted"
    }

Response

  • Parameter description

    Parameter

    Type

    Description

    job_id

    String

    Specifies the asynchronous job ID.

  • Example response
    STATUS CODE 200
    {
        "job_id": "edc89b490d7d4392898e19b2deb34797"
    }

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error. For details, see Error Codes.

    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.