Skip to main content

Show Network Port Details

Retrieve the details of a single network port by its ID.

Default policy settings allow you to view ports owned by your project (unless you have administrative privileges).

Request

GET /v2.0/ports/{port_id}

Path Parameters

NameInTypeDescription
port_idpathstringThe ID of the port to retrieve.

Query Parameters

NameInTypeDescription
fields (Optional)querystringLimits the returned attributes. Can be repeated (e.g. ?fields=id&fields=name). If omitted, all attributes allowed by policy are returned.

Example Request

curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:9696/v2.0/ports/2d74fa0c-3e43-4fd9-a234-cbb4996cc684

Response

Response Parameters

If successful the API returns a single port object with the attributes below.

NameInTypeDescription
portbodyobjectPort object wrapper.
idbodystringPort ID.
namebodystringHuman-readable name of the port.
network_idbodystringID of the attached network.
tenant_idbodystringProject ID (legacy field).
project_idbodystringOwning project ID.
mac_addressbodystringMAC address of the port (may be overridden for direct-physical).
admin_state_upbodybooleanAdministrative state (true or false).
statusbodystringPort status: ACTIVE, DOWN, BUILD, or ERROR.
device_idbodystringID of the attached device (server, router, etc.).
device_ownerbodystringEntity type using the port (e.g. compute:nova).
fixed_ipsbodyarrayList of {subnet_id, ip_address} assigned to the port.
port_security_enabledbodybooleanWhether port security is enabled.
qos_policy_idbodystringQoS policy directly applied to the port (or null).
qos_network_policy_idbodystringQoS policy of the parent network (or null).
security_groupsbodyarraySecurity group IDs applied.
binding:vnic_typebodystringvNIC type: normal, macvtap, direct, baremetal, direct-physical, virtio-forwarder, smart-nic, remote-managed.
binding:profilebodyobjectBackend-specific VIF info (empty {} if none).
binding:host_idbodystringHost ID where the port resides.
binding:vif_typebodystringMechanism driver type or unbound / binding_failed.
binding:vif_detailsbodyobjectAdditional info (e.g. port_filter, ovs_hybrid_plug).
allowed_address_pairsbodyarrayAllowed address pairs (ip_address, optional mac_address).
extra_dhcp_optsbodyarrayExtra DHCP option objects.
descriptionbodystringDescription.
resource_request (Optional)bodyobjectPlacement resources & traits requested.
tagsbodyarrayTag list.
created_atbodystringCreation timestamp (ISO 8601).
updated_atbodystringLast update timestamp (ISO 8601) or recent timestamp.
revision_numberbodyintegerRevision number.
ip_allocationbodystringAllocation mode: immediate, deferred, or none (if present).
dns_assignmentbodyobjectInternal DNS assignment (hostname, ip_address, fqdn).
dns_domainbodystringDNS domain.
dns_namebodystringDNS name.
hintsbodyobjectOVS Userspace Tx packet steering hints (admin-only) if present.
numa_affinity_policy (Optional)bodystringNUMA affinity policy: none, required, preferred, or legacy.
propagate_uplink_statusbodybooleanUplink status propagation flag.
mac_learning_enabled (Optional)bodybooleanWhether MAC learning is enabled.
port_trusted_vifbodybooleanTrusted VIF status (also in binding:profile).
data_plane_statusbodystringUnderlying data plane status if reported.

Status Codes

Success

CodeReason
200 - OKRequest was successful.

Error

CodeReason
401 - UnauthorizedUser must authenticate before making a request.
404 - Not FoundThe requested port could not be found.

Example Response

{
"port": {
"id": "2d74fa0c-3e43-4fd9-a234-cbb4996cc684",
"name": "private-port",
"network_id": "f858b8d1-e66b-4a48-bc2e-3f16483b1b58",
"tenant_id": "f33507157a634f1cac71e06a70fb558e",
"mac_address": "fa:16:3e:7f:ae:b2",
"admin_state_up": true,
"status": "DOWN",
"device_id": "",
"device_owner": "",
"fixed_ips": [
{
"subnet_id": "adffaac8-2261-43f7-9e4f-6044230f65f1",
"ip_address": "192.168.1.12"
}
],
"allowed_address_pairs": [],
"extra_dhcp_opts": [],
"security_groups": [
"e1c1aa83-7302-4493-9cf4-43c2407e8074"
],
"description": "",
"binding:vnic_type": "normal",
"port_security_enabled": true,
"qos_policy_id": null,
"qos_network_policy_id": "dfc42ced-02c8-4b1f-bbe6-14cc014f259d",
"tags": [],
"created_at": "2025-10-08T08:05:12Z",
"updated_at": "2025-10-08T08:05:12Z",
"revision_number": 1,
"project_id": "f33507157a634f1cac71e06a70fb558e"
}
}

See Also