Get Datastore Info for a Specific ESXi Host
Collects the data for all datastores within a specific ESXi host in Inventory. The returned identifier
parameter for the necessary datastore is required to deploy a transporter as a VMware vSphere appliance.
Endpoint
https://<Director_IP_address>:4443/c/router
Request Example
curl --request POST \
--url https://<Director_IP_address>:4443/c/router \
--header "content-type: application/json" \
--cookie @cookies.txt \
--data "{
"action": "InventoryManagement",
"method": "list",
"data": [{
"nodeType": "VMWARE_ESX",
"nodeId": 1,
"includeTypes": ["VMWARE_DATASTORE"]
}],
"type": "rpc",
"tid": 3}"
Request Fields
Field |
Type |
Value(s) |
---|---|---|
|
string |
|
|
string |
|
|
array |
See parameters below |
|
string |
|
|
integer |
|
data
Field |
Type |
Value(s) |
---|---|---|
|
string |
Type of inventory item; in this case, |
|
string |
The ID of the chosen node type; in this case, the ESXi host identifier value obtained previously |
|
string |
Specifies the type of objects to list; for datastores, |
Response Sample
{
"action": "InventoryManagement",
"method": "list",
"tid": "3",
"type": "rpc",
"message": null,
"where": null,
"cause": null,
"data": {
"children": [
{
"readOnlyHostMorIds": [
"host-23" ],
"free": 79967166464,
"size": 1314256842752,
"online": true,
"parentStorageVid": null,
"identifier": 8,
"vid": "VMWARE_DATASTORE-8",
"type": "VMWARE_DATASTORE",
"subType": "NFS",
"name": "VMTemplates02",
"description": null,
"accessible": false,
"isDisabled": false,
"replicable": false,
"hvType": "VMWARE",
"flags": 0,
"subName": null,
"children": null
},
{
"readOnlyHostMorIds": [],
"free": 64730693632,
"size": 2000112582656,
"online": true,
"parentStorageVid": null,
"identifier": 2,
"vid": "VMWARE_DATASTORE-2",
"type": "VMWARE_DATASTORE",
"subType": "VMFS",
"name": "Local-noRAID-MK",
"description": null,
"accessible": false,
"isDisabled": false,
"replicable": false,
"hvType": "VMWARE",
"flags": 0,
"subName": null,
"children": null
}
],
"totalCount": 2
}
}
Response Fields
Field |
Value |
Description |
---|---|---|
|
string |
Message if the request failed |
|
string |
Reference to the method where a problem occurred |
|
string |
Cause of failure |
|
array |
See parameters below |
|
integer |
Total number of located datastores in ESXi host |
data.children
Field |
Value |
Description |
---|---|---|
|
array |
Datastore, read-only host reference IDs |
|
long |
Free space |
|
long |
Size of the datastore |
|
boolean |
true if the datastore is online |
|
string |
Virtual identifier (VID) of the parent datastore, if applicable |
|
int |
Datastore ID |
|
string |
Virtual identifier (VID) of the datastore |
|
string |
Datastore type |
|
string |
Datastore subtype |
|
string |
Datastore name |
|
string |
Datastore description |
|
boolean |
|
|
boolean |
|
|
boolean |
|
|
string |
Hypervisor type |
|
int |
0th-bit checks if the host is free 1st-bit checks if the host is managed by a vCenter |
|
string |
Sub-name, if applicable |
|
array |
Datastore’s child objects, if applicable |