System Administration > Configuration > Fabric > Containers > Container Clusters

Return a network policy spec

Returns information about a specific network policy.

Request:

Method:
GET
URI Path(s):
/api/v1/fabric/container-network-policies/<network-policy-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request:

GET https://<nsx-mgr>/api/v1/fabric/container-network-policies/a2228fbc-6026-11e9-980c-dca9048e157d

Successful Response:

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

Example Response:

{ "external_id": "a2228fbc-6026-11e9-980c-dca9048e157d", "container_cluster_id": "a19ad270-6026-11e9-980c-dca9048e157d", "container_project_id": "a1ba2e72-6026-11e9-980c-dca9048e157d", "spec": "!!python/unicode 'podSelector':\n !!python/unicode 'matchLabels': {!!python/unicode 'app': !!python/unicode 'mgmtapp'}\n!!python/unicode 'policyTypes': [!!python/unicode 'Ingress']\n", "policy_type": "NETWORK_POLICY", "origin_properties": [ { "key": "prop0", "value": "val0" } ], "resource_type": "ContainerNetworkPolicy", "display_name": "policy-1", "_last_sync_time": 1555405480267 }

Required Permissions:

read

Feature:

containers_inventory

Additional Errors: