Ports
Network port management operations
Lists ports to which the project has access.
OpenStack Keystone token authentication
Filter the list result by the administrative state of the resource.
Filter the list result by the ID of the resource.
Filter the list result by the human-readable name of the resource.
Filter the list result by the network ID.
Filter the list result by the ID of the project that owns the resource.
Filter the list result by the ID of the project that owns the resource.
Filter ports by device ID.
Filter ports by device owner.
Filter the list result by status.
The fields that you want the server to return. If no fields are specified, all fields are returned.
Sort direction. A valid value is asc (ascending) or desc (descending).
Sorts by a resource attribute.
A list of tags to filter the list result by. Resources that match all tags in this list will be returned.
A list of tags to filter the list result by. Resources that match any tag in this list will be returned.
A list of tags to filter the list result by. Resources that match all tags in this list will be excluded.
A list of tags to filter the list result by. Resources that match any tag in this list will be excluded.
Successful operation
Unauthorized
GET /v2.0/v2.0/ports HTTP/1.1
Host: 23.253.228.211:9696
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"ports": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"network_id": "123e4567-e89b-12d3-a456-426614174000",
"admin_state_up": true,
"status": "ACTIVE",
"mac_address": "text",
"fixed_ips": [
{
"subnet_id": "123e4567-e89b-12d3-a456-426614174000",
"ip_address": "0.0.0.0"
}
],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"tenant_id": "123e4567-e89b-12d3-a456-426614174000",
"device_id": "text",
"device_owner": "text",
"security_groups": [
"123e4567-e89b-12d3-a456-426614174000"
],
"allowed_address_pairs": [
{
"ip_address": "text",
"mac_address": "text"
}
],
"extra_dhcp_opts": [
{
"opt_name": "text",
"opt_value": "text",
"ip_version": 4
}
],
"port_security_enabled": true,
"dns_name": "text",
"dns_assignment": [
{
"hostname": "text",
"ip_address": "text",
"fqdn": "text"
}
],
"dns_domain": "text",
"data_plane_status": null,
"qos_policy_id": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"text"
],
"revision_number": 1,
"created_at": "2025-11-28T20:25:31.027Z",
"updated_at": "2025-11-28T20:25:31.027Z"
}
]
}Creates a port.
OpenStack Keystone token authentication
Port created successfully
Bad Request
Unauthorized
POST /v2.0/v2.0/ports HTTP/1.1
Host: 23.253.228.211:9696
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 698
{
"port": {
"name": "text",
"description": "text",
"network_id": "123e4567-e89b-12d3-a456-426614174000",
"admin_state_up": true,
"mac_address": "text",
"fixed_ips": [
{
"subnet_id": "123e4567-e89b-12d3-a456-426614174000",
"ip_address": "0.0.0.0"
}
],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"tenant_id": "123e4567-e89b-12d3-a456-426614174000",
"device_id": "text",
"device_owner": "text",
"security_groups": [
"123e4567-e89b-12d3-a456-426614174000"
],
"allowed_address_pairs": [
{
"ip_address": "text",
"mac_address": "text"
}
],
"extra_dhcp_opts": [
{
"opt_name": "text",
"opt_value": "text",
"ip_version": 4
}
],
"port_security_enabled": true,
"dns_name": "text",
"dns_domain": "text",
"qos_policy_id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"port": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"network_id": "123e4567-e89b-12d3-a456-426614174000",
"admin_state_up": true,
"status": "ACTIVE",
"mac_address": "text",
"fixed_ips": [
{
"subnet_id": "123e4567-e89b-12d3-a456-426614174000",
"ip_address": "0.0.0.0"
}
],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"tenant_id": "123e4567-e89b-12d3-a456-426614174000",
"device_id": "text",
"device_owner": "text",
"security_groups": [
"123e4567-e89b-12d3-a456-426614174000"
],
"allowed_address_pairs": [
{
"ip_address": "text",
"mac_address": "text"
}
],
"extra_dhcp_opts": [
{
"opt_name": "text",
"opt_value": "text",
"ip_version": 4
}
],
"port_security_enabled": true,
"dns_name": "text",
"dns_assignment": [
{
"hostname": "text",
"ip_address": "text",
"fqdn": "text"
}
],
"dns_domain": "text",
"data_plane_status": null,
"qos_policy_id": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"text"
],
"revision_number": 1,
"created_at": "2025-11-28T20:25:31.027Z",
"updated_at": "2025-11-28T20:25:31.027Z"
}
}Shows details for a port.
OpenStack Keystone token authentication
The ID of the port.
The fields that you want the server to return. If no fields are specified, all fields are returned.
Successful operation
Unauthorized
Not Found
GET /v2.0/v2.0/ports/{port_id} HTTP/1.1
Host: 23.253.228.211:9696
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"port": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"network_id": "123e4567-e89b-12d3-a456-426614174000",
"admin_state_up": true,
"status": "ACTIVE",
"mac_address": "text",
"fixed_ips": [
{
"subnet_id": "123e4567-e89b-12d3-a456-426614174000",
"ip_address": "0.0.0.0"
}
],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"tenant_id": "123e4567-e89b-12d3-a456-426614174000",
"device_id": "text",
"device_owner": "text",
"security_groups": [
"123e4567-e89b-12d3-a456-426614174000"
],
"allowed_address_pairs": [
{
"ip_address": "text",
"mac_address": "text"
}
],
"extra_dhcp_opts": [
{
"opt_name": "text",
"opt_value": "text",
"ip_version": 4
}
],
"port_security_enabled": true,
"dns_name": "text",
"dns_assignment": [
{
"hostname": "text",
"ip_address": "text",
"fqdn": "text"
}
],
"dns_domain": "text",
"data_plane_status": null,
"qos_policy_id": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"text"
],
"revision_number": 1,
"created_at": "2025-11-28T20:25:31.027Z",
"updated_at": "2025-11-28T20:25:31.027Z"
}
}Updates a port.
OpenStack Keystone token authentication
The ID of the port.
Port updated successfully
Bad Request
Unauthorized
Forbidden
Not Found
Precondition Failed
PUT /v2.0/v2.0/ports/{port_id} HTTP/1.1
Host: 23.253.228.211:9696
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 547
{
"port": {
"name": "text",
"description": "text",
"admin_state_up": true,
"fixed_ips": [
{
"subnet_id": "123e4567-e89b-12d3-a456-426614174000",
"ip_address": "0.0.0.0"
}
],
"device_id": "text",
"device_owner": "text",
"security_groups": [
"123e4567-e89b-12d3-a456-426614174000"
],
"allowed_address_pairs": [
{
"ip_address": "text",
"mac_address": "text"
}
],
"extra_dhcp_opts": [
{
"opt_name": "text",
"opt_value": "text",
"ip_version": 4
}
],
"port_security_enabled": true,
"dns_name": "text",
"dns_domain": "text",
"data_plane_status": null,
"qos_policy_id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"port": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"network_id": "123e4567-e89b-12d3-a456-426614174000",
"admin_state_up": true,
"status": "ACTIVE",
"mac_address": "text",
"fixed_ips": [
{
"subnet_id": "123e4567-e89b-12d3-a456-426614174000",
"ip_address": "0.0.0.0"
}
],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"tenant_id": "123e4567-e89b-12d3-a456-426614174000",
"device_id": "text",
"device_owner": "text",
"security_groups": [
"123e4567-e89b-12d3-a456-426614174000"
],
"allowed_address_pairs": [
{
"ip_address": "text",
"mac_address": "text"
}
],
"extra_dhcp_opts": [
{
"opt_name": "text",
"opt_value": "text",
"ip_version": 4
}
],
"port_security_enabled": true,
"dns_name": "text",
"dns_assignment": [
{
"hostname": "text",
"ip_address": "text",
"fqdn": "text"
}
],
"dns_domain": "text",
"data_plane_status": null,
"qos_policy_id": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"text"
],
"revision_number": 1,
"created_at": "2025-11-28T20:25:31.027Z",
"updated_at": "2025-11-28T20:25:31.027Z"
}
}Deletes a port.
OpenStack Keystone token authentication
The ID of the port.
Port deleted successfully
Unauthorized
Not Found
Precondition Failed
DELETE /v2.0/v2.0/ports/{port_id} HTTP/1.1
Host: 23.253.228.211:9696
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated
Was this helpful?
