Policy > Networking > Connectivity > Segments > Ports

List infra segment ports

List all the ports for an infra.
This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost, Hyperscalers) or VMware NSX.

Request:

Method:
GET
URI Path(s):
/policy/api/v1/infra/segments/{segment-id}/ports
/policy/api/v1/global-infra/segments/{segment-id}/ports
/policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/segments/{segment-id}/ports
Request Headers:
n/a
Query Parameters:
SegmentPortListRequestParameters+
Request Body:
n/a

Example Request:

GET https://<policy-mgr>/policy/api/v1/infra/segments/production-t1-seg/ports/

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
SegmentPortListResult+

Example Response:

{ "results": [ { "resource_type": "SegmentPort", "id": "default:183a3789-826b-41fc-8642-a6834551d4bc", "display_name": "default:183a3789-826b-41fc-8642-a6834551d4bc", "path": "/infra/segments/production-t1-seg/ports/default:183a3789-826b-41fc-8642-a6834551d4bc", "relative_path": "default:183a3789-826b-41fc-8642-a6834551d4bc", "parent_path": "/infra/segments/production-t1-seg", "marked_for_delete": false, "_create_user": "system", "_create_time": 1544503100539, "_last_modified_user": "system", "_last_modified_time": 1544503100539, "_system_owned": true, "_protection": "NOT_PROTECTED", "_revision": 0 }, { "resource_type": "SegmentPort", "id": "default:7555e0d8-f8f7-47c1-a93c-436eb5a6628a", "display_name": "default:7555e0d8-f8f7-47c1-a93c-436eb5a6628a", "path": "/infra/segments/production-t1-seg/ports/default:7555e0d8-f8f7-47c1-a93c-436eb5a6628a", "relative_path": "default:7555e0d8-f8f7-47c1-a93c-436eb5a6628a", "parent_path": "/infra/segments/production-t1-seg", "marked_for_delete": false, "_create_user": "system", "_create_time": 1544503100542, "_last_modified_user": "system", "_last_modified_time": 1544503100542, "_system_owned": true, "_protection": "NOT_PROTECTED", "_revision": 0 }, { "resource_type": "SegmentPort", "id": "default:ab5e6c6d-ca35-499d-b448-fbb82ed1664b", "display_name": "default:ab5e6c6d-ca35-499d-b448-fbb82ed1664b", "path": "/infra/segments/production-t1-seg/ports/default:ab5e6c6d-ca35-499d-b448-fbb82ed1664b", "relative_path": "default:ab5e6c6d-ca35-499d-b448-fbb82ed1664b", "parent_path": "/infra/segments/production-t1-seg", "marked_for_delete": false, "_create_user": "system", "_create_time": 1544503100524, "_last_modified_user": "system", "_last_modified_time": 1544503100524, "_system_owned": true, "_protection": "NOT_PROTECTED", "_revision": 0 } ], "result_count": 3, "sort_by": "display_name", "sort_ascending": true }

Required Permissions:

read

Feature:

policy_segment

Additional Errors: