forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
4.3 KiB
4.3 KiB
Updating the Image Sharing Status in Batches
Scenario
The image sharing status can be updated in batches after a tenant accepts or rejects multiple shared images. The API used is an extension API.
Involved APIs
If you use a token for authentication, you must obtain the token and add X-Auth-Token to the request header of the IMS API when making an API call.
Procedure
- Obtain the token.
- Send PUT https://IMS endpoint/v1/cloudimages/members.
- Add X-Auth-Token to the request header.
- Configure the request parameters. (The values are examples only.)
{ "images": [ "d164b5df-1bc3-4c3f-893e-3e471fd16e64", "0b680482-acaa-4045-b14c-9a8c7dfe9c70" ], //Image IDs (mandatory, list<string>) "project_id": "edc89b490d7d4392898e19b2deb34797", //Project IDs (mandatory, string) "status": "accepted" //Image sharing status which can be accepted or rejected (mandatory, string) }
If the request is successful, a job ID is returned.
- Query job details using the job ID by referring to Querying Job Details.
If the job status is SUCCESS, the private image is successfully created.
For details about status codes for request errors, see Status Codes.
Parent topic: Sharing an Image