Inventory APIs
POST /api/v2/devices/tree
Description
Get a list of the number of devices by categories and subcategories. Can limit the result to show billable only devices by enabling the 'showBillable' parameter or including the hidden devices by enabling the 'hiddenDevices' flag.
Header Parameters
Name | Description | Type | Required | Default |
---|---|---|---|---|
Authorization | Bearer API token/key. The format is Bearer <API_key> | String | Yes | |
orgId | The ID of the organization. The format is OrgId:OrgName | String | Yes | |
siteId | The ID of the site. The format is SiteId:SiteName | String | Yes |
Query Parameters
Name | Description | Type | Required | Default |
---|---|---|---|---|
showBillable | Flag for showing/hiding billable subtype. If enabled, the result will contain only a list of billable devices | Boolean | No | false |
hiddenDevices | Flag for showing/hiding hidden devices. If enabled, the result will include the hidden devices | Boolean | No | false |
CURL Example
The below code snippet shows an example of the API call, where <NCE-IP>
, <ORG-ID>
, <SITE-ID>
& <API-TOKEN>
are variables.
curl --location --request POST 'https://<NCE-IP>/api/v2/devices/tree?hiddenDevices=true&showBillable=false' \
--header 'orgId: <ORG-ID>' \
--header 'siteId: <SITE-ID>' \
--header 'Authorization: Bearer <API-TOKEN>'
Response
Upon a successful request, the API returns Status code 200 with the following body:
Name | Description | Type |
---|---|---|
count | Count of the discovered devices | Integer |
items | List of device count by category Compute, Network, Storage, and Cluster | Object |
- name | Category name | String |
- isBillable | Boolean true/false if the category is billable | String |
- count | Count of devices in the category | Integer |
- items | List of detailed breakdowns of devices by sub-category | Object |
-- name | Sub-category name | String |
-- count | Count of devices in the sub-category | Integer |
POST /api/v2/devices/tableView
Description
Get a list of device details from the Inventory table view.
Header Parameters
Name | Description | Type | Required | Default |
---|---|---|---|---|
Authorization | Bearer API token/key. The format is Bearer <API_key> | String | Yes | |
orgId | The ID of the organization. The format is OrgId:OrgName | String | Yes | |
siteId | The ID of the site. The format is SiteId:SiteName | String | Yes |
Body Parameters
Name | Description | Type | Required | Default |
---|---|---|---|---|
page | Page number, starting from 1 | String | No | 1 |
size | Number of devices per page. Minimum size is 1 | String | No | 10 |
sort | Sorting criteria in the format: property, (asc,desc). Multiple sort criteria are supported | String | No | |
showBillable | Flag for showing/hiding billable subtype. If enabled, the result will contain only a list of billable devices | Boolean | No | false |
queryString | Validate queryString | String | No | |
script_id | scriptId to execute | String | No |
CURL Example
The below code snippet shows an example of the API call, where <NCE-IP>
, <ORG-ID>
, <SITE-ID>
& <API-TOKEN>
are variables.
curl --location --request POST 'https://<NCE-IP>/api/v2/devices/tableView?page=2&size=15&sort=lastUpdateTime%2C%20DESC&queryString=&script_id=&showBillable=true' \
--header 'orgId: <ORG-ID>' \
--header 'siteId: <SITE-ID>' \
--header 'Authorization: Bearer <API-TOKEN>'
Response
Upon a successful request, the API returns Status code 200 with the following body:
Name | Description | Type |
---|---|---|
pageInfo | General information about the page with returned results | Object |
- number | Page number returned | Integer |
- size | Page size returned | Integer |
- totalRecords | Total number of records | Integer |
pageData | List of records details | Array |
- orgId | Organization ID | String |
- siteId | Site ID | String |
- siteName | Site name | String |
- deviceId | Device unique ID | String |
- hostName | Device hostname | String |
- vmName | Device VM name | String |
- ipAddressSet | List of IPv4 addresses associated with the device | Array of strings |
- ipv6AddressSet | List of IPv6 addresses associated with the device | Array of strings |
- discoveredIpSet | List of IPv4 addresses used in device discovery | Array of strings |
- discoveredIpAddr | Device IP | String |
- devType | Device type | String |
- devSubType | Device subtype | String |
- vendor | Device vendor name | String |
- model | Device model | String |
- platform | Device platform name | String |
- platformType | Device platform type | String |
- version | Device platform version | String |
- serialNumber | Device serial number | String |
- fqdn | Device fully qualified domain name (FQDN) | String |
- fqdnList | Device fully qualified domain names list | Array of strings |
- domainName | Device domain name | String |
- isVirtual | Boolean yes/no if the device is virtual | String |
- reachableList | List of protocols able to connect with the device | Array of strings |
- unreachableList | List of protocols able to connect with the device. Each element in the object is constructed by "protocol":"Failure_reason" | Object |
- reachabilityStatus | Internal reachability status | Integer |
- discovered | Boolean true/false if the device is considered discovered. Devices discovered by more than ping protocol are considered discovered | Boolean |
- deviceStatus | Device status | String |
- deviceSubStatus | Device sub status | String |
- managers | List of device managers names and IPs | Object of string tuples |
- parents | List of device parent IDs | Array of strings |
- parentHostNames | List of device parents hostnames | Array of strings |
- clusters | List of device cluster IDs | Array of strings |
- managementIp | String | |
- vmDetailInfo | Details about the device (in case of a VM) | Object |
- service | List of services running on the device | Array of objects |
-- fsAppRole | Service role | String |
-- fsService | Service name | String |
- groupId | Device group ID | String |
- address | Device physical address | String |
- latitude | Latitude of the address | String |
- longitude | Longitude of the address | String |
- location | Device location | String |
- devLocation | String | |
- sysApps | Array | |
- vlanSet | Array | |
- scomDiscovered | Boolean yes/no if the device is discovered using Microsoft SCOM | String |
- allowPurge | Boolean true/false if the device allows purging | Boolean |
- source | The source of the discovery information | String |
- cmdbSysId | The CMDB ID associated with the device | String |
- cmdbStatus | The last CMDB push status | String |
- lastCMDBUpdateTime | Last time the record was pushed to the CMDB. The format is timeyyyy-MM-ddThh:mm:ss.tttZ | String |
- cmdbCommitHash | Hash of the device changes that was last pushed to the CMDB (used for auto-push) | String |
- cmdbNextScheduledRunTime | Next time the record will be auto-pushed to the CMDB (used for scheduled push). The format is timeyyyy-MM-ddThh:mm:ss.tttZ | String |
- lastUpdateTime | Last time when the device was updated. The format is timeyyyy-MM-ddThh:mm:ss.tttZ | String |
- userId | Username that updated the device inventory record | String |
- lastDiscovered | Last time when the device was discovered. The format is timeyyyy-MM-ddThh:mm:ss.tttZ | String |
- docStatus | String | |
- updateLog | String | |
- ref | String | |
- isVirtualEnum | String | |
- instanceUuid | String | |
- hideUnhideBy | The username that hide/unhide the device | String |
- userDefinedFields | List of user-defined fields | Array of strings |