NSX-T Data Center REST API

Associated URIs:

API Description API Path

List IPSets


Returns paginated list of IPSets.The default page size for IPSet listing is 50.
GET /api/v1/ip-sets (Deprecated)

Create IPSet


Creates a new IPSet that can group either IPv4 or IPv6 individual ip addresses,
ranges or subnets.
POST /api/v1/ip-sets (Deprecated)

Delete IPSet


Deletes the specified IPSet. By default, if the IPSet is added to an
NSGroup, it won't be deleted. In such situations, pass "force=true" as
query param to force delete the IPSet.
DELETE /api/v1/ip-sets/{ip-set-id} (Deprecated)

Read IPSet


Returns information about the specified IPSet.
GET /api/v1/ip-sets/{ip-set-id} (Deprecated)

Add a IP address to a IPSet


Add/Remove an individual IP address to an IPSet.
POST /api/v1/ip-sets/{ip-set-id} (Deprecated)

Update IPSet


Updates the specified IPSet. Modifiable parameters include description,
display_name and ip_addresses.
PUT /api/v1/ip-sets/{ip-set-id} (Deprecated)

Get all IPAddresses in a IPSet


List all IP addresses in a IPSet.
GET /api/v1/ip-sets/{ip-set-id}/members (Deprecated)

List MACSets


Returns paginated list of MACSets.
GET /api/v1/mac-sets (Deprecated)

Create MACSet


Creates a new MACSet that can group individual MAC addresses.
POST /api/v1/mac-sets (Deprecated)

Delete MACSet


Deletes the specified MACSet. By default, if the MACSet is added to an
NSGroup, it won't be deleted. In such situations, pass "force=true" as
query param to force delete the MACSet.
DELETE /api/v1/mac-sets/{mac-set-id} (Deprecated)

Read MACSet


Returns information about the specified MACSet.
GET /api/v1/mac-sets/{mac-set-id} (Deprecated)

Update MACSet


Updates the specified MACSet. Modifiable parameters include the
description, display_name and mac_addresses.
PUT /api/v1/mac-sets/{mac-set-id} (Deprecated)

Get all MACAddresses in a MACSet


List all MAC addresses in a MACSet
GET /api/v1/mac-sets/{mac-set-id}/members (Deprecated)

Add a MAC address to a MACSet


Add an individual MAC address to a MACSet
POST /api/v1/mac-sets/{mac-set-id}/members (Deprecated)

Remove a MAC address from given MACSet


Remove an individual MAC address from a MACSet
DELETE /api/v1/mac-sets/{mac-set-id}/members/{mac-address} (Deprecated)

List NSGroups


List the NSGroups in a paginated format. The page size is restricted
to 50 NSGroups so that the size of the response remains small even
in the worst case.
Optionally, specify valid member types as request parameter to filter NSGroups.
GET /api/v1/ns-groups (Deprecated)

Create NSGroup


Creates a new NSGroup that can group NSX resources - VIFs, Lports
and LSwitches as well as the grouping objects - IPSet, MACSet and other
NSGroups.
For NSGroups containing VM criteria(both static and dynamic), system VMs will
not be included as members. This filter applies at VM level only.
Exceptions are as follows:
1. LogicalPorts and VNI of System VMs will be included in NSGroup if the criteria
is based on LogicalPort, LogicalSwitch or VNI directly.
POST /api/v1/ns-groups (Deprecated)

Delete NSGroup


Deletes the specified NSGroup. By default, if the NSGroup is added to
another NSGroup, it won't be deleted. In such situations, pass
"force=true" as query param to force delete the NSGroup.
DELETE /api/v1/ns-groups/{ns-group-id} (Deprecated)

Read NSGroup


Returns information about the specified NSGroup.
GET /api/v1/ns-groups/{ns-group-id} (Deprecated)

Add NSGroup expression


Add/remove the expressions passed in the request body to/from the NSGroup
POST /api/v1/ns-groups/{ns-group-id} (Deprecated)

Update NSGroup


Updates the specified NSGroup. Modifiable parameters include the
description, display_name and members.
For NSGroups containing VM criteria(both static and dynamic), system VMs will
not be included as members. This filter applies at VM level only.
Exceptions are as follows.
1. LogicalPorts and VNI of system VMs will be included in NSGroup if the criteria
is based on LogicalPort, LogicalSwitch or VNI directly.
PUT /api/v1/ns-groups/{ns-group-id} (Deprecated)

Get consolidated Effective IPAddress translated from the NSGroup


