Page tree

Adds an inventory item.

Endpoint

https://<Director_IP_address>:4443/c/router

Tenant Endpoint

For tenants of the multi-tenant product the endpoint must be:
https://<Director_IP_address>:4443/t/<tenant_UUID>/c/router

Request Example for VMware

curl
 curl --request POST \
    --url https://<Director_IP_address>:4443/c/router \
    --header "content-type: application/json" \
    --cookie @cookies.txt \
    --data "{
        "action": "VmwareDiscovery",
        "method": "create",
        "data": [{
				"vid": null,
				"name": "10.30.29.17",
				"host": "10.30.29.17",
				"port": "443",
				"username": "domain\\username",
				"password": "password",
				"confirmed": false
				}],
        "type": "rpc",
        "tid": 1}"

Request Example for Physical Machine

curl
 curl --request POST \
    --url https://<Director_IP_address>:4443/c/router \
    --header "content-type: application/json" \
    --cookie @cookies.txt \
    --data "{
        "action": "PhysicalDiscovery",
        "method": "create",
        "data": [{
				"vid": null,
				"name": "10.10.10.10",
				"host": "10.10.10.10",
				"type": "LINUX",
				"username": "admin",
				"password": "password",
				"confirmed": false,
				"sshPort": 22,
				"useExistingAgent": false
				}],
        "type": "rpc",
        "tid": 1}"

Request Example for Microsoft 365

curl
curl --request POST \
    --url https://<Director_IP_address>:4443/c/router \
    --header "content-type: application/json" \
    --cookie @cookies.txt \
    --data "{
        "action": "Office365Discovery",
    	"method": "create",
    	"data": [{
				"vid": null,
				"authType": "CLIENT_SECRET",
				"clientCertificateVid": null,
        		"clientId": "5gh5def0-d223-4b54-8abf-69f7fac9212f",
        		"discoveryServices": ["EXCHANGE_ONLINE"],
        		"name": "Office365 mailbox",
        		"tenantId": "e8f23c02-3278-4097-8ec5-3b91849e34570",
        		"clientSecret": "4y8uIekFy02nJKl.B1.K.7gmj0E_.f3Rx7"
				}],
    	"type": "rpc",
    	"tid": 1
}


Request Fields

Field

Type

Value(s)

Description
actionstring

VmwareDiscovery for VMware

HypervDiscovery for Hyper-V

AwsDiscovery for AWS

NutanixDiscovery for Nutanix AHV
PhysicalDiscovery for Physical machines

Office365Discovery for Microsoft 365

Hpe3ParDiscovery for HPE 3PAR

 The action that is invoked
methodstring
create
The method that is invoked
dataarray
Data of an inventory item to be created
typestringrpcType of communication protocol
tidinteger1Transaction ID. Used to identify the request by both the client and the server

Data

Field

Type

Description

vid

stringInventory item VID. Only use this field with the update method

type


Valid for Hyper-V, Amazon EC2 and physical machines. Possible values:

  • For Hyper-V: HOST, or CLUSTER
  • For AWS: NORMAL, US_GOVCLOUD, or CHINA_BEIJING
  • For Physical Server: WINDOWS, or LINUX

name

stringInventory item name

host

stringInventory item host

port

stringInventory item portOmitted for physical servers

username

stringUser name. Includes domain name if needed

password

stringUser password

confirmed

booleantrue if you need to add an unsupported version of inventory item; false otherwise. It may not be working when
the job runs. Use this field only with the update method

sshPort

integerThe SSH port to be used during installation

useExistingAgent

booleantrue if you would like to use an existing physical machine agent at the host; false otherwise. Valid for physical machines only

accessKey

stringAccess key. Valid for AWS EC2 only

secretAccessKey

stringSecret access key. Valid for AWS EC2 only

authType

stringType of authentication, can be "CLIENT_SECRET" or "CERTIFICATE". Valid for Microsoft 365 only

clientCertificateVid

stringVID of the client certificate used for authentication. If you opted for client secret authentication, then leave this parameter as null. Valid for Microsoft 365 only
tenantIdstringAzure Tenant ID created when registering your Microsoft 365 account in the Azure Portal. Valid for Microsoft 365 only
clientIdstringAzure Client ID created when registering your Microsoft 365 account in the Azure Portal. Valid for Microsoft 365 only
clientSecretstringAzure Client Secret obtained from the Azure Portal. Valid for Microsoft 365 only
discoveryServicesstringType of service to be added. Can be one or several of the following: "EXCHANGE_ONLINE", "EXCHANGE_ONLINE_GROUP", "ONE_DRIVE", "SHARE_POINT", "TEAM". Valid for Microsoft 365 only

Response Sample for VMware

 {
    "action": "VmwareDiscovery",
    "method": "create",
    "tid": "1",
    "type": "rpc",
    "message": null,
    "where": null,
    "cause": null,
    "data": 1
}

Response Sample for Physical Machine

 {
    "action": "PhysicalDiscovery",
    "method": "create",
    "tid": "1",
    "type": "rpc",
    "message": null,
    "where": null,
    "cause": null,
    "data": 2
}

Response Sample for Microsoft 365

 {
    "action": "Office365Discovery",
    "method": "create",
    "tid": "1",
    "type": "rpc",
    "message": null,
    "where": null,
    "cause": null,
    "data": 3
}


Response Fields

Field

Value

Description

messagestring

Message if the request failed

wherestring

Reference to the method where a problem occurred

causestring

Cause of failure

data
int

ID of the created inventory item

  • No labels