• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Port
  6. Querying a Port

Querying a Port

Function

This interface is used to query details about a specified port.

URI

GET /v2.0/ports/{port_id}

Request Message

None

Response Message

Table 1 Response parameter

Parameter

Type

Description

port

Dict

Specifies the port list. For details, see Table 1.

Example:

Example request

GET /v2.0/ports/791870bd-36a7-4d9b-b015-a78e9b06af08

Example response

{
    "port": {
        "id": "791870bd-36a7-4d9b-b015-a78e9b06af08",
        "name": "port-test",
        "status": "DOWN",
        "admin_state_up": true,
        "fixed_ips": [],
        "mac_address": "fa:16:3e:01:e0:b2",
        "network_id": "00ae08c5-f727-49ab-ad4b-b069398aa171",
        "tenant_id": "db82c9e1415a464ea68048baa8acc6b8",
        "project_id": "db82c9e1415a464ea68048baa8acc6b8",
        "device_id": "",
        "device_owner": "",
        "security_groups": [
            "d0d58aa9-cda9-414c-9c52-6c3daf8534e6"
        ],
        "extra_dhcp_opts": [],
        "allowed_address_pairs": [],
        "binding:vnic_type": "normal",
        "binding:vif_details": {},
        "binding:profile": {},
        "port_security_enabled": true,
        "created_at": "2018-09-13T01:43:41",
        "updated_at": "2018-09-13T01:43:41"
    }
}

Status Codes

For details, see section Status Codes.