NSX-T Manager API Guide

NSX 2.0.0

Table of Contents

  1. Overview
  2. API Methods
    1. Users and Roles
    2. Aggregation Service
      1. Configuration
    3. Api Services
      1. Api Request Batching
      2. Authentication
      3. Task Management
    4. App Discovery
    5. Associations
    6. Error Resolver
    7. Fabric
      1. Compute Collections
      2. Computemanagers
      3. Discovered Nodes
      4. Nodes
      5. Vifs
      6. Virtual Machines
    8. Grouping Objects
      1. Ip Sets
      2. Mac Sets
      3. Ns Groups
      4. Ns Service Groups
      5. Ns Services
    9. Licensing
    10. Logical Routing And Services
      1. Bfd Peers
      2. Dhcp Relay
      3. Dhcp Relay Profiles
      4. Logical Router Ports
      5. Logical Routers
      6. Nat
      7. Routing Bfd Configuration
      8. Routing Configuration
      9. Service Profiles
      10. Services
    11. Logical Switching
      1. Logical Switch Ports
      2. Logical Switches
      3. Switching Profiles
    12. Network Transport
      1. Bridge Clusters
      2. Bridge Endpoints
      3. Cluster Profiles
      4. Edge Clusters
      5. Hostswitch Profiles
      6. Transport Nodes
      7. Transport Profiles
      8. Transport Zones
    13. Normalization
    14. Nsx Component Administration
      1. Appliance Management
      2. Backup Restore Management
        1. Backup
        2. Restore
      3. Cluster Management
      4. Nsx Administration
      5. Trust Management
        1. Certificate
        2. Crl
        3. Csr
    15. Operations
      1. Ipfix
    16. Pool Management
      1. Ip Blocks
      2. Ip Pools
      3. Mac Pools
      4. Vni Pools
      5. Vtep Label Pools
    17. Realization
    18. Services
      1. Dhcp
      2. Firewall
      3. Metadata Proxy
      4. Networkencryption
    19. Transport Entities
      1. Transport-Nodes
    20. Troubleshooting And Monitoring
      1. Heatmap
      2. Ipfix
      3. Portconnection
      4. Portmirroring
      5. System Logs
      6. Traceflow
    21. Upgrade
      1. Bundle
      2. Group
      3. History
      4. Nodes
      5. Plan
      6. Status
      7. Upgradeunits
  3. API Types
  4. API Type Schemas
  5. API Errors


Overview

Introduction

NSX-T Manager provides a programmatic API to automate management activities. The API follows a resource-oriented Representational State Transfer (REST) architecture, using JSON object encoding. Clients interact with the API using RESTful web service calls over the HTTPS protocol.

Each API method is identified by a request method and URI. Method parameters are specified as key-value pairs appended to the URI. Unless otherwise noted, request and response bodies are encoded using JSON, and must conform to the JSON schema associated with each method. The content type of each request and reply is "application/json" unless otherwise specified. Each request that can be made is documented in the API Methods section. The associated request and response body schemas are documented in the API Schemas section.

Some APIs may be marked as deprecated. This indicates that the functionality provided by the API has been removed or replaced with a different API. The description of the API will indicate what API(s) to call instead.

Some APIs may be marked as experimental. This indicates that the API may be changed or removed without notice in a future NSX-T Manager release.

It is possible for any request to fail. Errors are reported using standard HTTP response codes. It should be assumed the following errors could be returned by any API method: 301 Moved Permanently, 307 Temporary Redirect, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 500 Internal Server Error, 503 Service Unavailable. Where other errors may be returned, the type of error is indicated in the API method description. All errors are documented in the API Errors section. It is possible for requests to partially complete before failing. Any inconsistent state resulting from a failure must be resolved by the caller.

Request Authentication

Most API calls require authentication. This API supports HTTP Basic authentication and session-based authentication schemes. Multiple authentication schemes may not be used concurrently.

HTTP Basic Authentication

To authenticate a request using HTTP Basic authentication, the caller's credentials are passed using the 'Authorization' header. The header content should consist of a base64-encoded string containing the username and password separated by a single colon (":") character, as specified in RFC 1945 section 11.1.

For example, to authenticate a request using the default credentials of user admin with password admin, include the following header with the request:

Authorization: Basic YWRtaW46YWRtaW4=

The following cURL command will authenticate to the manager using basic authentication and will issue a GET request for logical ports:

curl -k -u USERNAME:PASSWORD https://MANAGER/api/v1/logical-ports

where:
USERNAME is the user to authenticate as,
PASSWORD is the password to provide, and
MANAGER is the IP address or host name of the NSX manager

For example:

curl -k -u admin:secretPw99 https://192.168.22.32/api/v1/logical-ports

Note: the -k argument instructs cURL to skip verifying the manager's self-signed X.509 certificate.

Session-Based Authentication

Session-based authentication is used by calling the /api/session/create authentication API to manage a session cookie. The session cookie returned in the result of a successful login must be provided in subsequent requests in order to associate those requests with the session.

Session state is local to the server responding to the API request. Idle sessions will automatically time-out, or can be terminated immediately using the POST /logout API.

To obtain a session cookie, POST form data to the server using the application/x-ww-form-urlencoded media type, with fields "j_username" and "j_password" containing the username and password separated by an ampersand. Since an ampersand is a UNIX shell metacharacter, you may need to surround the argument with single quotes.

The following cURL command will authenticate to the server and will deposit the session cookie in the file "cookies.txt":

curl -k -c cookies.txt -X POST -d 'j_username=USERNAME&j_password=PASSWORD' https://MANAGER/api/session/create

For example:

curl -k -c cookies.txt -X POST -d 'j_username=admin&j_password=secretPw99' https://192.168.22.32/api/session/create

The manager will respond with the roles and permissions granted to the user, and cURL will deposit the session cookie into the file "cookies.txt".

In subsequent cURL requests, use the -b argument to specify the cookie file:

curl -k -b cookies.txt -X GET https://192.168.22.32/api/v1/logical-ports

When the session expires, the manager will respond with a 403 Forbidden HTTP response, at which point you must obtain a new session cookie.

Example Requests and Responses

Example requests and responses are provided for most of the API calls below. Your actual response might differ from the example in the number of fields returned because optional empty fields are not returned when you make an API call.

Restrictions on Certain Fields in a Request

When configuring layer 2 switching, the following fields can contain any character except semicolon (;), vertical bar (|), equal sign (=), comma (,), tilde (~), and the "at" sign (@). They also have a length limitation as specified below:

OpenAPI Specification of NSX-T Manager API

You can get an OpenAPI specification of the NSX-T Manager API with one of the following calls:



API Methods

Toggle all tables +

Users and Roles

Associated URIs:

Create registration access token

Request:
Method:
POST
URI Path:
/api/v1/aaa/registration-token
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: POST https://<nsx-mgr>/api/v1/aaa/registration-token Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
RegistrationToken+

Example Response: { "token": "e9112e46-a54a-486f-82bb-043b89228c1b", "roles":[ "network_engineer" ] } Required Permissions: crud Additional Errors:

Get registration access token

Request:
Method:
GET
URI Path:
/api/v1/aaa/registration-token/<token>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/aaa/registration-token/e9112e46-a54a-486f-82bb-043b89228c1b Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
RegistrationToken+

Example Response: { "token": "e9112e46-a54a-486f-82bb-043b89228c1b", "roles": [ "network_engineer" ] } Required Permissions: read Additional Errors:

Delete registration access token

Request:
Method:
DELETE
URI Path:
/api/v1/aaa/registration-token/<token>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: POST https://<nsx-mgr>/api/v1/aaa/registration-token Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
n/a

Required Permissions: crud Additional Errors:

Assign roles to User or Group

Request:
Method:
POST
URI Path:
/api/v1/aaa/role-bindings
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
RoleBinding+

Example Request: POST https://<nsx-mgr>/api/v1/aaa/role-bindings { "name": "local_admin@System Domain", "type": "remote_user", "roles":[ { "role": "auditor" } ] } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
RoleBinding+

Example Response: { "resource_type": "RoleBinding", "description": "", "id": "7e672b0e-f0bd-48bc-b579-9e6f1b2b3969", "display_name": "local_admin@System Domain", "tags": [], "roles": [ { "role": "auditor" } ], "name": "local_admin@System Domain", "type": "remote_user", "_create_user": "admin", "_create_time": 1493960803006, "_last_modified_user": "admin", "_last_modified_time": 1493960803006, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 } Required Permissions: crud Feature: users_role_assignments Additional Errors:

Get all users and groups with their roles

Request:
Method:
GET
URI Path:
/api/v1/aaa/role-bindings
Request Headers:
n/a
Query Parameters:
RoleBindingRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/aaa/role-bindings?page_size=1 Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
RoleBindingListResult+

Example Response: { "sort_ascending": true, "sort_by": "id", "result_count": 2, "results": [ { "resource_type": "RoleBinding", "description": "", "id": "0395447b-480a-4091-9075-4070138e0cee", "display_name": "rt-group1", "tags": [], "roles": [ { "role": "auditor" } ], "name": "rt-group1", "type": "remote_group", "_create_user": "admin", "_create_time": 1493963048438, "_last_modified_user": "admin", "_last_modified_time": 1493963048438, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }, { "resource_type": "RoleBinding", "description": "", "id": "7e672b0e-f0bd-48bc-b579-9e6f1b2b3969", "display_name": "local_admin@System Domain", "tags": [], "roles": [ { "role": "enterprise_admin" } ], "name": "local_admin@System Domain", "type": "remote_user", "_create_user": "admin", "_create_time": 1493960803006, "_last_modified_user": "admin", "_last_modified_time": 1493960803006, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 1 } ] } Required Permissions: read Feature: users_role_assignments Additional Errors:

Get user/group's role information

Request:
Method:
GET
URI Path:
/api/v1/aaa/role-bindings/<binding-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/aaa/role-bindings/5c669dc6-47a8-4508-3077-6a48f26c5a4g Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
RoleBinding+

Example Response: { "resource_type": "RoleBinding", "description": "", "id": "7e672b0e-f0bd-48bc-b579-9e6f1b2b3969", "display_name": "local_admin@System Domain", "tags": [], "roles": [ { "role": "enterprise_admin" } ], "name": "local_admin@System Domain", "type": "remote_user", "_create_user": "admin", "_create_time": 1493960803006, "_last_modified_user": "admin", "_last_modified_time": 1493960803006, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 } Required Permissions: read Feature: users_role_assignments Additional Errors:

Update User or Group's roles

Request:
Method:
PUT
URI Path:
/api/v1/aaa/role-bindings/<binding-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
RoleBinding+

Example Request: PUT https://<nsx-mgr>/api/v1/aaa/role-bindings/5c669dc6-47a8-4508-3077-6a48f26c5a4g { "name": "local_admin@System Domain", "type": "remote_user", "_revision": 0, "roles":[ { "role": "enterprise_admin" } ] } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
RoleBinding+

Example Response: { "resource_type": "RoleBinding", "description": "", "id": "7e672b0e-f0bd-48bc-b579-9e6f1b2b3969", "display_name": "local_admin@System Domain", "tags": [], "roles": [ { "role": "enterprise_admin" } ], "name": "local_admin@System Domain", "type": "remote_user", "_create_user": "admin", "_create_time": 1493960803006, "_last_modified_user": "admin", "_last_modified_time": 1493960803006, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 1 } Required Permissions: crud Feature: users_role_assignments Additional Errors:

Delete user/group's roles assignment

Request:
Method:
DELETE
URI Path:
/api/v1/aaa/role-bindings/<binding-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: DELETE https://<nsx-mgr>/api/v1/aaa/role-bindings/5c669dc6-47a8-4508-3077-6a48f26c5a4g Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Example Response: 200 OK Required Permissions: crud Feature: users_role_assignments Additional Errors:

Get information about all roles

Request:
Method:
GET
URI Path:
/api/v1/aaa/roles
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/aaa/roles Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
RoleListResult+

Example Response: { "results": [ { "role": "enterprise_admin" }, { "role": "security_op" }, { "role": "auditor" }, { "role": "security_engineer" }, { "role": "network_op" }, { "role": "network_engineer" } ] } Required Permissions: read Feature: users_configuration Additional Errors:

Get role information

Request:
Method:
GET
URI Path:
/api/v1/aaa/roles/<role>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/aaa/roles/auditor Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
RoleWithFeatures+

Example Response: { "role": "auditor", "features": [ { "feature": "groups_ip_sets", "permission": "read" }, { "feature": "groups_mac_sets", "permission": "read" }, { "feature": "groups_ip_pools", "permission": "read" }, { "feature": "groups", "permission": "read" }, { "feature": "services", "permission": "read" } ] } Required Permissions: read Feature: users_configuration Additional Errors:

Get information about logged-in user

Request:
Method:
GET
URI Path:
/api/v1/aaa/user-info
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/aaa/user-info Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
UserInfo+

Example Response: { "user_name": "admin", "roles": [ { "role": "enterprise_admin" } ] } Required Permissions: none Feature: users_configuration Additional Errors:

Get all the User Groups where vIDM display name matches the search key case insensitively. The search key is checked to be a substring of display name.