Returns the consolidated effective IP address members of the specified NSGroup. This is applicable in the case of a
federated environment. The response includes a site-wise list of static and dynamically translated effective IP
address members. If the ns-group evaluation on a site is empty, the response will contain the site-id with empty list.
If an ns-group is a reference group on a site, then its consolidated effective IP response will contain the effective IPs
from other sites, and the response will contain an empty list of IPs for the sites where is it a reference group.

This API is applicable only for Global Groups that contain (either directly or via nesting) VirtualMachine,
VIF, Segment, SegmentPort, or IPSet member types. Please use the cursor value in the response to fetch the next page.
If there is no cursor value in the response, it indicates that it is the last page of results for the query.
GET /api/v1/ns-groups/{ns-group-id}/consolidated-effective-ip-address-members (Deprecated)

Get Effective Cloud Native Service Instances of the specified NSGroup.


Returns effective cloud native service instances of the specified NSGroup.
This API is applicable only for NSGroups containing CloudNativeServiceInstance member type.
For NSGroups containing other member types,it returns an empty list. target_id in response
is external_id of CloudNativeServiceInstance
GET /api/v1/ns-groups/{ns-group-id}/effective-cloud-native-service-instance-members (Deprecated)

Get Effective Directory Groups of the specified NSGroup.


Returns effective directory groups which are members of the specified NSGroup.
This API is applicable only for NSGroups containing DirectoryGroup member type.
For NSGroups containing other member types,it returns an empty list.
GET /api/v1/ns-groups/{ns-group-id}/effective-directory-group-members (Deprecated)

Get Effective IPAddress translated from the NSGroup


Returns effective ip address members of the specified NSGroup.
This API is applicable only for NSGroups containing either
VirtualMachine, VIF, LogicalSwitch, LogicalPort or IPSet member type.
For NSGroups containing other member types,it returns an empty list.
GET /api/v1/ns-groups/{ns-group-id}/effective-ip-address-members (Deprecated)

Get Effective IPSets of the specified NSGroup.


Returns effective IPSets which are members of the specified NSGroup.
This API is applicable only for NSGroups containing IPSet member type.
For NSGroups containing other member types,it returns an empty list.
GET /api/v1/ns-groups/{ns-group-id}/effective-ipset-members (Deprecated)

Get Effective Logical Ports translated from the NSgroup


Returns effective logical port members of the specified NSGroup.
This API is applicable only for NSGroups containing either VirtualMachines,
LogicalSwitch or LogicalPort member types.For NSGroups containing other
member types,it returns an empty list.
GET /api/v1/ns-groups/{ns-group-id}/effective-logical-port-members (Deprecated)

Get Effective switch members translated from the NSGroup


Returns effective logical switch members of the specified NSGroup.
This API is applicable for NSGroups containing LogicalSwitch members.
For NSGroups containing other member types,it returns an empty list.
GET /api/v1/ns-groups/{ns-group-id}/effective-logical-switch-members (Deprecated)

Get Effective Physical Server Memebers of the specified NSGroup.


Returns effective physical server members of the specified NSGroup.
This API is applicable only for NSGroups containing Physical Server member type.
For NSGroups containing other member types,it returns an empty list.
GET /api/v1/ns-groups/{ns-group-id}/effective-physical-server-members (Deprecated)

Get effective transport node members translated from the NSGroup


Returns effective transport node members of the specified NSGroup.
This API is applicable only for NSGroups containing TransportNode member type.
For NSGroups containing other member types,it returns an empty list.
GET /api/v1/ns-groups/{ns-group-id}/effective-transport-node-members (Deprecated)

Get effective VIF members translated from the NSGroup


Returns effective VIF members of the specified NSGroup.
This API is applicable only for NSGroups containing either
VirtualMachines or VIF member type. For NSGroups containing other
member types,it returns an empty list.
GET /api/v1/ns-groups/{ns-group-id}/effective-vif-members (Deprecated)

Get Effective Virtual Machine members of the specified NSGroup.


Returns effective virtual machine members of the specified NSGroup.
This API is applicable only for NSGroups containing VirtualMachine member type.
For NSGroups containing other member types,it returns an empty list.
GET /api/v1/ns-groups/{ns-group-id}/effective-virtual-machine-members (Deprecated)

Get member types from NSGroup


Returns member types for a specified NSGroup including child NSGroups.
This considers static members and members added via membership criteria only
GET /api/v1/ns-groups/{ns-group-id}/member-types (Deprecated)

Get services to which the given nsgroup belongs to


Returns information about services that are associated with the given NSGroup.
The service name is passed by service_type parameter
GET /api/v1/ns-groups/{nsgroup-id}/service-associations (Deprecated)

