Policy >
Networking
>
Connectivity
>
Segments
>
Statistics
Get infra segments by configuration state
Returns all infra segments with configuration state on the enforcement
point specified in the request
Request:
Method:
GET
URI Path(s):
/policy/api/v1/infra/segments/state
/policy/api/v1/global-infra/segments/state
/policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/segments/state
Request Headers:
n/a
Query Parameters:
SegmentStateRequestParameters
+
SegmentStateRequestParameters
(
schema
)
Name
Description
Type
Notes
configuration_state
Configuration state of the segment on enforcement point
string
Enum: pending, in_progress, success, failed, partial_success, orphaned, unknown
enforcement_point_path
String Path of the enforcement point
enforcement point path, forward slashes must be escaped using %2F.
string
source
The data source, either realtime or cached. If not provided, cached data is returned.
DataSourceType
Request Body:
n/a
Example Request:
https://{{nsx-mgr}}/policy/api/v1/infra/segments/state?configuration_state=success&enforcement_point_path=/infra/sites/default/enforcement-points/default
Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
SegmentConfigurationStateListResult
+
SegmentConfigurationStateListResult
(
schema
)
Name
Description
Type
Notes
_links
References related to this resource
The server will populate this field when returing the resource. Ignored on PUT and POST.
array of
ResourceLink
Readonly
_schema
Schema for this resource
string
Readonly
_self
Link to this resource
SelfResourceLink
Readonly
cursor
Opaque cursor to be used for getting next page of records (supplied by current result page)
string
Readonly
result_count
Count of results found (across all pages), set only on first page
integer
Readonly
results
Paged Collection of Segment State on specific Enforcement Point
Paged Collection of Segment State on specific Enforcement Point
array of
SegmentConfigurationState
sort_ascending
If true, results are sorted in ascending order
boolean
Readonly
sort_by
Field by which records are sorted
string
Readonly
Example Response:
{ "results": [ { "segment_path": "/infra/segments/test-infra-seg", "state": "success", "details": [] }, { "segment_path": "/infra/segments/md-proxy-seg1", "state": "success", "details": [] }, { "segment_path": "/infra/segments/test-t0-dl", "state": "success", "details": [] }, { "segment_path": "/infra/segments/t0-ext-seg", "state": "success", "details": [] }, { "segment_path": "/infra/segments/TIER0_DOWN_LINK_SWITCH", "state": "success", "details": [] } ], "result_count": 5 }
Required Permissions:
read
Feature:
policy_statistics
Additional Errors:
404 Not Found
301 Moved Permanently
307 Temporary Redirect
400 Bad Request
403 Forbidden
409 Conflict
412 Precondition Failed
500 Internal Server Error
503 Service Unavailable