Request:
Method:
GET
URI Path:
/api/v1/aaa/vidm/groups
Request Headers:
n/a
Query Parameters:
VidmInfoSearchRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/aaa/vidm/groups?search_string=clay_group Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
VidmInfoListResult+

Example Response: { "result_count": 3, "results": [ { "name": "clay_group_EA@testad2.local", "type": "remote_group", "display_name": "clay_group_EA@testad2.local" }, { "name": "clay_group_SE@testad2.local", "type": "remote_group", "display_name": "clay_group_SE@testad2.local" }, { "name": "clay_group_AU@testad2.local", "type": "remote_group", "display_name": "clay_group_AU@testad2.local" } ] } Required Permissions: read Feature: users_role_assignments Additional Errors:

Get all the users and groups from vIDM matching the search key case insensitively. The search key is checked to be a substring of name or given name or family name of user and display name of group.

Request:
Method:
POST
URI Path:
/api/v1/aaa/vidm/search
Request Headers:
n/a
Query Parameters:
VidmInfoSearchRequestParameters+
Request Body:
n/a

Example Request: POST https://<nsx-mgr>/api/v1/aaa/vidm/search?search_string=John Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
VidmInfoListResult+

Example Response: { "result_count": 3, "results": [ { "name": "John_doe@testad2.local", "type": "remote_user", "display_name": "John Doe" }, { "name": "Johnd@testad2.local", "type": "remote_user", "display_name": "John Roe" }, { "name": "Johns_group@testad2.local", "type": "remote_group", "display_name": "John's Group" } ] } Required Permissions: read Feature: users_role_assignments Additional Errors:

Get all the users from vIDM whose userName, givenName or familyName matches the search key case insensitively. The search key is checked to be a substring of name or given name or family name.

Request:
Method:
GET
URI Path:
/api/v1/aaa/vidm/users
Request Headers:
n/a
Query Parameters:
VidmInfoSearchRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/aaa/vidm/users?search_string=John Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
VidmInfoListResult+

Example Response: { "result_count": 2, "results": [ { "name": "John_doe@testad2.local", "type": "remote_user", "display_name": "John Doe" }, { "name": "John_roe@testad2.local", "type": "remote_user", "display_name": "John Roe" } ] } Required Permissions: read Feature: users_role_assignments Additional Errors:

Aggregation Service

Aggregation Service: Configuration

Associated URIs:

List all health performance monitoring feature stacks

Request:
Method:
GET
URI Path:
/api/v1/hpm/features
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/hpm/features Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
FeatureStackCollectionConfigurationList+

