Deleting an Image

Scenario

A private image can be deleted if it is no longer needed.

The token obtained from IAM is valid for only 24 hours. If you want to use a token for authentication, you can cache it to avoid frequently calling the IAM 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

  1. Obtain the token.
  2. Send DELETE https://IMS endpoint/v2/images/Image ID.
  3. Add X-Auth-Token to the request header.
  4. Check the status code. If the request is successful, 204 is returned.

    For details about status codes for request errors, see Status Codes.