Get the list of all the virtual machines that are not a part of any existing NSGroup.


Get the list of all the virtual machines that are not a part of any existing NSGroup.
GET /api/v1/ns-groups/unassociated-virtual-machines (Deprecated)

List NSProfiles


List the NSProfiles created in a paginated format.The page size is restricted
to 50 NSProfiles, so that the size of the response remains small even
when there are high number of NSProfiles with multiple attributes and
multiple attribute values for each attribute.
GET /api/v1/ns-profiles (Deprecated)

Create NSProfile


Creates a new NSProfile which allows users to encapsulate attribute and
sub-attributes of network services.
Rules for using attributes and sub-attributes in single NSProfile
1. One type of attribute can't have multiple occurrences. ( Example -
Attribute type APP_ID can be used only once per NSProfile.)
2. Values for an attribute are mentioned as array of strings.
( Example - For type APP_ID , values can be mentioned as ["SSL","FTP"].)
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://<nsx-mgr>/api/v1/ns-profiles/attributes
POST /api/v1/ns-profiles (Deprecated)

Delete NSProfile


Deletes the specified NSProfile. By default, if the NSProfile is
consumed in a Firewall rule, it won't get deleted. In such
situations, pass "force=true" as query param to force delete
the NSProfile.
DELETE /api/v1/ns-profiles/{ns-profile-id} (Deprecated)

Read NSProfile


Returns information about the specified NSProfile.
GET /api/v1/ns-profiles/{ns-profile-id} (Deprecated)

Update NSProfile


Updates the specified NSProfile.
Rules for using attributes and sub-attributes in single NSProfile
1. One type of attribute can't have multiple occurrences. ( Example -
Attribute type APP_ID can be used only once per NSProfile.)
2. Values for an attribute are mentioned as array of strings.
( Example - For type APP_ID , values can be mentioned as ["SSL","FTP"].)
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://<nsx-mgr>/api/v1/ns-profiles/attributes
PUT /api/v1/ns-profiles/{ns-profile-id} (Deprecated)

List NSProfile supported attribute types


Returns supported attribute type strings for NSProfile.
GET /api/v1/ns-profiles/attribute-types (Deprecated)

List NSProfile supported attribute and sub-attributes


Returns supported attribute and sub-attributes for specified
attribute type with their supported values, if provided in query/request
parameter, else will fetch all supported attribute and sub-attributes for
all supported attribute types.
GET /api/v1/ns-profiles/attributes (Deprecated)

List all NSServiceGroups


Returns paginated list of NSServiceGroups
GET /api/v1/ns-service-groups (Deprecated)

Create NSServiceGroup


Creates a new NSServiceGroup which can contain NSServices.
A given NSServiceGroup can contain either only ether type of NSServices
or only non-ether type of NSServices, i.e. an NSServiceGroup cannot
contain a mix of both ether and non-ether types of NSServices.
POST /api/v1/ns-service-groups (Deprecated)

Delete NSServiceGroup


Deletes the specified NSServiceGroup. By default, if the NSServiceGroup is
consumed in a Firewall rule, it won't get deleted. In such situations, pass
"force=true" as query param to force delete the NSServiceGroup.
DELETE /api/v1/ns-service-groups/{ns-service-group-id} (Deprecated)

Read NSServiceGroup


Returns information about the specified NSServiceGroup
GET /api/v1/ns-service-groups/{ns-service-group-id} (Deprecated)

Update NSServiceGroup


Updates the specified NSService. Modifiable parameters include the description,
display_name and members.
PUT /api/v1/ns-service-groups/{ns-service-group-id} (Deprecated)

List all NSServices


Returns paginated list of NSServices
GET /api/v1/ns-services (Deprecated)

Create NSService


Creates a new NSService which allows users to specify characteristics to use
for matching network traffic.
POST /api/v1/ns-services (Deprecated)

Delete NSService


Deletes the specified NSService. By default, if the NSService is being
referred in an NSServiceGroup, it can't be deleted. In such situations,
pass "force=true" as a parameter to force delete the NSService. System
defined NSServices can't be deleted using "force" flag.
DELETE /api/v1/ns-services/{ns-service-id} (Deprecated)

Read NSService


Returns information about the specified NSService
GET /api/v1/ns-services/{ns-service-id} (Deprecated)

Update NSService


Updates the specified NSService. Modifiable parameters include the description,
display_name and the NSService element. The system defined NSServices can't be
modified
PUT /api/v1/ns-services/{ns-service-id} (Deprecated)