Add Inventory Item
Adds an inventory item.
Endpoint
https://<Director_IP_address>:4443/c/router
Request Example for VMware
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 --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 --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 |
---|---|---|---|
action
|
string |
|
The action that is invoked |
method
|
string | create |
The method that is invoked |
data
|
array |
|
Data of an inventory item to be created |
type
|
string | rpc
|
Type of communication protocol |
tid
|
integer | 1 | Transaction ID. Used to identify the request by both the client and the server |
Data
Field |
Type |
Description |
---|---|---|
|
string | Inventory item VID. Only use this field with the update method |
|
|
Valid for Hyper-V, Amazon EC2 and physical machines. Possible values:
|
|
string | Inventory item name |
|
string | Inventory item host |
|
string | Inventory item port. Omitted for physical servers |
|
string | User name. Includes domain name if needed |
|
string | User password |
|
boolean | true if you need to add an unsupported version of inventory item; false otherwise. It may not be working whenthe job runs. Use this field only with the update method. |
|
integer | The SSH port to be used during installation |
|
boolean | true if you would like to use an existing physical machine agent at the host; false otherwise. Valid for physical machines only |
|
string | Access key. Valid for AWS EC2 only |
|
string | Secret access key. Valid for AWS EC2 only |
|
string | Type of authentication, can be "CLIENT_SECRET" or "CERTIFICATE" . Valid for Microsoft 365 only |
|
string | VID 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 |
tenantId
|
string | Azure Tenant ID created when registering your Microsoft 365 account in the Azure Portal. Valid for Microsoft 365 only |
clientId
|
string | Azure Client ID created when registering your Microsoft 365 account in the Azure Portal. Valid for Microsoft 365 only |
clientSecret
|
string | Azure Client Secret obtained from the Azure Portal. Valid for Microsoft 365 only |
discoveryServices
|
string | Type 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 |
|
boolean | true to use a custom certificate for the HTTPS listener. Valid for Hyper-V only |
|
string | Type of the device. Can be one of the following: "HPE3PAR" , "HPE_PRIMERA" , "HPE_ALLETRA_9000" , "HPE_NIMBLE" , "HPE_ALLETRA_5000_6000" |
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 |
---|---|---|
message
|
string |
Message if the request failed |
where
|
string |
Reference to the method where a problem occurred |
cause
|
string |
Cause of failure |
data |
int |
ID of the created inventory item |