Policy > Networking > Connectivity > Segments > Segments (Fixed)

Paginated list of all fixed segments (identified as /policy/api/v1/infra/tier-1s//segments/) under Tier-1 instance.

Paginated list of all fixed segments (identified as /policy/api/v1/infra/tier-1s//segments/) under Tier-1 instance.
This API call does not return flexible segments (identified as /policy/api/v1/infra/segments/) connected to the Tier-1.
To return all segments connected as a downlink to a Tier-1 one possibility is to use the search API with: https://{{nsx-mgr}}/policy/api/v1/search?query=resource_type:Segment%20AND%20connectivity_path:“/infra/tier-1s/
Extended Segment: Please note that old vpn path deprecated. If user specify old l2vpn path in the
"l2_extension" object in the PUT/PATCH API payload, the path returned in the GET response payload may include the new path
instead of the deprecated l2vpn path. Both old and new l2vpn path refer to same resource. there is no functional impact.
Also note that l2vpn path included in the error messages returned from validation may include the new VPN path
instead of the deprecated l2vpn path. Both new path and old vpn path refer to same resource.

Request:

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

Example Request:

GET https://<policy-mgr>/policy/api/v1/infra/tier-1s/cgw/segments

Successful Response:

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

Example Response:

{ "sort_ascending": true, "sort_by": "display_name", "result_count": 1, "results": [ { "resource_type": "Segment", "id": "web-tier", "display_name": "web-tier", "path": "/infra/tier-1s/cgw/segments/web-tier", "parent_path": "/infra/tier-1s/cgw", "relative_path": "web-tier", "subnets": [ { "gateway_address": "40.1.1.1/16", "dhcp_ranges": [ "40.1.2.0/24" ] } ], "_create_user": "admin", "_create_time": 1516668961954, "_last_modified_user": "admin", "_last_modified_time": 1516668961954, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 } ] }

Required Permissions:

read

Feature:

policy_segment

Additional Errors: