NSX-T Data Center REST API

Associated URIs:

API Description API Path

Get PolicyContextProfiles


Get all PolicyContextProfiles
GET /policy/api/v1/infra/context-profiles
GET /policy/api/v1/global-infra/context-profiles
GET /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/context-profiles

Delete Policy Context Profile


Deletes the specified Policy Context Profile. If the Policy Context
Profile is consumed in a firewall rule, it won't get deleted.
DELETE /policy/api/v1/infra/context-profiles/{context-profile-id}
DELETE /policy/api/v1/global-infra/context-profiles/{context-profile-id}
DELETE /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/context-profiles/{context-profile-id}

Get PolicyContextProfile


Get a single PolicyContextProfile by id
GET /policy/api/v1/infra/context-profiles/{context-profile-id}
GET /policy/api/v1/global-infra/context-profiles/{context-profile-id}
GET /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/context-profiles/{context-profile-id}

Create PolicyContextProfile


Creates/Updates a PolicyContextProfile, which encapsulates attribute and
sub-attributes of network services.
Rules for using attributes and sub-attributes in single PolicyContextProfile
1. One type of attribute can't have multiple occurrences. ( Eg. -
Attribute type APP_ID can be used only once per PolicyContextProfile.)
2. For specifying multiple values for an attribute, provide them in an array.
3. If sub-attribtes are mentioned for an attribute, then only single
value is allowed for that attribute.
4. To get a list of supported attributes and sub-attributes fire the following REST API
GET https://<policy-mgr>/policy/api/v1/infra/context-profiles/attributes
5. Do not create context profile with "custom_attributes" id
PATCH /policy/api/v1/infra/context-profiles/{context-profile-id}
PATCH /policy/api/v1/global-infra/context-profiles/{context-profile-id}
PATCH /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/context-profiles/{context-profile-id}

Create PolicyContextProfile


Creates/Updates a PolicyContextProfile, which encapsulates attribute and
sub-attributes of network services.
Rules for using attributes and sub-attributes in single PolicyContextProfile
1. One type of attribute can't have multiple occurrences. ( Eg. -
Attribute type APP_ID can be used only once per PolicyContextProfile.)
2. For specifying multiple values for an attribute, provide them in an array.
3. If sub-attribtes are mentioned for an attribute, then only single
value is allowed for that attribute.
4. To get a list of supported attributes and sub-attributes fire the following REST API
GET https://<policy-mgr>/policy/api/v1/infra/context-profiles/attributes
5. Do not create context profile with "custom_attributes" id
PUT /policy/api/v1/infra/context-profiles/{context-profile-id}
PUT /policy/api/v1/global-infra/context-profiles/{context-profile-id}
PUT /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/context-profiles/{context-profile-id}

List Context Profile supported attribute types


Returns supported attribute type strings for Context Profile.
GET /policy/api/v1/infra/context-profiles/attribute-types

List Policy Context Profile supported attributes and sub-attributes


Returns supported attribute and sub-attributes for specified
attribute key with their supported values, if provided in query/request
parameter, else will fetch all supported attributes and sub-attributes for
all supported attribute keys.
Alternatively, to get a list of supported attributes and sub-attributes fire the following REST API
GET https://<policy-mgr>/policy/api/v1/infra/context-profiles/attributes
GET /policy/api/v1/infra/context-profiles/attributes
GET /policy/api/v1/global-infra/context-profiles/attributes
GET /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/context-profiles/attributes

Update custom object attribute value list for given attribute key


This API updates custom attribute value list for given key.
PATCH /policy/api/v1/infra/context-profiles/custom-attributes (Deprecated)
PATCH /policy/api/v1/global-infra/context-profiles/custom-attributes (Deprecated)
PATCH /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/context-profiles/custom-attributes (Deprecated)

Adds/Removes custom attribute values from list


This API adds/removes custom attribute values from list for a given attribute key.
POST /policy/api/v1/infra/context-profiles/custom-attributes (Deprecated)
POST /policy/api/v1/global-infra/context-profiles/custom-attributes (Deprecated)
POST /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/context-profiles/custom-attributes (Deprecated)

Retrieves custom attribute values for given attribute key


This API lists all the custom attribute values defined in the system for the attribute_key
mentioned as part of the url.
GET /policy/api/v1/infra/context-profiles/custom-attributes/default
GET /policy/api/v1/global-infra/context-profiles/custom-attributes/default
GET /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/context-profiles/custom-attributes/default

Update custom attribute value list for given attribute key.


This API updates custom attribute value list for given key in the request. This replaces the
existing list with the list provided in the request
PATCH /policy/api/v1/infra/context-profiles/custom-attributes/default
PATCH /policy/api/v1/global-infra/context-profiles/custom-attributes/default
PATCH /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/context-profiles/custom-attributes/default

Adds/Removes custom attribute values from list


This API adds/removes custom attribute values from list for a given attribute key. The values in the
request will be added or removed from the existing list.
POST /policy/api/v1/infra/context-profiles/custom-attributes/default
POST /policy/api/v1/global-infra/context-profiles/custom-attributes/default
POST /policy/api/v1/orgs/{org-id}/projects/{project-id}/infra/context-profiles/custom-attributes/default