Add Node

Add 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
URI
POST
https://nsxmanager.your.domain/api/v1/fabric/nodes
COPY
Request Body
Node of type(s) application/json
Optional
{
    "_self": {
        "rel": "string"
    },
    "_system_owned": false,
    "display_name": "string",
    "description": "string",
    "tags": [
        {
            "scope": "string",
            "tag": "string"
        }
    ],
    "_revision": 0,
    "ip_addresses": [
        "string"
    ],
    "_create_user": "string",
    "fqdn": "string",
    "_schema": "string",
    "_create_time": 0,
    "discovered_ip_addresses": [
        "string"
    ],
    "_links": [
        {
            "action": "string",
            "href": "string",
            "rel": "string"
        }
    ],
    "_last_modified_time": 0,
    "_last_modified_user": "string",
    "external_id": "string",
    "id": "string",
    "resource_type": "string"
}
_self
Optional

_self

boolean
_system_owned
Optional

Indicates system owned resource

string
display_name
Optional

Defaults to ID if not set

string
description
Optional

description

array of Tag
tags
Optional

tags

integer As int64 As int64
_revision
Optional

The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected.

array of string
ip_addresses
Required

IPv4 or IPv6 address

string
_create_user
Optional

ID of the user who created this resource

string
fqdn
Optional

fqdn

string
_schema
Optional

_schema

integer As int64 As int64
_create_time
Optional

Timestamp of resource creation

array of string
discovered_ip_addresses
Optional

IPv4 or IPv6 address

_links
Optional

The server will populate this field when returing the resource. Ignored on PUT and POST.

integer As int64 As int64
_last_modified_time
Optional

Timestamp of last modification

string
_last_modified_user
Optional

ID of the user who last modified this resource

string
external_id
Optional

external_id

string
id
Optional

id

string
resource_type
Required

resource_type

Authentication
This operation uses the following authentication methods.
Responses
201

Resource created successfully

Returns Node of type(s) application/json
{
    "_self": {
        "rel": "string"
    },
    "_system_owned": false,
    "display_name": "string",
    "description": "string",
    "tags": [
        {
            "scope": "string",
            "tag": "string"
        }
    ],
    "_revision": 0,
    "ip_addresses": [
        "string"
    ],
    "_create_user": "string",
    "fqdn": "string",
    "_schema": "string",
    "_create_time": 0,
    "discovered_ip_addresses": [
        "string"
    ],
    "_links": [
        {
            "action": "string",
            "href": "string",
            "rel": "string"
        }
    ],
    "_last_modified_time": 0,
    "_last_modified_user": "string",
    "external_id": "string",
    "id": "string",
    "resource_type": "string"
}
_self
Optional

_self

boolean
_system_owned
Optional

Indicates system owned resource

string
display_name
Optional

Defaults to ID if not set

string
description
Optional

description

array of Tag
tags
Optional

tags

integer As int64 As int64
_revision
Optional

The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected.

array of string
ip_addresses
Required

IPv4 or IPv6 address

string
_create_user
Optional

ID of the user who created this resource

string
fqdn
Optional

fqdn

string
_schema
Optional

_schema

integer As int64 As int64
_create_time
Optional

Timestamp of resource creation

array of string
discovered_ip_addresses
Optional

IPv4 or IPv6 address

_links
Optional

The server will populate this field when returing the resource. Ignored on PUT and POST.

integer As int64 As int64
_last_modified_time
Optional

Timestamp of last modification

string
_last_modified_user
Optional

ID of the user who last modified this resource

string
external_id
Optional

external_id

string
id
Optional

id

string
resource_type
Required

resource_type


default

Unexpected error

Returns ApiError of type(s) application/json
{
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
string
module_name
Optional

module_name

string
error_message
Optional

error_message

integer As int64 As int64
error_code
Optional

error_code