6.6. Deleting images

DELETE /v2/images/{image_id}

Delete an image with the specified ID.

Preconditions:

  • You can delete an image in any status except deleted.
  • The protected attribute of the image cannot be true.
  • You must be allowed to delete images by the image deletion policy.

Source: https://docs.openstack.org/api-ref/image/v2/index.html?expanded=#delete-image

6.6.1. Request

Name In Type Description
image_id path string The UUID of the image.

6.6.1.1. Example

# curl -ks -X DELETE -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:9292/v2/images/a353024f-ea44-4609-b6d0-fb00de7112ec

6.6.2. Response

6.6.2.1. Status codes

6.6.2.1.1. Success

Code Reason
204 - No Content The server has fulfilled the request.

6.6.2.1.2. Error

Code Reason
400 - Bad Request Some content in the request was invalid.
401 - Unauthorized User must authenticate before making a request.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found.
409 - Conflict This operation conflicted with another operation on this resource.