Delete image

Overview

Deletes a specified image.

Classification

  • Delete

API Operation Object

  • images

Synchronous / Asynchronous

  • -

Request

HTTP Request Method

  • DELETE

HTTP Request Path

{api_endpoint}/v2/{tenant_id}/images/{image_id}

HTTP Request Header

Format

Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: <token_id>
Content-Type: application/json

HTTP Request Body

Format

  • none

Request Parameter

Request Parameters
name style format description required/optional
tenant_id URI UUID The tenant ID in a multi-tenancy cloud. required
image_id URI UUID The UUID for the image. required

Response

HTTP Response Header

Format

HTTP/1.1 <response_code> <message>       (ex. 204 No Content)
  • <response_code>: see "HTTP Responses" section

  • <message>: message based on the response code

    • skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"

Response Code

Response Codes
response code condition
204 normal end
400 badRequest
401 unauthorized
403 forbidden
404 itemNotFound
405 badMethod
413 overLimit
503 serviceUnavailable

HTTP Response Body

Format

  • none

Response Parameter

Response Parameters
item format description
none - -

Sample API Request and Response

Sample API Request

Request URI

https://example.com/v2/{tenant_id}/images/{image_id}

Request Header

Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: ajk3adjiown02
Content-Type: application/json

Request Body

  • none

Sample API Response

Response Header

HTTP/1.1 204 No Content
  • <response_code>: see "HTTP Responses" section

  • <message>: message based on the response code

    • skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"

Response Body

  • none

Execution Example

HTTP Request

DELETE /v2/895f0b8574504834bd6249d91dbd5a9c/images/8b0e5ddf-9ae5-4939-8ef5-83cffd125529 HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token:aa8d8ee4622c4e10ace2a5a16b58caf2
Accept: application/json

HTTP Response

HTTP/1.1 204 No Content
Content-Type: text/html; charset=UTF-8
X-Compute-Request-Id: req-682b6d96-1f26-4124-ab08-bd9b185b02ce
Content-Length: 0
Date: Thu, 08 Oct 2015 00:22:10 GMT

Error Execution Example

HTTP Request

DELETE /v2/b17a6492bfa54441910e1f07c983384/images/8b0e5ddf-9ae5-4939-8ef5-83cffd125529 HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token:aa8d8ee4622c4e10ace2a5a16b58caf2
Accept: application/json

HTTP Response

HTTP/1.1 400 Bad Request
Content-Length: 187
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-b7a39536-49a1-4e42-91f9-1f8831931e13
Date: Thu, 08 Oct 2015 00:18:15 GMT

{"badRequest": {"message": "Malformed request URL: URL's project_id 'b17a6492bfa54441910e1f07c983384' doesn't match Context's project_id '895f0b8574504834bd6249d91dbd5a9c'", "code": 400}}