Specify the port which status is "Dettached".

You can attach an additional port up to one.

For local network, you can attach two port at most.

The VM should not be running when being attached.

Request URL

Compute API v2.0

POST /v2/{tenant_id}​/servers/​{server_id}​/os-interface

Request Paramters

Parameter Value Style Description
X-Auth-Token User Token header
tenant_id URI
server_id URI

Request Json

    "interfaceAttachment": {
        "port_id": "ce531f90-199f-48c0-816c-13e38010b442"

Normal response codes



curl -i -X POST \
-H "Accept: application/json" \
-H "X-Auth-Token: 35941e7df872405d84e5b026dba8323c" \
-d '{"interfaceAttachment": {"port_id": "8af5ffad-0ac1-471e-a157-ac0503222249"}}' \
HTTP/1.1 200 OK
Date: Wed, 10 Dec 2014 06:47:37 GMT
Server: Apache
Content-Length: 282
Content-Type: text/html; charset=UTF-8

    "interfaceAttachment": {
        "port_state": "DOWN",
        "fixed_ips": [
                "subnet_id": "dd8b5b89-7ae3-474c-8270-a983cb79643b",
                "ip_address": ""
        "port_id": "c35a9a4a-8003-4c9f-8403-d9ad35ff1c64",
        "net_id": "dff999a4-afa1-4766-9525-f31f1fde750e",
        "mac_addr": "fa:16:3e:88:8f:2e"