Delete keypair¶
Overview¶
Deletes a keypair.
Classification¶
- Delete
API Operation Object¶
- os-keypairs
Synchronous / Asynchronous¶
- -
Request¶
HTTP Request Method¶
- DELETE
HTTP Request Path¶
{api_endpoint}/v2/{tenant_id}/os-keypairs/{keypair_name}
Response¶
Sample API Request and Response¶
Sample API Request¶
Request URI¶
https://example.com/v2/{tenant_id}/os-keypairs/{keypair_name}
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 202 Accepted
<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/os-keypairs/keypair-dab428fe-6186-4a14-b3de-92131f76cd39 HTTP/1.1
User-Agent: curl/7.35.0 Host: 192.168.56.250:8774
X-Auth-Token:aa8d8ee4622c4e10ace2a5a16b58caf2
Content-type: application/json
Accept: application/json
Content-Length: 0
HTTP Response¶
HTTP/1.1 202 OK
Location: http://192.168.56.250:8774/v2/895f0b8574504834bd6249d91dbd5a9c/os-keypairs/keypair-dab428fe-6186-4a14-b3de-92131f76cd39
Content-Type: application/json
Content-Length: 0
X-Compute-Request-Id: req-b10f136e-d002-4a30-a182-09b6a85bebe1
Date: Thu, 08 Oct 2015 01:02:42 GMT
Error Execution Example¶
HTTP Request¶
DELETE /v2/895f0b8574504834bd6249d91dbda9c/os-keypairs/keypair-dab428fe-6186-4a14-b3de-92131f76cd39 HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token:aa8d8ee4622c4e10ace2a5a16b58caf2
Content-type: application/json
Accept: application/son
HTTP Response¶
HTTP/1.1 400 Bad Request
Content-Length: 187
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-78c7d015-35d0-44bd-9099-091b60562da6
Date: Thu, 08 Oct 2015 01:06:05 GMT
{"badRequest": {"message": "Malformed request URL: URL's project_id '895f0b8574504834bd6249d91dbda9c' doesn't match Context's project_id '895f0b8574504834bd6249d91dbd5a9c'", "code": 400}}