Example Response: { "results": [ { "feature_stack_name": "HostNodeStatusVertical" "client_type_collection_configurations": [ { "client_type": "CONTROL_PLANE" "collection_type_configurations": [ { "collection_type": "STATUS" "collection_frequency": 60 }, { "collection_type": "STATISTICS" "collection_frequency": 300 } }, { "client_type": "MANAGEMENT_PLANE" "collection_type_configurations": [ { "collection_type": "STATUS" "collection_frequency": 60 }, { "collection_type": "STATISTICS" "collection_frequency": 300 } } ] } ] } Required Permissions: read Additional Errors:

Update health performance monitoring configuration for feature stack

Apply the data collection configuration for the specified feature stack. Request:
Method:
PUT
URI Path:
/api/v1/hpm/features/<feature-stack-name>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
FeatureStackCollectionConfiguration+

Example Request: PUT https://<nsx-mgr>/api/v1/hpm/features/FabricStats { "resource_type": "FeatureStackCollectionConfiguration", "display_name": "FabricStats", "feature_stack_name": "FabricStats", "client_type_collection_configurations": [ { "client_type": "HYPERVISOR", "data_type_configurations": [ { "collection_frequency": 120, "data_type": "STATUS" } ] } ], "_revision": 1 } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
FeatureStackCollectionConfiguration+

Example Response: { "resource_type": "FeatureStackCollectionConfiguration", "id": "01b0e1fe-a8c9-4a76-af6a-d59890141145", "display_name": "FabricStats", "feature_stack_name": "FabricStats", "client_type_collection_configurations": [ { "client_type": "HYPERVISOR", "data_type_configurations": [ { "collection_frequency": 120, "data_type": "STATUS" } ] } ], "_revision": 2 } Required Permissions: crud Additional Errors:

Read health performance monitoring configuration for feature stack

Returns the complete set of client type data collection configuration records for the specified feature stack. Request:
Method:
GET
URI Path:
/api/v1/hpm/features/<feature-stack-name>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/hpm/features/HostNodeStatusVertical Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
FeatureStackCollectionConfiguration+

Example Response: { "resource_type" : "FeatureStackCollectionConfiguration", "id" : "78c2b5d5-a591-4bfc-ba9b-c2a9ed63091b", "display_name" : "HostNodeStatusVertical", "feature_stack_name" : "HostNodeStatusVertical", "client_type_collection_configurations" : [ { "client_type" : "HYPERVISOR", "data_type_configurations" : [ { "collection_frequency" : 61, "data_type" : "STATISTICS" }, { "collection_frequency" : 60, "data_type" : "STATUS" } ] }, { "client_type" : "MANAGEMENT_PLANE", "data_type_configurations" : [ { "collection_frequency" : 61, "data_type" : "STATISTICS" }, { "collection_frequency" : 15, "data_type" : "STATUS" } ] }, { "client_type" : "MANAGEMENT_PLANE_PLATFORM", "data_type_configurations" : [ { "collection_frequency" : 61, "data_type" : "STATISTICS" }, { "collection_frequency" : 15, "data_type" : "STATUS" } ] }, { "client_type" : "EDGE", "data_type_configurations" : [ { "collection_frequency" : 61, "data_type" : "STATISTICS" }, { "collection_frequency" : 60, "data_type" : "STATUS" } ] }, { "client_type" : "CONTROL_PLANE_PLATFORM", "data_type_configurations" : [ { "collection_frequency" : 61, "data_type" : "STATISTICS" }, { "collection_frequency" : 15, "data_type" : "STATUS" } ] } ], "_revision" : 1 } Required Permissions: read Additional Errors:

Reset the data collection frequency configuration setting to the default values

Request:
Method:
POST
URI Path:
/api/v1/hpm/features/<feature-stack-name>?action=reset_collection_frequency
Request Headers:
n/a
Query Parameters:
AggregationServiceActionRequestParameters+
Request Body:
n/a

Example Request: POST https://<nsx-mgr>/api/v1/hpm/features/FabricStats?action=reset_collection_frequency Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
FeatureStackCollectionConfiguration+

Example Response: { "resource_type": "FeatureStackCollectionConfiguration", "id": "1d8b2673-dbba-4368-a1fd-c97edbb04c7d", "display_name": "FabricStats", "feature_stack_name": "FabricStats", "client_type_collection_configurations": [ { "client_type": "HYPERVISOR", "data_type_configurations": [ { "collection_frequency": 60, "data_type": "STATUS" } ] } ], "_revision": 1 } Required Permissions: crud Additional Errors:

Set the global configuration for aggregation service related data collection

Request:
Method:
PUT
URI Path:
/api/v1/hpm/global-config
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
GlobalCollectionConfiguration+

Example Request: PUT https://<nsx-mgr>/api/v1/hpm/global-config { "resource_type": "GlobalCollectionConfiguration", "id": "74d59b24-c433-4d3d-bb92-6870bb35b037", "display_name": "Global Data Collection Configuration", "is_data_collection_enabled": true, "modified_feature_stack_collection_configurations": { "results": [] }, "aggregated_data_collection_frequency": 400, "_revision": 1 } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
GlobalCollectionConfiguration+

Example Response: { "resource_type": "GlobalCollectionConfiguration", "id": "74d59b24-c433-4d3d-bb92-6870bb35b037", "display_name": "Global Data Collection Configuration", "is_data_collection_enabled": true, "modified_feature_stack_collection_configurations": { "results": [] }, "aggregated_data_collection_frequency": 400, "_last_modified_time": 1458245693232, "_create_time": 1457468839463, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "system", "_revision": 2 } Required Permissions: crud Additional Errors:

Read global health performance monitoring configuration

Request:
Method:
GET
URI Path:
/api/v1/hpm/global-config
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/hpm/global-config Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
GlobalCollectionConfiguration+

Example Response: { "resource_type": "GlobalCollectionConfiguration", "id": "74d59b24-c433-4d3d-bb92-6870bb35b037", "display_name": "Global Data Collection Configuration", "is_data_collection_enabled": true, "modified_feature_stack_collection_configurations": { "results": [] }, "aggregated_data_collection_frequency": 300, "_last_modified_time": 1457468839463, "_create_time": 1457468839463, "_last_modified_user": "system", "_system_owned": false, "_create_user": "system", "_revision": 1 } Required Permissions: read Additional Errors:

Api Services

Api Services: Api Request Batching

Associated URIs:

Register a Collection of API Calls at a Single End Point

Enables you to make multiple API requests using a single request. The batch API takes in an array of logical HTTP requests represented as JSON arrays. Each request has a method (GET, PUT, POST, or DELETE), a relative_url (the portion of the URL after https://<nsx-mgr>/api/), optional headers array (corresponding to HTTP headers) and an optional body (for POST and PUT requests). The batch API returns an array of logical HTTP responses represented as JSON arrays. Each response has a status code, an optional headers array and an optional body (which is a JSON-encoded string). Request:
Method:
POST
URI Path:
/api/v1/batch
Request Headers:
n/a
Query Parameters:
BatchParameter+
Request Body:
BatchRequest+

Example Request: POST https://<nsx-mgr>/api/v1/batch { "requests":[ { "method":"POST", "uri":"/v1/switching-profiles", "body": { "resource_type": "SpoofGuardSwitchingProfile", "display_name": "spoof-guard-lswitch-bindings", "white_list_providers": ["LSWITCH_BINDINGS"] } }, { "method":"GET", "uri":"/v1/switching-profiles" } ] } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
BatchResponse+

Example Response: { "results": [ { "body": { "revision": 0, "id": "9e6e5375-d7d9-48b4-9118-b1121757f1e3", "display_name": "custom1-qos-switching-profile", "code": 201, "body": { "resource_type": "SpoofGuardSwitchingProfile", "id": "02d866d7-495c-47f4-b945-61a8559219b9", "display_name": "spoof-guard-lswitch-bindings", "white_list_providers": [ "LSWITCH_BINDINGS" ], "_last_modified_time": 1458772318447, "_create_time": 1458772318447, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 0 } }, { "code": 200, "body": { "cursor": "00361b53de57-0313-4f3d-b494-635c58b1d986spoof-guard-lswitch-bindings", "result_count": 4, "results": [ { "_revision": 0, "id": "9e6e5375-d7d9-48b4-9118-b1121757f1e3", "display_name": "custom1-qos-switching-profile", "resource_type": "QosSwitchingProfile", "description": "", "id": "7f39bf67-ccf5-4613-8993-506ec89d893a", "display_name": "TT", "tags": [], "dscp": { "mode": "TRUSTED", "priority": 0 }, "shaper_configuration": [ { "resource_type": "IngressRateShaper", "enabled": false, "average_bandwidth_mbps": 0, "peak_bandwidth_mbps": 0, "burst_size_bytes": 0 }, { "resource_type": "IngressBroadcastRateShaper", "enabled": false, "burst_size_bytes": 0, "peak_bandwidth_kbps": 0, "average_bandwidth_kbps": 0 }, { "resource_type": "EgressRateShaper", "enabled": false, "average_bandwidth_mbps": 0, "peak_bandwidth_mbps": 0, "burst_size_bytes": 0 } ], "class_of_service": 2, "_last_modified_time": 1457999948761, "_create_time": 1457999948761, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_last_modified_user": "admin" }, "code": 201 }, { "body": { "result_count": 9, "results": [ { "resource_type": "IpfixSwitchingProfile", "revision": 0, "id": "cb317635-939b-430a-ae50-005fc4c6ac14", "display_name": "nsx-default-ipfix-global-profile", "enabled": false, "_last_modified_time": 1413324646801, "_create_time": 1413324646801, "_create_user": "system", "_last_modified_user": "system" }, { "resource_type": "QosSwitchingProfile", "revision": 0, "id": "9e6e5375-d7d9-48b4-9118-b1121757f1e3", "display_name": "custom1-qos-switching-profile", "system_defined": false, "dscp": { "priority": 1, "mode": "UNTRUSTED" }, "burst_size": 20, "class_of_service": 1, "peak_bandwidth": 400, "average_bandwidth": 200, "_last_modified_time": 1413349096169, "_create_time": 1413349096169, "_create_user": "admin", "_last_modified_user": "admin" }, { "resource_type": "IpDiscoverySwitchingProfile", "revision": 0, "id": "64814784-7896-3901-9741-badeff705639", "display_name": "nsx-default-ip-discovery-overlay-profile", "system_defined": true, "arp_snooping_enabled": true, "dhcp_snooping_enabled": true, "_last_modified_time": 1413324646789, "_create_time": 1413324646789, "_create_user": "system", "_last_modified_user": "system" }, { "resource_type": "IpDiscoverySwitchingProfile", "revision": 0, "id": "64814874-6987-1093-1479-badeff705639", "display_name": "nsx-default-ip-discovery-vlan-profile", "system_defined": true, "arp_snooping_enabled": false, "dhcp_snooping_enabled": false, "_last_modified_time": 1413324646800, "_create_time": 1413324646800, "_create_user": "system", "_last_modified_user": "system" }, { "resource_type": "QosSwitchingProfile", "revision": 0, "id": "f313290b-eba8-4262-bd93-fab5026e9495", "display_name": "nsx-default-qos-switching-profile", "system_defined": true, "dscp": { "priority": 0, "mode": "TRUSTED" }, "burst_size": 0, "class_of_service": 0, "peak_bandwidth": 0, "average_bandwidth": 0, "_last_modified_time": 1413324646729, "_create_time": 1413324646729, "_create_user": "system", "_last_modified_user": "system" }, { "resource_type": "PortMirroringSwitchingProfile", "revision": 1, "id": "93b4b7e8-f116-415d-a50c-3364611b5d09", "display_name": "nsx-default-port-mirroring-profile", "system_defined": false, "direction": "INGRESS", "_last_modified_time": 1413345541673, "_create_time": 1413324646767, "_create_user": "system", "_last_modified_user": "admin" } ] }, "code": 200 "_revision": 0 }, { "resource_type": "SpoofGuardSwitchingProfile", "id": "ff45644f-9dda-4970-b1e3-30ac11ff0582", "display_name": "spoof-guard-lswitch-bindings", "white_list_providers": [ "LSWITCH_BINDINGS" ], "_last_modified_time": 1458754361177, "_create_time": 1458754361177, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 0 }, { "resource_type": "SpoofGuardSwitchingProfile", "id": "02d866d7-495c-47f4-b945-61a8559219b9", "display_name": "spoof-guard-lswitch-bindings", "white_list_providers": [ "LSWITCH_BINDINGS" ], "_last_modified_time": 1458772318447, "_create_time": 1458772318447, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 0 }, { "resource_type": "SpoofGuardSwitchingProfile", "id": "1b53de57-0313-4f3d-b494-635c58b1d986", "display_name": "spoof-guard-lswitch-bindings", "white_list_providers": [ "LSWITCH_BINDINGS" ], "_last_modified_time": 1458754382102, "_create_time": 1458754382102, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 0 } ] } } Required Permissions: none Additional Errors:

Api Services: Authentication

Associated URIs:

Update node authentication policy configuration

Update the currently configured authentication policy on the node. If any of api_max_auth_failures, api_failed_auth_reset_period, or api_failed_auth_lockout_period are modified, the http service is automatically restarted. Request:
Method:
PUT
URI Path:
/api/v1/node/aaa/auth-policy
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
AuthenticationPolicyProperties+

Example Request: PUT https://<nsx-mgr>/api/v1/node/aaa/auth-policy { "minimum_password_length": 12 } Successful Response:
Response Code:
202 Accepted
Response Headers:
Content-type: application/json
Response Body:
AuthenticationPolicyProperties+

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

Example Response: { "minimum_password_length": 12 } Required Permissions: crud Feature: system_administration Additional Errors:

Read node authentication policy configuration

Returns information about the currently configured authentication policies on the node. Request:
Method:
GET
URI Path:
/api/v1/node/aaa/auth-policy
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/node/aaa/auth-policy Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
AuthenticationPolicyProperties+

Example Response: { "_schema": "AuthenticationPolicyProperties", "_self": { "href": "/node/aaa/auth-policy", "rel": "self" }, "api_failed_auth_lockout_period": 900, "api_failed_auth_reset_period": 900, "api_max_auth_failures": 5, "cli_failed_auth_lockout_period": 900, "cli_max_auth_failures": 5, "minimum_password_length": 8 } Required Permissions: read Feature: system_administration Additional Errors:

Api Services: Task Management

Associated URIs:

Get information about all tasks

Request:
Method:
GET
URI Path:
/api/v1/tasks
Request Headers:
n/a
Query Parameters:
TaskQueryParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/tasks Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
TaskListResult+

Example Response: { "result_count" : 1, "results" : [ { "start_time" : 1478646470253, "async_response_available" : true, "cancelable" : false, "end_time" : 1478646470344, "progress" : 100, "id" : "59c7d6c8-7d64-4f0e-8af5-0b5e92bc3330", "user" : "admin", "status" : "SUCCESS" } ] } Required Permissions: read Additional Errors:

Get information about the specified task

Request:
Method:
GET
URI Path:
/api/v1/tasks/<task-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/tasks/ab265781-c826-4da7-9487-48a5c713a481 Successful Response:
Response Code:
200 OK, 303 See Other
Response Headers:
Content-type: application/json
Response Body:
TaskProperties+

Example Response: { "progress" : 100, "id" : "ab265781-c826-4da7-9487-48a5c713a481", "end_time" : 1416959364977, "status" : "success", "async_response_available" : false, "cancelable" : false, "start_time" : 1416959362874 } Required Permissions: read Additional Errors:

Get the response of a task

Request:
Method:
GET
URI Path:
/api/v1/tasks/<task-id>/response
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/tasks59c7d6c8-7d64-4f0e-8af5-0b5e92bc3330/response Successful Response:
Response Code:
200 OK, 303 See Other
Response Headers:
Content-type: application/json
Response Body:
object

Example Response: { "cursor" : "", "sort_ascending" : true, "sort_by" : "displayName", "result_count" : 0, "results" : [ ] } Required Permissions: read Additional Errors:

App Discovery

Associated URIs:

Returns list of app profile IDs created

Returns list of app profile IDs created Request:
Method:
GET
URI Path:
/api/v1/app-discovery/app-profiles
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/app-discovery/app-profiles Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
AppProfileListResult+

Example Response: { "result_count": 2, "results": [ { "id": "ac926c72-daf2-4bb5-ac07-9ab70afded67", "display_name": "web_tier", "app_profile_category": "web server", "app_profile_criteria": [ "Tomcat1.0" ] }, { "id": "p2926c72-daf2-4bb5-ac07-9ab70afded67", "display_name": "db_tier", "app_profile_category": "database server", "app_profile_criteria": [ "Postgresql" ] } ] } Required Permissions: read Feature: app_discovery Additional Errors:

Adds a new app profile

Adds a new app profile Request:
Method:
POST
URI Path:
/api/v1/app-discovery/app-profiles
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
AppProfile+

Example Request: POST https://<nsx-mgr>/api/v1/app-discovery/app-profiles { "display_name": "web_tier", "app_profile_category": "web server, web client", "app_profile_criteria": [ "Tomcat1.0" ] } Successful Response:
Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
AppProfile+

Example Response: { "id": "ac926c72-daf2-4bb5-ac07-9ab70afded67", "display_name": "web_tier", "app_profile_category": "web server, web client", "app_profile_criteria": [ "Tomcat1.0" ] } Required Permissions: crud Feature: app_discovery Additional Errors:

Delete App Profile

Deletes the specified AppProfile. Request:
Method:
DELETE
URI Path:
/api/v1/app-discovery/app-profiles/<app-profile-id>
Request Headers:
n/a
Query Parameters:
AppProfileDeleteRequestParameters+
Request Body:
n/a

Example Request: DELETE https://<nsx-mgr>/api/v1/app-discovery/app-profiles/ac926c72-daf2-4bb5-ac07-9ab70afded67 Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Required Permissions: crud Feature: app_discovery Additional Errors:

Returns detail of the app profile

Returns detail of the app profile Request:
Method:
GET
URI Path:
/api/v1/app-discovery/app-profiles/<app-profile-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/app-discovery/app-profiles/ac926c72-daf2-4bb5-ac07-9ab70afded67 Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
AppProfile+

Example Response: { "id": "ac926c72-daf2-4bb5-ac07-9ab70afded67", "display_name": "web_tier", "app_profile_category": "web server", "app_profile_criteria": [ "Tomcat1.0" ] } Required Permissions: read Feature: app_discovery Additional Errors:

Update AppProfile

Update AppProfile Request:
Method:
PUT
URI Path:
/api/v1/app-discovery/app-profiles/<app-profile-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
AppProfile+

Example Request: PUT https://<nsx-mgr>/api/v1/app-discovery/app-profiles/ac926c72-daf2-4bb5-ac07-9ab70afded67 { "id": "ac926c72-daf2-4bb5-ac07-9ab70afded67", "display_name": "web_tier", "app_profile_category": "web server, web client", "app_profile_criteria": [ "Tomcat1.0" ], "_revision": 1 } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
AppProfile+

Required Permissions: crud Feature: app_discovery Additional Errors:

Starts the discovery of application discovery session

Starts the discovery of application discovery session Request:
Method:
POST
URI Path:
/api/v1/app-discovery/sessions
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
StartAppDiscoverySessionParameters+

Example Request: POST https://<nsx-mgr>/api/v1/app-discovery/sessions { "ns_group_ids": ["ns_group_id_1", "ns_group_id_2"], "app_profile_ids": ["app_profile_id_1", "app_profile_id_1"] } Successful Response:
Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
AppDiscoverySession+

Example Response: { "id": "ac926c72-daf2-4bb5-ac07-9ab70afded67", "status": "STARTING", "start_timestamp": 1457518122686, "end_timestamp": 1457518125699 } Required Permissions: crud Feature: app_discovery Additional Errors:

Returns the list of the application discovery sessions available

Returns the list of the application discovery sessions available Request:
Method:
GET
URI Path:
/api/v1/app-discovery/sessions
Request Headers:
n/a
Query Parameters:
AppDiscoverySessionsParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/app-discovery/sessions Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
AppDiscoverySessionsListResult+

Example Response: { "result_count": 1, "results": [ { "id": "ac926c72-daf2-4bb5-ac07-9ab70afded67", "status": "FINISHED", "start_timestamp": 1457518122686, "end_timestamp": 1457518125699 } ] } Required Permissions: read Feature: app_discovery Additional Errors:

Returns the status of the application discovery session and other details

Returns the status of the application discovery session and other details Request:
Method:
GET
URI Path:
/api/v1/app-discovery/sessions/<session-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/app-discovery/sessions/ac926c72-daf2-4bb5-ac07-9ab70afded67 Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
AppDiscoverySession+

Example Response: { "id": "ac926c72-daf2-4bb5-ac07-9ab70afded67", "status": "FINISHED", "start_timestamp": 1457518122686, "end_timestamp": 1457518125699 } Required Permissions: read Feature: app_discovery Additional Errors:

Cancel and delete the application discovery session

Cancel and delete the application discovery session Request:
Method:
DELETE
URI Path:
/api/v1/app-discovery/sessions/<session-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: DELETE https://<nsx-mgr>/api/v1/app-discovery/sessions/ac926c72-daf2-4bb5-ac07-9ab70afded67 Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Required Permissions: crud Feature: app_discovery Additional Errors:

Returns the details of the installed apps for the app profile ID in that session

Returns the details of the installed apps for the app profile ID in that session Request:
Method:
GET
URI Path:
/api/v1/app-discovery/sessions/<session-id>/installed-apps
Request Headers:
n/a
Query Parameters:
InstalledAppsParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/app-discovery/sessions/ac926c72-daf2-4bb5-ac07-9ab70afded67/installed-apps?app_profile_id=app-profile-1 Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
AppInfoListResult+

Example Response: { "sort_ascending": true, "sort_by":"name", "result_count": 2, "results": [ { "name": "Chrome", "manufacturer": "Google", "version": "1.0.1" }, { "name": "MS Word", "manufacturer": "Microsoft", "version": "1.0.1" } ] } Required Permissions: read Feature: app_discovery Additional Errors:

ns-groups in this application discovery session

Returns the ns groups that was part of the application discovery session | while it was started Request:
Method:
GET
URI Path:
/api/v1/app-discovery/sessions/<session-id>/ns-groups
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/app-discovery/sessions/ac926c72-daf2-4bb5-ac07-9ab70afded67/ns-groups Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NSGroupMetaInfoListResult+

Example Response: { "result_count": 1, "results": [ { "ns_group_id" : "ns_group_1", "no_of_vms" : 35 } ] } Required Permissions: read Feature: app_discovery Additional Errors:

vms in the ns-group of the application discovery session

Returns the vms in the ns-group of the application discovery session Request:
Method:
GET
URI Path:
/api/v1/app-discovery/sessions/<session-id>/ns-groups/<ns-group-id>/members
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/app-discovery/sessions/ac926c72-daf2-4bb5-ac07-9ab70afded67/ns-groups/ac926c72-daf2-4bb5-ac07-9ab70afded68/members Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
AppDiscoveryVmInfoListResult+

Example Response: { "result_count": 1, "results": [ { "vm_name" : "vm_name1", "vm_external_id" : "36926c72-daf2-4bb5-ac07-9ab70afded67" } ] } Required Permissions: read Feature: app_discovery Additional Errors:

Returns the summary of the application discovery session

Returns the summary of the application discovery session Request:
Method:
GET
URI Path:
/api/v1/app-discovery/sessions/<session-id>/summary
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/app-discovery/sessions/ac926c72-daf2-4bb5-ac07-9ab70afded67/summary Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
AppDiscoverySessionResultSummary+

Example Response: { "id": "8ee9a038-f33e-4d5a-b630-0e492d20db04", "status": "FINISHED", "app_profile_summary_list": [ { "display_name": "Apps", "app_profile_id": "1dd3b941-e384-4ed5-88c9-0289ea3a6b41", "installed_apps_count": 12 }, { "display_name": "Web tier apps", "app_profile_id": "476da1be-f74a-49f7-96ab-9809e3c5f96a", "installed_apps_count": 1 }, { "display_name": "Miscellaneous applications", "app_profile_id": "181eb68e-811c-4dd3-8260-ed72f923084b", "installed_apps_count": 26 } ], "app_profiles": [ { "app_profile_id" : "1dd3b941-e384-4ed5-88c9-0289ea3a6b41", "app_profile_name" : "Apps", "app_profile_category" : "Server" }, { "app_profile_id" : "476da1be-f74a-49f7-96ab-9809e3c5f96a", "app_profile_name" : "Web tier apps", "app_profile_category" : "Server" }, { "app_profile_id" : "181eb68e-811c-4dd3-8260-ed72f923084b", "app_profile_name" : "Miscellaneous applications", "app_profile_category" : "Client" } ] } Required Permissions: read Feature: app_discovery Additional Errors:

Associations

Associated URIs:

Get ResourceReference objects to which the given resource belongs to

Returns information about resources that are associated with the given resource. Id and type of the resource for which associated resources are to be fetched are to be specified as query parameter in the URI. Resource type of the associated resources must be specified as query parameter. Request:
Method:
GET
URI Path:
/api/v1/associations
Request Headers:
n/a
Query Parameters:
AssociationListRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/associations?resource_id= bf250578-c0a5-4ca0-b237-0375966d23ce&resource_type=MACSet&associated_resource_type=NSGroup Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
AssociationListResult+

Example Response: { "sort_by": "displayName", "sort_ascending": true, "result_count": 1, "results": [ { "target_type": "NSGroup", "target_display_name": "testNSGroup", "target_id": "4f3ba7e3-4876-45ef-882a-34bdcb1a1ac8" } ] } Required Permissions: read Additional Errors:

Error Resolver

Associated URIs:

Fetches a list of metadata for all the registered error resolvers

Returns a list of metadata for all the error resolvers registered. Request:
Method:
GET
URI Path:
/api/v1/error-resolver
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/error-resolver Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ErrorResolverInfoList+

Example Response: { "results": [ { "user_metadata": { "user_input_list": [ { "property_value": "1000", "property_name": "connectTimeout", "data_type": "NUMBER" } ] }, "error_id": 1002, "resolver_present": true }, { "user_metadata": {}, "error_id": 1001, "resolver_present": true } ] } Required Permissions: read Additional Errors:

Fetches metadata about the given error_id

Returns some metadata about the given error_id. This includes information of whether there is a resolver present for the given error_id and its associated user input data Request:
Method:
GET
URI Path:
/api/v1/error-resolver/<error_id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/error-resolver/1002 Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ErrorResolverInfo+

Example Response: { "user_metadata": { "user_input_list": [ { "property_value": "1000", "property_name": "connectTimeout", "data_type": "NUMBER" } ] }, "error_id": 1002, "resolver_present": true } Required Permissions: read Additional Errors:

Resolves the error

Invokes the corresponding error resolver for the given error(s) present in the payload Request:
Method:
POST
URI Path:
/api/v1/error-resolver?action=resolve_error
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ErrorResolverMetadataList+

Example Request: POST https://<nsx-mgr>/api/v1/error-resolver?action=resolve_error { "errors": [ { "user_metadata": { "user_input_list": [ { "property_value": "default", "property_name": "password", "data_type": "PASSWORD" }, { } ] }, "error_id": 1001, "entity_id": "a123-b234-c355-d3333" } ] } Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Required Permissions: crud Additional Errors:

Fabric

Fabric: Compute Collections

Associated URIs:

Return the List of Compute Collections

Returns information about all compute collections. Request:
Method:
GET
URI Path:
/api/v1/fabric/compute-collections
Request Headers:
n/a
Query Parameters:
ComputeCollectionListRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/compute-collections Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ComputeCollectionListResult+

Example Response: { "cursor": "003653b55e00-e5c1-11e5-a549-005056b18ef8", "result_count": 2, "results": [ { "display_name": "cluster-2", "origin_type": "VC_Cluster", "external_id": "b0ba10c8-d193-11e6-bf26-cec0c932ce01:domain-c34", "origin_id": "b0ba10c8-d193-11e6-bf26-cec0c932ce01", "cm_local_id": "domain-c34", "origin_properties": [] }, { "display_name": "cluster-1", "origin_type": "VC_Cluster", "external_id": "b0ba10c8-d193-11e6-bf26-cec0c932ce01:domain-c32", "origin_id": "b0ba10c8-d193-11e6-bf26-cec0c932ce01", "cm_local_id": "domain-c32", "origin_properties": [] } ] } Required Permissions: read Feature: compute_managers_inventory Additional Errors:

Return Compute Collection Information

Returns information about a specific compute collection. Request:
Method:
GET
URI Path:
/api/v1/fabric/compute-collections/<cc-ext-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/compute-collections/ead58c04-d19a-11e6-bf26-cec0c932ce01:domain-c32 Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ComputeCollection+

Example Response: { "display_name": "cluster-1", "origin_type": "VC_Cluster", "external_id": "b0ba10c8-d193-11e6-bf26-cec0c932ce01:domain-c32", "origin_id": "b0ba10c8-d193-11e6-bf26-cec0c932ce01", "cm_local_id": "domain-c32", "origin_properties": [] } Required Permissions: read Feature: compute_managers_inventory Additional Errors:

Fabric: Computemanagers

Associated URIs:

Register compute manager with NSX

Registers compute manager with NSX. Inventory service will collect data from the registered compute manager Request:
Method:
POST
URI Path:
/api/v1/fabric/compute-managers
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ComputeManager+

Example Request: POST https://<nsx-mgr>/api/v1/fabric/compute-managers { "server": "192.168.210.54", "origin_type": "vCenter", "credential" : { "credential_type" : "UsernamePasswordLoginCredential", "username": "user1", "password": "password", "thumbprint": "3A:21:22:A6:72:28:DA:EC:9D:05:AF:0B:B5:C6:44:CC:52:8D:54:AC" } } Successful Response:
Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
ComputeManager+

Example Response: { "id": "cf1f01db-e5b3-4688-9c1e-5f47d335fb01", "server": "192.168.210.54", "origin_type": "vCenter", "credential" : { "credential_type" : "UsernamePasswordLoginCredential", "thumbprint": "3A:21:22:A6:72:28:DA:EC:9D:05:AF:0B:B5:C6:44:CC:52:8D:54:AC" } "origin_properties": [] } Required Permissions: crud Feature: compute_managers_compute_managers Additional Errors:

Return the List of Compute managers

Returns information about all compute managers. Request:
Method:
GET
URI Path:
/api/v1/fabric/compute-managers
Request Headers:
n/a
Query Parameters:
ComputeManagerListRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/compute-managers Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ComputeManagerListResult+

Example Response: { "cursor": "00364a60d899-7b2b-4983-8254-41be3aba6472cm1", "result_count": 2, "results": [ { "id": "cf1f01db-e5b3-4688-9c1e-5f47d335fb01", "server": "192.168.210.54", "origin_type": "vCenter", "credential" : { "credential_type" : "UsernamePasswordLoginCredential", "thumbprint": "3A:21:22:A6:72:28:DA:EC:9D:05:AF:0B:B5:C6:44:CC:52:8D:54:AC" } "origin_properties": [] }, { "id": "a95be8d6-4a76-46fe-9c9c-341e89973da7", "server": "10.112.3.45", "origin_type": "vCenter", "credential" : { "credential_type" : "UsernamePasswordLoginCredential", "thumbprint": "4B:67:22:A6:72:28:DA:EC:9D:05:AF:0B:B5:C6:44:CC:52:8D:54:AC" } "origin_properties": [] } } Required Permissions: read Feature: compute_managers_compute_managers Additional Errors:

Update compute manager

Updates a specified compute manager Request:
Method:
PUT
URI Path:
/api/v1/fabric/compute-managers/<compute-manager-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ComputeManager+

Example Request: PUT https://<nsx-mgr>/api/v1/fabric/compute-managers/cf1f01db-e5b3-4688-9c1e-5f47d335fb01 { "id": "cf1f01db-e5b3-4688-9c1e-5f47d335fb01", "server": "10.112.3.45", "origin_type": "vCenter", "credential" : { "credential_type" : "UsernamePasswordLoginCredential", "username": "user2", "password": "somepassword", "thumbprint": "3A:21:22:A6:72:28:DA:EC:9D:05:AF:0B:B5:C6:44:CC:52:8D:54:AC" } } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ComputeManager+

Example Response: { "id": "cf1f01db-e5b3-4688-9c1e-5f47d335fb01", "server": "10.112.3.45", "origin_type": "vCenter", "credential" : { "credential_type" : "UsernamePasswordLoginCredential", "thumbprint": "3A:21:22:A6:72:28:DA:EC:9D:05:AF:0B:B5:C6:44:CC:52:8D:54:AC" } "origin_properties": [] } Required Permissions: crud Feature: compute_managers_compute_managers Additional Errors:

Return compute manager Information

Returns information about a specific compute manager Request:
Method:
GET
URI Path:
/api/v1/fabric/compute-managers/<compute-manager-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/compute-managers/564dab50-63a0-8b4f-a1f8-20e4d36efc3b Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ComputeManager+

Example Response: { "id": "cf1f01db-e5b3-4688-9c1e-5f47d335fb01", "server": "192.168.210.54", "origin_type": "vCenter", "credential" : { "credential_type" : "UsernamePasswordLoginCredential", "thumbprint": "3A:21:22:A6:72:28:DA:EC:9D:05:AF:0B:B5:C6:44:CC:52:8D:54:AC" } "origin_properties": [] } Required Permissions: read Feature: compute_managers_compute_managers Additional Errors:

Unregister a compute manager

Unregisters a specified compute manager Request:
Method:
DELETE
URI Path:
/api/v1/fabric/compute-managers/<compute-manager-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: DELETE https://<nsx-mgr>/api/v1/fabric/compute-managers/564dab50-63a0-8b4f-a1f8-20e4d36efc3b Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Required Permissions: crud Feature: compute_managers_compute_managers Additional Errors:

Get the realized state of a compute manager

Request:
Method:
GET
URI Path:
/api/v1/fabric/compute-managers/<compute-manager-id>/state
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/compute-managers/8538f119-ba45-4fb1-9cf1-ee849e4cf168/state Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ConfigurationState+

Example Response: { "details": [], "state": "success" } Required Permissions: read Feature: compute_managers_compute_managers Additional Errors:

Return runtime status information for a compute manager

Returns connection and version information about a compute manager Request:
Method:
GET
URI Path:
/api/v1/fabric/compute-managers/<compute-manager-id>/status
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/compute-managers/90b3ee63-82fe-11e5-b403-fd59414c0c52/status Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ComputeManagerStatus+

Example Response: { "id": "cf1f01db-e5b3-4688-9c1e-5f47d335fb01", "last_sync_time": 1446675283540, "version" : "6.5", "connection_status": "DOWN", "connection_status": "Cannot connect to VC", "registration_status" : "UNREGISTERED", "registration_errors" : [ { "error_message" : "Compute manager registration failed with server 10.192.188.95 due to error in rest call.", "timestamp" : 1493784925269 } ] } Required Permissions: read Feature: compute_managers_compute_managers Additional Errors:

Fabric: Discovered Nodes

Associated URIs:

Return the List of Discovered Nodes

Returns information about all discovered nodes. Request:
Method:
GET
URI Path:
/api/v1/fabric/discovered-nodes
Request Headers:
n/a
Query Parameters:
DiscoveredNodeListRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/discovered-nodes Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
DiscoveredNodeListResult+

Example Response: { "cursor": "003653b55e00-e5c1-11e5-a549-005056b18ef8", "result_count": 2, "results": [ { "display_name": "192.168.210.53", "ip_addresses": ["192.168.210.53"], "external_id": "b0ba10c8-d193-11e6-bf26-cec0c932ce01:host-91", "origin_id": "b0ba10c8-d193-11e6-bf26-cec0c932ce01", "cm_local_id": "host-91", "node_type": "HostNode", "parent_compute_collection": "b0ba10c8-d193-11e6-bf26-cec0c932ce01:domain-c32", "origin_properties": [] }, { "display_name": "192.168.110.37", "ip_addresses": ["192.168.110.37"], "external_id": "d2071ed8-d193-11e6-bf26-cec0c932ce01:host-92", "origin_id": "d2071ed8-d193-11e6-bf26-cec0c932ce01", "cm_local_id": "host-91", "node_type": "HostNode", "parent_compute_collection": "b0ba10c8-d193-11e6-bf26-cec0c932ce01:domain-c1", "origin_properties": [] } ] } Required Permissions: read Feature: compute_managers_inventory Additional Errors:

Return Discovered Node Information

Returns information about a specific discovered node. Request:
Method:
GET
URI Path:
/api/v1/fabric/discovered-nodes/<node-ext-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/discovered-nodes/74730a28-e52d-11e5-936e-6f061d405a28:host-91 Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
DiscoveredNode+

Example Response: { "display_name": "192.168.210.53", "ip_addresses": ["192.168.210.53"], "external_id": "b0ba10c8-d193-11e6-bf26-cec0c932ce01:host-91", "origin_id": "b0ba10c8-d193-11e6-bf26-cec0c932ce01", "cm_local_id": "host-91", "node_type": "HostNode", "parent_compute_collection": "b0ba10c8-d193-11e6-bf26-cec0c932ce01:domain-c32", "origin_properties": [] } Required Permissions: read Feature: compute_managers_inventory Additional Errors:

Fabric: Nodes

Associated URIs:

Create a compute collection fabric template

Fabric templates are fabric configurations applied at the compute collection level. This configurations is used to decide what automated operations should be a run when a host membership changes. Request:
Method:
POST
URI Path:
/api/v1/fabric/compute-collection-fabric-templates
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ComputeCollectionFabricTemplate+

Example Request: POST https://<nsx-mgr>/api/v1/fabric/compute-collection-fabric-templates { "compute_collection_id" : "ead58c04-d19a-11e6-bf26-cec0c932ce01", "auto_install_nsx": true } Successful Response:
Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
ComputeCollectionFabricTemplate+

Example Response: { "id": "5c669dc6-47a8-4508-3077-6a48f26c5a4g", "compute_collection_id" : "ead58c04-d19a-11e6-bf26-cec0c932ce01", "auto_install_nsx": true "_last_modified_time": 1457984381234, "_create_time": 1457984381234, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 1 } Required Permissions: crud Additional Errors:

Get compute collection fabric templates

Returns compute collection fabric templates Request:
Method:
GET
URI Path:
/api/v1/fabric/compute-collection-fabric-templates
Request Headers:
n/a
Query Parameters:
ComputeCollectionFabricTemplateListParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/compute-collection-fabric-templates?compute_collection_id=ead58c04-d19a-11e6-bf26-cec0c932ce01 Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ComputeCollectionFabricTemplateListResult+

Example Response: { "results": [ { "id": "5c669dc6-47a8-4508-3077-6a48f26c5a4g", "compute_collection_id" : "ead58c04-d19a-11e6-bf26-cec0c932ce01", "auto_install_nsx": true "_last_modified_time": 1457984381234, "_create_time": 1457984381234, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 1 } ] } Required Permissions: read Additional Errors:

Deletes compute collection fabric template

Deletes compute collection fabric template for the given id Request:
Method:
DELETE
URI Path:
/api/v1/fabric/compute-collection-fabric-templates/<fabric-template-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: DELETE https://<nsx-mgr>/api/v1/fabric/compute-collection-fabric-templates/5c669dc6-47a8-4508-3077-6a48f26c5a4g Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Required Permissions: crud Additional Errors:

Updates compute collection fabric template

Updates compute collection fabric template for the given id Request:
Method:
PUT
URI Path:
/api/v1/fabric/compute-collection-fabric-templates/<fabric-template-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ComputeCollectionFabricTemplate+

Example Request: PUT https://<nsx-mgr>/api/v1/fabric/compute-collection-fabric-templates/5c669dc6-47a8-4508-3077-6a48f26c5a4g { "compute_collection_id" : "ead58c04-d19a-11e6-bf26-cec0c932ce01", "auto_install_nsx": true } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ComputeCollectionFabricTemplate+

Example Response: { "id": "5c669dc6-47a8-4508-3077-6a48f26c5a4g", "compute_collection_id" : "ead58c04-d19a-11e6-bf26-cec0c932ce01", "auto_install_nsx": true "_last_modified_time": 1457984381234, "_create_time": 1457984381234, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 1 } Required Permissions: crud Additional Errors:

Get compute collection fabric template by id

Get compute collection fabric template for the given id Request:
Method:
GET
URI Path:
/api/v1/fabric/compute-collection-fabric-templates/<fabric-template-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: PUT https://<nsx-mgr>/api/v1/fabric/compute-collection-fabric-templates/5c669dc6-47a8-4508-3077-6a48f26c5a4g Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ComputeCollectionFabricTemplate+

Example Response: { "id": "5c669dc6-47a8-4508-3077-6a48f26c5a4g", "compute_collection_id" : "ead58c04-d19a-11e6-bf26-cec0c932ce01", "auto_install_nsx": true "_last_modified_time": 1457984381234, "_create_time": 1457984381234, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 1 } Required Permissions: read Additional Errors:

Prepares discovered Node for NSX

Prepares(hostprep) discovered node for NSX. NSX LCP bundles are installed on this discovered node. Request:
Method:
POST
URI Path:
/api/v1/fabric/discovered-nodes/<node-ext-id>?action=hostprep
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: POST https://<nsx-mgr>/api/v1/fabric/discovered-nodes/5c669dc6-47a8-4508-3077-6a48f26c5a4g?action=hostprep Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
EdgeNode+
HostNode+
Node+
PublicCloudGatewayNode+

Example Response: { "resource_type" : "HostNode", "description" : "", "id" : "73aabd55-7c9a-4015-a769-47e2e95f0045", "display_name" : "comp-02b", "tags" : [ ], "fqdn" : "", "ip_addresses" : [ "192.168.210.54" ], "external_id" : "73aabd55-7c9a-4015-a769-47e2e95f0045", "discovered_ip_addresses" : [ ], "os_type" : "ESXI", "os_version" : "", "managed_by_server" : "", "_create_time" : 1478050967406, "_create_user" : "admin", "_last_modified_user" : "admin", "_last_modified_time" : 1478050967406, "_revision" : 0 } Required Permissions: crud Additional Errors:

Return the List of Nodes

Returns information about all fabric nodes (hosts and edges). Request:
Method:
GET
URI Path:
/api/v1/fabric/nodes
Request Headers:
n/a
Query Parameters:
NodeListRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/nodes Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NodeListResult+

Example Response: { "cursor": "003653b55e00-e5c1-11e5-a549-005056b18ef8nsx-edge2", "result_count": 2, "results": [ { "resource_type": "HostNode", "id": "74730a28-e52d-11e5-936e-6f061d405a28", "display_name": "comp-01b", "fqdn": "comp-01b.eng.abc.com", "ip_addresses": [ "192.168.210.53" ], "discovered_ip_addresses": [ "192.168.210.53" ], "external_id": "74730a28-e52d-11e5-936e-6f061d405a28", "os_type": "ESXI", "os_version": "6.0.0", "managed_by_server": "192.168.110.24", "_last_modified_time": 1457470683936, "_create_time": 1457470683936, "_last_modified_user": "admin", "_create_user": "admin", "_revision": 0 }, { "resource_type": "EdgeNode", "id": "53b55e00-e5c1-11e5-a549-005056b18ef8", "display_name": "nsx-edge2", "fqdn": "nsx-edge2.eng.abc.com", "ip_addresses": [ "192.168.110.37" ], "discovered_ip_addresses": [ "192.168.110.37" ], "external_id": "53b55e00-e5c1-11e5-a549-005056b18ef8", "deployment_type": "VIRTUAL_MACHINE", "_last_modified_time": 1457505420494, "_create_time": 1457505420494, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 0 } ] } Required Permissions: read Additional Errors:

Register and Install NSX Components on a Node

Creates a host node (hypervisor) or edge node (router) in the transport network. When you run this command for a host, NSX Manager attempts to install the NSX kernel modules, which are packaged as VIB, RPM, or DEB files. For the installation to succeed, you must provide the host login credentials and the host thumbprint. To get the ESXi host thumbprint, SSH to the host and run the openssl x509 -in /etc/vmware/ssl/rui.crt -fingerprint -sha256 -noout command. To generate host key thumbprint using SHA-256 algorithm please follow the steps below. Log into the host, making sure that the connection is not vulnerable to a man in the middle attack. Check whether a public key already exists. Host public key is generally located at '/etc/ssh/ssh_host_rsa_key.pub'. If the key is not present then generate a new key by running the following command and follow the instructions. ssh-keygen -t rsa Now generate a SHA256 hash of the key using the following command. Please make sure to pass the appropriate file name if the public key is stored with a different file name other than the default 'id_rsa.pub'. awk '{print $2}' id_rsa.pub | base64 -d | sha256sum -b | sed 's/ .*$//' | xxd -r -p | base64 Request:
Method:
POST
URI Path:
/api/v1/fabric/nodes
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
EdgeNode+
HostNode+
Node+
PublicCloudGatewayNode+

Example Request: POST https://<nsx-mgr>/api/v1/fabric/nodes { "resource_type": "HostNode", "display_name": "Host ABC123", "ip_addresses": [ "192.168.210.54" ], "os_type": "ESXI", "os_version": "6.0.0", "host_credential": { "username": "user1", "password": "password", "thumbprint": "3b1f4f3b636569d648a3092fc5b5b00fe4f6ec6abd34de86ae657f4bba22913e" } } Successful Response:
Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
EdgeNode+
HostNode+
Node+
PublicCloudGatewayNode+

Example Response: { "resource_type": "HostNode", "display_name": "Host ABC123", "fqdn": "host-abc-123.eng.abc.com", "id": "cf1f01db-e5b3-4688-9c1e-5f47d335fb01", "ip_addresses": [ "192.168.210.54" ], "external_id": "cf1f01db-e5b3-4688-9c1e-5f47d335fb01", "discovered_ip_addresses": [ "192.168.210.54" ], "os_type": "ESXI", "os_version": "6.0.0", "managed_by_server": "192.168.110.24", "_create_time": 1446577081344, "_last_modified_user": "admin", "_last_modified_time": 1446577081344, "_create_user": "admin", "_revision": 0 } Required Permissions: crud Additional Errors:

Delete a Node

Removes a specified fabric node (host or edge). A fabric node may only be deleted when it is no longer referenced by a Transport Node. If unprepare_host option is specified, the host will be deleted without uninstalling the NSX components from the host. Request:
Method:
DELETE
URI Path:
/api/v1/fabric/nodes/<node-id>
Request Headers:
n/a
Query Parameters:
HostNodeDeleteParameters+
Request Body:
n/a

Example Request: DELETE https://<nsx-mgr>/api/v1/fabric/nodes/564dab50-63a0-8b4f-a1f8-20e4d36efc3b Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Required Permissions: crud Additional Errors:

Return Node Information

Returns information about a specific fabric node (host or edge). Request:
Method:
GET
URI Path:
/api/v1/fabric/nodes/<node-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/nodes/564dab50-63a0-8b4f-a1f8-20e4d36efc3b Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
EdgeNode+
HostNode+
Node+
PublicCloudGatewayNode+

Example Response: { "resource_type": "HostNode", "id": "564dab50-63a0-8b4f-a1f8-20e4d36efc3b", "display_name": "pnq1-vm-eng-dhcp-203-201.eng.vmware.com", "fqdn": "pnq1-vm-eng-dhcp-203-201.eng.vmware.com", "external_id": "564dab50-63a0-8b4f-a1f8-20e4d36efc3b", "ip_addresses": [ "10.41.40.41", "10.50.51.50" ], "discovered_ip_addresses": [ "10.41.40.41", "10.50.51.50" ], "managed_by_server": "10.41.203.17", "os_version": "6.0.0", "os_type": "ESXI", "_last_modified_time": 1413358186953, "_create_time": 1413358186953, "_create_user": "admin", "_last_modified_user": "admin", "_revision": 0 } Required Permissions: read Additional Errors:

Perform an Action on Fabric Node (Deprecated)

The supported fabric node actions are enter_maintenance_mode, exit_maintenance_mode for EdgeNode. This API is deprecated, please call TransportNode maintenance mode API to update maintenance mode, refer to "Update transport node maintenance mode". Request:
Method:
POST
URI Path:
/api/v1/fabric/nodes/<node-id>
Request Headers:
n/a
Query Parameters:
NodeActionParameters+
Request Body:
n/a

Example Request: POST https://<nsx-mgr>/api/v1/fabric/nodes/53b55e00-e5c1-11e5-a549-005056b18ef8?action=enter_maintenance_mode Successful Response:
Response Code:
202 Accepted
Response Headers:
Content-type: application/json
Response Body:
EdgeNode+
HostNode+
Node+
PublicCloudGatewayNode+

Example Response: { "resource_type": "EdgeNode", "id": "53b55e00-e5c1-11e5-a549-005056b18ef8", "display_name": "nsx-edge2", "fqdn": "nsx-edge2.eng.abc.com", "ip_addresses": [ "192.168.110.37" ], "discovered_ip_addresses": [ "192.168.110.37" ], "external_id": "53b55e00-e5c1-11e5-a549-005056b18ef8", "deployment_type": "VIRTUAL_MACHINE", "_last_modified_time": 1457505420494, "_create_time": 1457505420494, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 0 } Required Permissions: crud Feature: utilities_upgrade Additional Errors:

Update a Node

Modifies attributes of a fabric node (host or edge). Request:
Method:
PUT
URI Path:
/api/v1/fabric/nodes/<node-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
EdgeNode+
HostNode+
Node+
PublicCloudGatewayNode+

Example Request: PUT https://<nsx-mgr>/api/v1/fabric/nodes/8538f119-ba45-4fb1-9cf1-ee849e4cf168 { "resource_type": "EdgeNode", "id": "8538f119-ba45-4fb1-9cf1-ee849e4cf168", "display_name": "edge-node5", "ip_addresses": [ "192.168.110.37", "192.168.110.38" ], "_create_time": 1446579085852, "_last_modified_user": "admin", "_system_owned": false, "_last_modified_time": 1446579085852, "_create_user": "admin", "_revision": 0 } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
EdgeNode+
HostNode+
Node+
PublicCloudGatewayNode+

Example Response: { "resource_type": "EdgeNode", "id": "8538f119-ba45-4fb1-9cf1-ee849e4cf168", "display_name": "edge-node5", "fqdn": "edge-node5.eng.abc.com", "ip_addresses": [ "192.168.110.37", "192.168.110.38" ], "discovered_ip_addresses": [ "192.168.110.37", "192.168.110.38" ], "_create_time": 1446579085852, "_last_modified_user": "admin", "_system_owned": false, "_last_modified_time": 1446660509297, "_create_user": "admin", "_revision": 1 } Required Permissions: crud Additional Errors:

Return the List of Capabilities of a Single Node

Returns information about capabilities of a single fabric node (host or edge). Request:
Method:
GET
URI Path:
/api/v1/fabric/nodes/<node-id>/capabilities
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/nodes/c8778638-818a-11e4-a4d5-210df118b5e2/capabilities Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NodeCapabilitiesResult+

Example Response: { "capabilities": [ { "description": "Capability of supporting rate limiting in switch security switching profile", "version": 1, "value": "true", "key": "switchingprofile.switch-security.rate-limiting" }, { "description": "Capability of supporting multiple LACP groups in uplink host switch profile", "version": 1, "value": "true", "key": "hostswitchprofile.multi-lag" }, { "description": "Capability of supporting egress shaper in QoS switching profile", "version": 1, "value": "true", "key": "switchingprofile.qos.shaper.egress" }, { "description": "Capability of supporting LLDP in lldp host switch profile", "version": 1, "value": "true", "key": "hostswitchprofile.lldp" }, { "description": "Capability of supporting broadcast shaper in QoS switching profile", "version": 1, "value": "true", "key": "switchingprofile.qos.shaper.broadcast" } ] } Required Permissions: read Additional Errors:

Get the module details of a Fabric Node

Request:
Method:
GET
URI Path:
/api/v1/fabric/nodes/<node-id>/modules
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/nodes/8538f119-ba45-4fb1-9cf1-ee849e4cf168/modules Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
SoftwareModuleResult+

Example Response: { "software_modules": [ { "module_name": "nsx-aggservice", "module_version": "1.1.0.0.0-4320344" }, { "module_name": "nsx-da", "module_version": "1.1.0.0.0-4320344" }, { "module_name": "nsx-esx-datapath", "module_version": "1.1.0.0.0-4320347" }, { "module_name": "nsx-exporter", "module_version": "1.1.0.0.0-4320344" }, { "module_name": "nsx-host", "module_version": "1.1.0.0.0-4320389" }, { "module_name": "nsx-lldp", "module_version": "1.1.0.0.0-4320344" }, { "module_name": "nsx-mpa", "module_version": "1.1.0.0.0-4320344" }, { "module_name": "nsx-netcpa", "module_version": "1.1.0.0.0-4320340" }, { "module_name": "nsx-python-protobuf", "module_version": "2.4.1-1" }, { "module_name": "nsx-sfhc", "module_version": "1.1.0.0.0-4320344" }, { "module_name": "nsx-support-bundle-client", "module_version": "1.1.0.0.0-4320344" }, { "module_name": "nsxa", "module_version": "1.1.0.0.0-4320344" }, { "module_name": "nsxcli", "module_version": "1.1.0.0.0-4320339" } ] } Required Permissions: read Feature: utilities_upgrade Additional Errors:

List the specified node's Network Interfaces

Returns the number of interfaces on the node and detailed information about each interface. Interface information includes MTU, broadcast and host IP addresses, link and admin status, MAC address, network mask, and the IP configuration method (static or DHCP). Request:
Method:
GET
URI Path:
/api/v1/fabric/nodes/<node-id>/network/interfaces
Request Headers:
n/a
Query Parameters:
DataSourceParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/nodes/<node-id>/network/interfaces Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NodeInterfacePropertiesListResult+

Example Response: { "result_count": 6, "results": [ { "interface_id": "vmnic0", "admin_status": "UP", "link_status": "UP", "source": "cached", "mtu": 1500 }, { "interface_id": "vmnic1", "admin_status": "UP", "link_status": "UP", "source": "cached", "mtu": 1600 }, { "interface_id": "vmnic2", "admin_status": "UP", "link_status": "DOWN", "source": "cached", "mtu": 1500 }, { "interface_alias": [ { "physical_address": "54:9f:35:0b:d0:84", "netmask": "255.255.255.0", "ip_address": "192.168.210.53", "ip_configuration": "STATIC", "broadcast_address": "192.168.210.255" } ], "interface_id": "vmk0", "admin_status": "UP", "link_status": "UP", "source": "cached", "mtu": 1500 }, { "interface_alias": [ { "physical_address": "00:50:56:68:91:ad", "netmask": "255.255.255.0", "ip_address": "10.20.20.53", "ip_configuration": "STATIC", "broadcast_address": "10.20.20.255" } ], "interface_id": "vmk1", "admin_status": "UP", "link_status": "UP", "source": "cached", "mtu": 1500 }, { "interface_alias": [ { "physical_address": "00:50:56:65:f5:fc", "netmask": "255.255.255.0", "ip_address": "192.168.250.102", "ip_configuration": "STATIC", "broadcast_address": "192.168.250.255" } ], "interface_id": "vmk10", "admin_status": "UP", "link_status": "UP", "source": "cached", "mtu": 1600 } ] } Required Permissions: read Additional Errors:

Read the node's Network Interface

Returns detailed information about the specified interface. Interface information includes MTU, broadcast and host IP addresses, link and admin status, MAC address, network mask, and the IP configuration method (static or DHCP). Request:
Method:
GET
URI Path:
/api/v1/fabric/nodes/<node-id>/network/interfaces/<interface-id>
Request Headers:
n/a
Query Parameters:
DataSourceParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/nodes/<node-id>/network/interfaces/vmk10 Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NodeInterfaceProperties+

Example Response: { "interface_alias": [ { "physical_address": "00:50:56:65:f5:fc", "netmask": "255.255.255.0", "ip_address": "192.168.250.102", "ip_configuration": "STATIC", "broadcast_address": "192.168.250.255" } ], "interface_id": "vmk10", "admin_status": "UP", "link_status": "UP", "source": "cached", "mtu": 1600 } Required Permissions: read Additional Errors:

Read the NSX Manager's Network Interface Statistics

On the specified interface, returns the number of received (rx), transmitted (tx), and dropped packets; the number of bytes and errors received and transmitted on the interface; and the number of detected collisions. Request:
Method:
GET
URI Path:
/api/v1/fabric/nodes/<node-id>/network/interfaces/<interface-id>/stats
Request Headers:
n/a
Query Parameters:
DataSourceParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/nodes/<node-id>/network/interfaces/<interface-id>/stats Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NodeInterfaceStatisticsProperties+

Example Response: { "tx_errors": 0, "rx_frame": 0, "tx_carrier": 0, "tx_bytes": 31611, "rx_dropped": 1813, "tx_packets": 261, "rx_packets": 91656, "interface_id": "mgmt", "tx_dropped": 0, "tx_colls": 0, "rx_errors": 0, "rx_bytes": 7360718 } Required Permissions: read Additional Errors:

Get the Realized State of a Fabric Node

Request:
Method:
GET
URI Path:
/api/v1/fabric/nodes/<node-id>/state
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/nodes/8538f119-ba45-4fb1-9cf1-ee849e4cf168/state Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ConfigurationState+

Example Response: { "details": [], "state": "success" } Required Permissions: read Feature: utilities_upgrade Additional Errors:

Return Runtime Status Information for a Node

Returns connectivity, heartbeat, and version information about a fabric node (host or edge). Note that the LCP connectivity status remains down until after the fabric node has been added as a transpot node and the NSX host switch has been successfully installed. See POST /api/v1/transport-nodes. Request:
Method:
GET
URI Path:
/api/v1/fabric/nodes/<node-id>/status
Request Headers:
n/a
Query Parameters:
DataSourceParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/nodes/90b3ee63-82fe-11e5-b403-fd59414c0c52/status Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NodeStatus+

Example Response: { "last_heartbeat_timestamp": 1446675283540, "lcp_connectivity_status": "UP", "mpa_connectivity_status": "UP", "system_status": { "mem_used": 2551264, "system_time": 1446649452000, "file_systems": [ { "file_system": "root", "total": 32768, "used": 476, "type": "ramdisk", "mount": "/" }, { "file_system": "etc", "total": 28672, "used": 220, "type": "ramdisk", "mount": "/etc" }, { "file_system": "opt", "total": 32768, "used": 1040, "type": "ramdisk", "mount": "/opt" }, { "file_system": "var", "total": 49152, "used": 1196, "type": "ramdisk", "mount": "/var" }, { "file_system": "tmp", "total": 262144, "used": 24136, "type": "ramdisk", "mount": "/tmp" }, { "file_system": "hostdstats", "total": 302080, "used": 2072, "type": "ramdisk", "mount": "/var/lib/vmware/hostd/stats" } ], "load_average": [ 0.17000000178813934, 0.17000000178813934, 0.15000000596046448 ], "swap_total": 0, "mem_cache": 0, "cpu_cores": 16, "source": "cached", "mem_total": 25119208, "swap_used": 0, "uptime": 7213000 }, "last_sync_time": 1473837914408, "mpa_connectivity_status_details": "Client is responding to heartbeats", "software_version": "1.1.0.0.0.3195008", "host_node_deployment_status": "INSTALL_SUCCESSFUL", "lcp_connectivity_status_details": [ { "control_node_ip": "192.168.110.34", "failure_status": "UNKNOWN_FAILURE_STATUS", "status": "UP" } ], "inventory_sync_paused": false } Required Permissions: read Additional Errors:

Restart the inventory sync for the node if it is paused currently.

Restart the inventory sync for the node if it is currently internally paused. After this action the next inventory sync coming from the node is processed. Request:
Method:
POST
URI Path:
/api/v1/fabric/nodes/<node-id>?action=restart_inventory_sync
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Required Permissions: crud Feature: nodes_nodes Additional Errors:

Perform a service deployment upgrade on a host node

Request:
Method:
POST
URI Path:
/api/v1/fabric/nodes/<node-id>?action=upgrade_infra
Request Headers:
n/a
Query Parameters:
UpgradeInfraRequestParameters+
Request Body:
n/a

Example Request: POST https://<nsx-mgr>/api/v1/fabric/nodes/4c8101d8-a129-11e6-961f-005056a99106?action=upgrade_infra Successful Response:
Response Code:
202 Accepted
Response Headers:
Content-type: application/json
Response Body:
EdgeNode+
HostNode+
Node+
PublicCloudGatewayNode+

Example Response: { "resource_type" : "HostNode", "description" : "", "id" : "73aabd55-7c9a-4015-a769-47e2e95f0045", "display_name" : "comp-02b", "tags" : [ ], "fqdn" : "", "ip_addresses" : [ "192.168.210.54" ], "external_id" : "73aabd55-7c9a-4015-a769-47e2e95f0045", "discovered_ip_addresses" : [ ], "os_type" : "ESXI", "os_version" : "", "managed_by_server" : "", "_create_time" : 1478050967406, "_create_user" : "admin", "_last_modified_user" : "admin", "_last_modified_time" : 1478050967406, "_revision" : 0 } Required Permissions: crud Additional Errors:

Return Runtime Status Information for given Nodes

Returns connectivity, heartbeat, and version information about all fabric nodes (host or edge). Request:
Method:
GET
URI Path:
/api/v1/fabric/nodes/status
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
ReadNodesStatusRequestParameters+

Example Request: GET https://<nsx-mgr>/api/v1/fabric/nodes/status { "node_ids": [ "b342511e-d0b4-475c-89f4-edfb7a494437", "9ec4e9e1-ae56-4b04-8ee7-836d7216c81b" ] } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NodeStatusListResult+

Example Response: { "cursor": "003600000000-0000-0000-0000-0000000000022305843009213694015", "sort_by": "priority", "result_count": 2, "results": [ { "last_heartbeat_timestamp": 1446675283540, "lcp_connectivity_status": "UP", "mpa_connectivity_status": "UP", "system_status": { "mem_used": 2551264, "system_time": 1446649452000, "file_systems": [ { "file_system": "root", "total": 32768, "used": 476, "type": "ramdisk", "mount": "/" }, { "file_system": "etc", "total": 28672, "used": 220, "type": "ramdisk", "mount": "/etc" }, { "file_system": "opt", "total": 32768, "used": 1040, "type": "ramdisk", "mount": "/opt" } ], "load_average": [ 0.17000000178813934, 0.17000000178813934, 0.15000000596046448 ], "swap_total": 0, "mem_cache": 0, "cpu_cores": 16, "source": "cached", "mem_total": 25119208, "swap_used": 0, "uptime": 7213000 }, "last_sync_time": 1473837914408, "mpa_connectivity_status_details": "Client is responding to heartbeats", "software_version": "1.1.0.0.0.3195008", "host_node_deployment_status": "INSTALL_SUCCESSFUL", "lcp_connectivity_status_details": [ { "control_node_ip": "192.168.110.34", "failure_status": "UNKNOWN_FAILURE_STATUS", "status": "UP" } ], "inventory_sync_paused": false "external_id": "b342511e-d0b4-475c-89f4-edfb7a494437", } }, { "last_heartbeat_timestamp": 1446675283540, "lcp_connectivity_status": "UP", "mpa_connectivity_status": "UP", "last_sync_time": 1473837914408, "mpa_connectivity_status_details": "Client is responding to heartbeats", "software_version": "1.1.0.0.0.3195008", "host_node_deployment_status": "INSTALL_SUCCESSFUL", "lcp_connectivity_status_details": [ { "control_node_ip": "192.168.110.34", "failure_status": "UNKNOWN_FAILURE_STATUS", "status": "UP" } ], "inventory_sync_paused": false "external_id": "9ec4e9e1-ae56-4b04-8ee7-836d7216c81b", } } ] } Required Permissions: read Additional Errors:

Fabric: Vifs

Associated URIs:

Return the List of Virtual Network Interfaces (VIFs)

Returns information about all VIFs. A virtual network interface aggregates network interfaces into a logical interface unit that is indistinuishable from a physical network interface. Request:
Method:
GET
URI Path:
/api/v1/fabric/vifs
Request Headers:
n/a
Query Parameters:
VifListRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/vifs Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
VirtualNetworkInterfaceListResult+

Example Response: { "cursor": "00365fbf3eee-b54e-47ec-bf38-e316656c2084nnuullll", "result_count": 2, "results": [ { "resource_type": "VirtualNetworkInterface", "device_key": "4000", "device_name": "Network adapter 1", "ip_address_info": [ { "ip_addresses": [ "172.16.20.10", "fe80::250:56ff:fe86:f2b2" ], "source": "VM_TOOLS" } ], "vm_local_id_on_host": "1", "mac_address": "00:50:56:86:f2:b2", "owner_vm_id": "5006d98a-352f-134f-df6b-33e7f8d5de65", "external_id": "5006d98a-352f-134f-df6b-33e7f8d5de65-4000", "lport_attachment_id": "3d4b208c-b986-47f7-8a29-a74610d33a13", "host_id": "74730a28-e52d-11e5-936e-6f061d405a28" }, { "resource_type": "VirtualNetworkInterface", "device_key": "4000", "device_name": "Network adapter 1", "ip_address_info": [ { "ip_addresses": [ "172.16.20.11", "fe80::250:56ff:feb1:705e" ], "source": "VM_TOOLS" } ], "vm_local_id_on_host": "3", "mac_address": "00:50:56:b1:70:5e", "owner_vm_id": "50314b00-d422-d5d0-0cb2-d8a904a31c16", "external_id": "50314b00-d422-d5d0-0cb2-d8a904a31c16-4000", "lport_attachment_id": "d0649784-6fb8-43f9-be9e-88d3ee357f6e", "host_id": "65bcd211-e570-11e5-8472-991cc87d670e" } ] } Required Permissions: read Additional Errors:

Fabric: Virtual Machines

Associated URIs:

Return the List of Virtual Machines

Returns information about all virtual machines. Request:
Method:
GET
URI Path:
/api/v1/fabric/virtual-machines
Request Headers:
n/a
Query Parameters:
VirtualMachineListRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/fabric/virtual-machines Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
VirtualMachineListResult+

Example Response: { "cursor" : "00361f148bdc-fe7c-4320-8ef3-594e28d57c87Iws-2", "result_count" : 1, "results" : [ { "display_name" : "Iws-2", "resource_type" : "VirtualMachine", "local_id_on_host": "1", "external_id" : "420e72c9-55e7-a4f7-81bf-673a2af1a6cf", "host_id" : "cf0ffd7a-818a-11e4-9ab1-cb7a79b0af39", "compute_ids" : [ "locationId:420e72c9-55e7-a4f7-81bf-673a2af1a6cf", "instanceUuid:500e0c08-2ecc-2609-d9ba-ed489e48c787", "biosUuid:420e72c9-55e7-a4f7-81bf-673a2af1a6cf", "externalId:420e72c9-55e7-a4f7-81bf-673a2af1a6cf", "hostLocalId:1", "moIdOnHost:1" ], "source" : { "target_display_name" : "sc2-rdops-vm03-dhcp-102-35.eng.vmware.com", "is_valid" : true, "target_type" : "HostNode", "target_id" : "3d0574b8-267c-11e7-9126-0febdf149b8c" }, "type" : "REGULAR", "power_state" : "VM_RUNNING", "_last_sync_time" : 1493291539130 } ] } { "cursor": "00011", "result_count": 1, "results": [ { "resource_type": "VirtualMachine", "display_name": "app-vm", "compute_ids": [ "instanceUuid:5006d98a-352f-134f-df6b-33e7f8d5de65", "moIdOnHost:1", "externalId:5006d98a-352f-134f-df6b-33e7f8d5de65", "hostLocalId:1", "locationId:564d1012-15a8-dd22-9c13-f53d697678a8", "biosUuid:4206a555-5a2f-edaa-d215-dac9508da942" ], "external_id": "5006d98a-352f-134f-df6b-33e7f8d5de65", "source" : { "target_display_name" : "sc2-rdops-vm03-dhcp-102-35.eng.vmware.com", "is_valid" : true, "target_type" : "HostNode", "target_id" : "3d0574b8-267c-11e7-9126-0febdf149b8c" }, "type": "REGULAR", "host_id": "74730a28-e52d-11e5-936e-6f061d405a28", "local_id_on_host": "1", "power_state" : "VM_RUNNING", "_last_sync_time" : 1493291539130 } ] } { "cursor": "00364a60d899-7b2b-4983-8254-41be3aba6472web-vm", "result_count": 1, "results": [ { "resource_type": "VirtualMachine", "display_name": "web-vm", "compute_ids": [ "instanceUuid:50069c43-e024-9fce-6017-001a87ef32be", "moIdOnHost:1", "externalId:50069c43-e024-9fce-6017-001a87ef32be", "hostLocalId:1", "locationId:564d6439-4abb-e39c-1a2f-d2524e3cc3e1", "biosUuid:42060137-3f57-15bb-1bfc-293c4ba89050" ], "external_id": "50069c43-e024-9fce-6017-001a87ef32be", "source" : { "target_display_name" : "sc2-rdops-vm03-dhcp-102-35.eng.vmware.com", "is_valid" : true, "target_type" : "HostNode", "target_id" : "3d0574b8-267c-11e7-9126-0febdf149b8c" }, "type": "REGULAR", "host_id": "65bcd211-e570-11e5-8472-991cc87d670e", "local_id_on_host": "1", "power_state" : "VM_RUNNING", "_last_sync_time" : 1493291539130 } ] } { "cursor": "00011", "result_count": 1, "results": [ { "resource_type": "VirtualMachine", "display_name": "db-vm-new", "compute_ids": [ "instanceUuid:50314b00-d422-d5d0-0cb2-d8a904a31c16", "moIdOnHost:3", "externalId:50314b00-d422-d5d0-0cb2-d8a904a31c16", "hostLocalId:3", "locationId:564d90f6-8f73-1baa-8226-82d85cc9c5c8", "biosUuid:4231c15f-ca24-b567-65b4-17bf1c0dd20e" ], "external_id": "50314b00-d422-d5d0-0cb2-d8a904a31c16", "source" : { "target_display_name" : "sc2-rdops-vm03-dhcp-102-35.eng.vmware.com", "is_valid" : true, "target_type" : "HostNode", "target_id" : "3d0574b8-267c-11e7-9126-0febdf149b8c" }, "type": "REGULAR", "host_id": "65bcd211-e570-11e5-8472-991cc87d670e", "local_id_on_host": "3", "power_state" : "VM_RUNNING", "_last_sync_time" : 1493291539130 } ] } Required Permissions: read Additional Errors:

Update tags applied to a virtual machine

Update tags applied to the virtual machine. External id of the virtual machine will be specified in the request body. Request body should contain all the tags to be applied. To clear all tags, provide an empty list. User can apply maximum 10 tags on a virtual machine. The remaining 5 are reserved for system defined tags. Request:
Method:
POST
URI Path:
/api/v1/fabric/virtual-machines?action=update_tags
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
VirtualMachineTagUpdate+

Example Request: POST https://<nsx-mgr>/api/v1/fabric/virtual-machines?action=update_tags { "external_id": "ID-0", "tags": [ {"scope": "os", "tag": "win32"}, {"scope": "security", "tag": "PCI"} ] } Successful Response:
Response Code:
204 No Content
Response Headers:
n/a
Response Body:
n/a

Required Permissions: crud Feature: vm_vm_tags Additional Errors:

Grouping Objects

Grouping Objects: Ip Sets

Associated URIs:

List IPSets

Returns paginated list of IPSets Request:
Method:
GET
URI Path:
/api/v1/ip-sets
Request Headers:
n/a
Query Parameters:
IPSetListRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/ip-sets Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
IPSetListResult+

Example Response: { "cursor": "003696ebbc9f-6eae-4009-b709-532820dbba2atestIPSet", "sort_by": "displayName", "sort_ascending": true, "result_count": 1, "results": [ { "id": "96ebbc9f-6eae-4009-b709-532820dbba2a", "display_name": "testIPSet", "resource_type": "IPSet", "ip_addresses": [ "192.168.1.1-192.168.1.6", "192.168.1.8", "192.168.4.8/24" ], "_last_modified_user": "a;a", "_last_modified_time": 1439879046475, "_create_time": 1439879046475, "_system_owned": false, "_create_user": "a;a", "_revision": 0 } ] } Required Permissions: read Additional Errors:

Create IPSet

Creates a new IPSet that can group either IPv4 or IPv6 individual ip addresses, ranges or subnets. Request:
Method:
POST
URI Path:
/api/v1/ip-sets
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
IPSet+

Example Request: POST https://<nsx-mgr>/api/v1/ip-sets { "display_name":"testIPSet", "ip_addresses":["192.168.1.1-192.168.1.6","192.168.1.8","192.168.4.8/24"] } Successful Response:
Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
IPSet+

Example Response: { "id": "96ebbc9f-6eae-4009-b709-532820dbba2a", "display_name": "testIPSet", "resource_type": "IPSet", "ip_addresses": [ "192.168.1.1-192.168.1.6", "192.168.1.8", "192.168.4.8/24" ], "_last_modified_user": "a;a", "_last_modified_time": 1439879046475, "_create_time": 1439879046475, "_system_owned": false, "_create_user": "a;a", "_revision": 0 } Required Permissions: crud Additional Errors:

Read IPSet

Returns information about the specified IPSet Request:
Method:
GET
URI Path:
/api/v1/ip-sets/<ip-set-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/ip-sets/2ffea46a-b537-4d71-98f5-6fedb7f3c28b Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
IPSet+

Example Response: { "id": "2ffea46a-b537-4d71-98f5-6fedb7f3c28b", "display_name": "testIPSet", "resource_type": "IPSet", "ip_addresses": [ "192.168.1.1-192.168.1.6", "192.168.1.8", "192.168.4.8/24" ], "_last_modified_user": "a;a", "_last_modified_time": 1439892910866, "_create_time": 1439892910866, "_system_owned": false, "_create_user": "a;a", "_revision": 0 } Required Permissions: read Additional Errors:

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. Request:
Method:
DELETE
URI Path:
/api/v1/ip-sets/<ip-set-id>
Request Headers:
n/a
Query Parameters:
IPSetDeleteRequestParameters+
Request Body:
n/a

Example Request: DELETE https://<nsx-mgr>/api/v1/ip-sets/22dc1d1a-adcb-4c58-874e-6e783df02790 DELETE https://<nsx-mgr>/api/v1/ip-sets/22dc1d1a-adcb-4c58-874e-6e783df02790 ?force=true Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Required Permissions: crud Additional Errors:

Update IPSet

Updates the specified IPSet. Modifiable parameters include description, display_name and ip_addresses. Request:
Method:
PUT
URI Path:
/api/v1/ip-sets/<ip-set-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
IPSet+

Example Request: PUT https://<nsx-mgr>/api/v1/ip-sets/e8102843-dc86-47d4-903f-5911ea48deb7 { "resource_type": "IPSet", "display_name": "West Customers", "ip_addresses": [ "192.168.1.1-192.168.1.6", "192.168.1.0/24", "192.168.4.0/24" ], "_revision": 0 } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
IPSet+

Example Response: { "resource_type": "IPSet", "id": "e8102843-dc86-47d4-903f-5911ea48deb7", "display_name": "West Customers", "ip_addresses": [ "192.168.1.1-192.168.1.6", "192.168.1.0/24", "192.168.4.0/24" ], "_last_modified_time": 1458326830542, "_create_time": 1458326554714, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 1 } Required Permissions: crud Additional Errors:

Grouping Objects: Mac Sets

Associated URIs:

List MACSets

Returns paginated list of MACSets Request:
Method:
GET
URI Path:
/api/v1/mac-sets
Request Headers:
n/a
Query Parameters:
MACSetListRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/mac-sets Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
MACSetListResult+

Example Response: { "cursor": "003602cf0d81-4c1c-45fb-87b3-fb52ec89a8a4test-mac-set", "result_count": 1, "results": [ { "resource_type": "MACSet", "id": "02cf0d81-4c1c-45fb-87b3-fb52ec89a8a4", "display_name": "test-mac-set", "mac_addresses": [ "01:23:45:67:89:AB", "00:14:22:01:23:45", "01:66:48:21:97:AC", "00:57:82:44:12:99" ], "_create_time": 1454015311172, "_last_modified_user": "admin", "_system_owned": false, "_last_modified_time": 1454015311172, "_create_user": "admin", "_revision": 0 } ] } Required Permissions: read Additional Errors:

Create MACSet

Creates a new MACSet that can group individual MAC addresses. Request:
Method:
POST
URI Path:
/api/v1/mac-sets
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
MACSet+

Example Request: POST https://<nsx-mgr>/api/v1/mac-sets { "display_name":"testMACSet", "mac_addresses":["01:23:45:67:89:ab","00:14:22:01:23:45"] } Successful Response:
Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
MACSet+

Example Response: { "resource_type": "MACSet", "id": "c20eb62d-9ff1-4d64-8506-134e603e01f9", "display_name": "testMACSet", "mac_addresses": [ "01:23:45:67:89:AB", "00:14:22:01:23:45" ], "_last_modified_time": 1458327532700, "_create_time": 1458327532700, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 0 } Required Permissions: crud Additional Errors:

Read MACSet

Returns information about the specified MACSet Request:
Method:
GET
URI Path:
/api/v1/mac-sets/<mac-set-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/mac-sets/183e372b-854c-4fcc-a24e-05721ce89a60 Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
MACSet+

Example Response: { "_revision": 0, "id": "183e372b-854c-4fcc-a24e-05721ce89a60", "display_name":"testMACSet", "resource_type": "MACSet", "mac_addresses":["01:23:45:67:89:ab","00:14:22:01:23:45"], "_create_user": "system", "_last_modified_user": "system", "_last_modified_time": 1414057732203, "_create_time": 1414057732203 } Required Permissions: read Additional Errors:

Update MACSet

Updates the specified MACSet. Modifiable parameters include the description, display_name and mac_addresses. Request:
Method:
PUT
URI Path:
/api/v1/mac-sets/<mac-set-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
MACSet+

Example Request: PUT https://<nsx-mgr>/api/v1/mac-sets/d95da628-8677-4d26-b593-76b51c6439c2 { "resource_type": "MACSet", "display_name": "Lab A MACs", "mac_addresses": [ "01:23:45:67:89:AB", "00:14:22:01:23:45" ], "_revision": 0 } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
MACSet+

Example Response: { "resource_type": "MACSet", "id": "d95da628-8677-4d26-b593-76b51c6439c2", "display_name": "Lab A MACs", "mac_addresses": [ "01:23:45:67:89:AB", "00:14:22:01:23:45" ], "_last_modified_time": 1458327141731, "_create_time": 1458167290173, "_last_modified_user": "admin", "_system_owned": false, "_create_user": "admin", "_revision": 1 } Required Permissions: crud Additional Errors:

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. Request:
Method:
DELETE
URI Path:
/api/v1/mac-sets/<mac-set-id>
Request Headers:
n/a
Query Parameters:
MACSetDeleteRequestParameters+
Request Body:
n/a

Example Request: DELETE https://<nsx-mgr>/api/v1/mac-sets/183e372b-854c-4fcc-a24e-05721ce89a60 DELETE https://<nsx-mgr>/api/v1/mac-sets/183e372b-854c-4fcc-a24e-05721ce89a60 ?force=true Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Required Permissions: crud Additional Errors:

Add a MAC address to a MACSet

Add an individual MAC address to a MACSet Request:
Method:
POST
URI Path:
/api/v1/mac-sets/<mac-set-id>/members
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
MACAddressElement+

Example Request: POST https://<nsx-mgr>/api/v1/mac-sets/183e372b-854c-4fcc-a24e-05721ce89a60/members { "mac_address":"01:23:45:67:89:ab" } Successful Response:
Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
MACAddressElement+

Example Response: { "mac_address": "01:23:45:67:89:AB", "_revision": 2 } Required Permissions: crud Additional Errors:

Get all MACAddresses in a MACSet

List all MAC addresses in a MACSet Request:
Method:
GET
URI Path:
/api/v1/mac-sets/<mac-set-id>/members
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/mac-sets/183e372b-854c-4fcc-a24e-05721ce89a60/members Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
MACAddressElementListResult+

Example Response: { "result_count": 4, "results": [ { "mac_address": "01:23:45:67:89:AB" }, { "mac_address": "00:14:22:01:23:45" }, { "mac_address": "01:66:48:21:97:AC" }, { "mac_address": "00:57:82:44:12:99" } ] } Required Permissions: read Additional Errors:

Remove a MAC address from given MACSet

Remove an individual MAC address from a MACSet Request:
Method:
DELETE
URI Path:
/api/v1/mac-sets/<mac-set-id>/members/<mac-address>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
n/a

Example Request: DELETE https://<nsx-mgr>/api/v1/mac-sets/183e372b-854c-4fcc-a24e-05721ce89a60/members/01:23:45:67:89:ab Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Required Permissions: crud Additional Errors:

Grouping Objects: Ns Groups

Associated URIs:

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 Request:
Method:
POST
URI Path:
/api/v1/ns-groups
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
NSGroup+

Example Request: POST https://<nsx-mgr>/api/v1/ns-groups { "display_name":"testNSGroup", "members":[ { "resource_type": "NSGroupSimpleExpression", "target_type": "IPSet", "target_property": "id", "op": "EQUALS", "value": "183e372b-854c-4fcc-a24e-05721ce89a60" } ], "membership_criteria": [ { "resource_type": "NSGroupComplexExpression", "expressions": [ { "resource_type": "NSGroupTagExpression", "target_type": "LogicalPort", "scope: "S1", "tag": "T1" }, { "resource_type": "NSGroupTagExpression", "target_type": "LogicalPort", "scope: "S2", "tag": "T2" } ] }, { "resource_type": "NSGroupTagExpression", "target_type": "LogicalSwitch", "scope": "S1", "tag": "T1" } ] } Successful Response:
Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
NSGroup+

Required Permissions: crud Additional Errors:

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. Request:
Method:
GET
URI Path:
/api/v1/ns-groups
Request Headers:
n/a
Query Parameters:
NSGroupListRequestParameters+
Request Body:
n/a

Example Request: GET https://<nsx-mgr>/api/v1/ ns-groups/ GET https://<nsx-mgr>/api/v1/ ns-groups?member_types=LogicalPort,LogicalSwitch,VirtualMachine Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NSGroupListResult+

Example Response: { "cursor": "0036a21f8e31-52e9-4790-9574-0c5f52f24096test-ns-group-4", "sort_ascending": true, "sort_by": "display_name", "result_count": 2, "results": [ { "resource_type": "NSGroup", "id": "71d33895-cebf-4ebe-bb84-5cd6f478cf44", "display_name": "NSGroup-1", "membership_criteria": [ { "resource_type": "NSGroupComplexExpression", "expressions": [ { "resource_type": "NSGroupTagExpression", "scope": "S1", "target_type": "LogicalSwitch", "tag": "T1", "scope_op": "EQUALS", "tag_op": "EQUALS" }, { "resource_type": "NSGroupTagExpression", "scope": "S2", "target_type": "LogicalSwitch", "tag": "T2", "scope_op": "EQUALS", "tag_op": "EQUALS" } ] } ], "members": [ { "resource_type": "NSGroupSimpleExpression", "op": "EQUALS", "target_resource": { "is_valid": true }, "target_type": "LogicalPort", "value": "8a042cca-ea22-4592-a816-c0365acd8a1a", "target_property": "id" } ], "member_count": 1, "_create_user": "admin", "_create_time": 1500424817903, "_last_modified_user": "admin", "_last_modified_time": 1500482503554, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 2 }, { "resource_type": "NSGroup", "id": "b350f55a-efb4-4040-a356-cc8438744e59", "display_name": "NSGroup-2", "membership_criteria": [ { "resource_type": "NSGroupTagExpression", "scope": "S1", "target_type": "LogicalSwitch", "tag": "T1", "scope_op": "EQUALS", "tag_op": "EQUALS" }, { "resource_type": "NSGroupTagExpression", "scope": "S2", "target_type": "LogicalSwitch", "tag": "T2", "scope_op": "EQUALS", "tag_op": "EQUALS" } ], "_create_user": "admin", "_create_time": 1500424859142, "_last_modified_user": "admin", "_last_modified_time": 1500424859148, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 1 } ] } { "cursor": "0036a21f8e31-52e9-4790-9574-0c5f52f24096test-ns-group-4", "sort_ascending": true, "sort_by": "displayName", "result_count": 1, "results": [ { "resource_type": "NSGroup", "id": "a21f8e31-52e9-4790-9574-0c5f52f24096", "display_name": "test-ns-group-4", "members": [ { "resource_type": "NSGroupSimpleExpression", "op": "EQUALS", "target_resource": { "target_display_name": "test-ipset-1", "is_valid": true, "target_type": "IPSet", "target_id": "8c0ab37c-c8db-4d69-99c9-21b6762a86f6" }, "target_type": "IPSet", "value": "8c0ab37c-c8db-4d69-99c9-21b6762a86f6", "target_property": "id" } ], "membership_criteria": [ {"resource_type": "NSGroupComplexExpression", expressions : [ { resource_type :NSGroupTagExpression, "target_type": "LogicalPort", "scope: "S1", tag: T1 }, { resource_type : NSGroupTagExpression, "target_type": "LogicalPort", "scope: "S2", tag: T2 } ] }, { resource_type : NSGroupTagExpression, "target_type": "LogicalSwitch", "scope: "S3", tag: T3 } ] } ], "_create_user": "admin", "_create_time": 1445584267531, "_last_modified_user": "admin", "_system_owned": false, "_last_modified_time": 1445584267531, "_revision": 0 } ] } Required Permissions: read Additional Errors:

Update NSGroup

Updates the specified NSGroup. Modifiable parameters include the description, display_name and members. Request:
Method:
PUT
URI Path:
/api/v1/ns-groups/<ns-group-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
NSGroup+

Example Request: PUT https://<nsx-mgr>/api/v1/ ns-groups/183e372b-854c-4fcc-a24e-05721ce89a60 { "resource_type": "NSGroup", "id": "71d33895-cebf-4ebe-bb84-5cd6f478cf44", "display_name": "NSGroup-1", "membership_criteria": [ { "resource_type": "NSGroupComplexExpression", "expressions": [ { "resource_type": "NSGroupTagExpression", "scope": "S1", "target_type": "LogicalSwitch", "tag": "T1", "scope_op": "EQUALS", "tag_op": "EQUALS" }, { "resource_type": "NSGroupTagExpression", "scope": "S2", "target_type": "LogicalSwitch", "tag": "T2", "scope_op": "EQUALS", "tag_op": "EQUALS" } ] } ], "members": [ { "resource_type": "NSGroupSimpleExpression", "op": "EQUALS", "target_resource": { "is_valid": true }, "target_type": "LogicalPort", "value": "8a042cca-ea22-4592-a816-c0365acd8a1a", "target_property": "id" } ], "member_count": 1, "_create_user": "admin", "_create_time": 1500424817903, "_last_modified_user": "admin", "_last_modified_time": 1500482503554, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 2 } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NSGroup+

Required Permissions: crud Additional Errors:

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. Request:
Method:
DELETE
URI Path:
/api/v1/ns-groups/<ns-group-id>
Request Headers:
n/a
Query Parameters:
NSGroupDeleteRequestParameters+
Request Body:
n/a

Example Request: DELETE https://<nsx-mgr>/api/v1/ ns-groups/183e372b-854c-4fcc-a24e-05721ce89a60 DELETE https://<nsx-mgr>/api/v1/ ns-groups/183e372b-854c-4fcc-a24e-05721ce89a60?force=true Successful Response:
Response Code:
200 OK
Response Headers:
n/a
Response Body:
n/a

Required Permissions: crud Additional Errors:

Add NSGroup expression

Add/remove the expressions passed in the request body to/from the NSGroup Request:
Method:
POST
URI Path:
/api/v1/ns-groups/<ns-group-id>
Request Headers:
n/a
Query Parameters:
MemberAction+
Request Body:
NSGroupExpressionList+

Example Request: POST https://<nsx-mgr>/api/v1/ ns-groups/183e372b-854c-4fcc-a24e-05721ce89a60?action=ADD_MEMBERS { "members": [ { "resource_type": "NSGroupSimpleExpression", "op": "EQUALS", "target_type": "IPSet", "value": "cd1b2ced-3d2c-4145-b54a-bf613c090aa", "target_property": "id" } ] } POST https://<nsx-mgr>/api/v1/ ns-groups/183e372b-854c-4fcc-a24e-05721ce89a60?action=REMOVE_MEMBERS { "members": [ { "resource_type": "NSGroupSimpleExpression", "op": "EQUALS", "target_type": "IPSet", "value": "cd1b2ced-3d2c-4145-b54a-bf613c090aa", "target_property": "id" } ] } Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NSGroup+