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 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,
        "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

 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 in 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 Windows 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 in the update method

accessKey

stringAccess key. Valid for AWS EC2 only

secretAccessKey

stringSecret access key. Valid for AWS EC2 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", "ONE_DRIVE", "SHARE_POINT"

Response Sample for VMware

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

Response Sample for Microsoft 365

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


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