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 betrue
. - 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-detail#delete-image
Request
Parameters
Name | In | Type | Description |
---|---|---|---|
image_id
|
path | string | The UUID of the image. |
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
Response
Status codes
Success
Code | Reason |
---|---|
204 - No Content
|
The server has fulfilled the request. |
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. |