Detach interface

Overview

Detaches a specified port interface

Classification

  • Detach

API Operation Object

  • os-interface

Synchronous / Asynchronous

  • -

Request

HTTP Request Method

  • DELETE

HTTP Request Path

{api_endpoint}/v2/{tenant_id}/servers/{server_id}/os-interface/{attachment_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 String The ID for the tenant or account in a multi-tenancy cloud. required
server_id URI UUID The UUID for the server of interest to you. required
attachment_id URI UUID The interface ID. required

Response

HTTP Response Header

Format

HTTP/1.1 <response_code> <message>       (ex. 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 Code

Response Codes
response code condition
200 normal end
400 badRequest
- NetworkNotFound
401 unauthorized
403 forbidden
405 badMethod
413 overLimit
415 badMediaType
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}/servers/{server_id}/os-interface/{attachment_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 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/ad355aa6ed3e4cf5ae0fa0df652bc291/servers/aef82e69-0b3e-4056-b1b6-c37d5a278183/os-interface/bf478925-7857-44ea-b058-5aeba9c51323 HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token: 247558b04ebb4114baefa1f22fa180ed
Content-type: application/json
Accept: application/json

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: text/html; charset=UTF-8
Content-Length: 0
X-Compute-Request-Id: req-8c56c25c-5863-40e3-ac5b-2f93105b6d35
Date: Thu, 15 Oct 2015 06:19:13 GMT

Error Execution Example

HTTP Request

DELETE /v2/ad355aa6ed3e4cf5ae0fa0df652bc290/servers/aef82e69-0b3e-4056-b1b6-c37d5a278183/os-interface/bf478925-7857-44ea-b058-5aeba9c51323 HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token: 247558b04ebb4114baefa1f22fa180ed
Content-type: application/json
Accept: application/json

HTTP Response

HTTP/1.1 400 Bad Request
Content-Length: 188
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-712ad47a-3953-4bb5-92d4-d1601752cd57
Date: Thu, 15 Oct 2015 06:20:50 GMT

{"badRequest": {"message": "Malformed request URL: URL's project_id 'ad355aa6ed3e4cf5ae0fa0df652bc290' doesn't match Context's project_id 'ad355aa6ed3e4cf5ae0fa0df652bc291'", "code": 400}}