Deleting network ports

DELETE /v2.0/ports/{port_id}

Delete a port with the specified ID. Any IP addresses that are associated with the port are returned to the respective subnets allocation pools.

Source: https://docs.openstack.org/api-ref/network/v2/index.html#delete-port

Request

Parameters

Name In Type Description
port_id path string The ID of the port.

Example

# curl -ks -X DELETE -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:9696/v2.0/ports/c85ae844-9ff5-4866-97da-546c3bf0144b

Response

Status codes

Success

Code Reason
204 - No Content The server has fulfilled the request.

Error

Code Reason
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.

412 - Precondition Failed

The server does not meet one of the preconditions that the requester put on the request header fields.