ON PREMISES SOLUTIONS

getNetworkInventoryItems

This method returns network inventory items.

Services

This method requires you to place the {service} name in the API URL. The allowed services are:

  • computers, for "Computers and Virtual Machines"

  • virtualmachines, for "Virtual Machines"

For example, the request URL for the virtual machines service is:

https://YOUR-HOSTNAME/api/v1.0/jsonrpc/network/virtualmachines

Parameters

Parameter

Type

Optional

Description

parentId

String

Yes

The ID of the target company or group. If not specified, the method returns items that are in the targets of the company linked to the API key.

filters

Object

Yes

The filters to be used when querying the endpoints list. For information regarding the available filters and how to use them, refer to Available Filters.

viewType

Number

Yes

The ID of the view type. Each virtualization platform displays the inventory in specific views. In VMWare integrations, the available options are:

  • 1 - Hosts and Clusters view (default)

  • 2 - Virtual Machines view.

In Citrix XenServer integrations, the available options are:

  • 3 - Server view (default)

  • 4 - Folder view.

page

Number

Yes

The results page number. Default page number is 1.

perPage

Number

Yes

Number of items per page to be returned. The upper limit is 100 items per page. Default value: 30 items per page.

Available filters

Section

Subsection

Filtering Options

type

  • groups - a Boolean to filter all custom groups of endpoints. Default value: False.

    This filter is available for computers service.

  • computers - a Boolean to filter all computers. Default value: False.

    This filter is available for computers service.

  • virtualMachines - a Boolean to filter all virtual machines. Default value: False.

    This filter is available for computers and virtualmachines services.

  • clusters - a Boolean to filter all Virtualization Clusters. Default value: False.

    This filter is available for virtualmachines service.

  • hosts - a Boolean to filter all Virtualization Hosts. Default value: False.

    This filter is available for virtualmachines service.

  • dataCenters - a Boolean to filter all Datacenters. Default value: False.

    This filter is available for virtualmachines service.

  • vApps - a Boolean to filter all vShield Apps. Default value: False.

    This filter is available for virtualmachines service.

  • resourcePools - a Boolean to filter all Resource Pools. Default value: False.

    This filter is available for virtualmachines service.

  • folders - a Boolean to filter all Virtualization Folders. Default value: False.

    This filter is available for virtualmachines service.

  • pools - a Boolean to filter all Virtualization Pools. Default value: False.

    This filter is available for virtualmachines service.

security

management

  • managedWithBest - a Boolean to filter all endpoints with the security agent installed on them. Default value: False.

    This filter is available for computers and virtualmachines services.

  • isContainerHost - a Boolean to filter all endpoints with container host protection installed on them. Default value: False.

    This filter is available for computers and virtualmachines services.

  • managedExchangeServers - a Boolean to filter all protected Exchange servers. Default value: False.

    This filter is available for computers and virtualmachines services.

    This filter requires a valid license key that covers the security service.

  • managedRelays - a Boolean to filter all endpoints with Relay role. Default value: False.

    This filter is available for computers and virtualmachines services.

  • securityServers - a Boolean to filter all Security Servers. Default value: False.

    This filter is available for computers and virtualmachines services.

  • managedWithNsx - a Boolean to filter protected endpoints in VMware NSX data centers. Default value: False.

    This filter is available for virtualmachines service.

    This filter requires a valid virtualization license key.

  • managedWithVShield - a Boolean to filter protected endpoints in VMware vShield environments. Default value: False.

    This filter is available for virtualmachines service.

    This filter requires a valid virtualization license key.

  • managedWithHvi - a Boolean to filter all endpoints managed by HVI. Default value: False.

    This filter is available for computers and virtualmachines services.

    This filter requires a valid HVI license key.

depth

  • allItemsRecursively - a Boolean to filter all endpoints recursively within the Network Inventory of a company. Default value: False.

details

  • ssid - string, the SSID (Active Directory SID of the endpoint) used to filter the endpoints regardless of their protection status.

  • macs - array, the list of MAC addresses used to filter the endpoints regardless of their protection status.

  • name - a String for filtering the items by name. Minimum required string length is three characters.

Important

Some filters require a specific license to be active, otherwise they are ignored, resulting in an inaccurate API response.

The field name works with partial matching.

The filter returns the items whose names are exact match or start with the specified value. To use the specified value as a suffix, use the asterisk symbol (*).

For example:

If name is computer, the API returns all items whose names start with computer.

If name is *puter, then the API returns a list of all items that contain puter in their names.

Return value

This method returns an Object containing information about the network items. The returned object contains:

  • page - the current page

  • pagesCount - the total number of pages

  • perPage - the total number of items returned per page

  • total - the total number of items

  • items - an array containing the list of items. Each entry in the list has the following fields:

    • id, the ID of the network item,

    • name, the name of the network item,

    • parentId, the ID of the parent container,

    • type, the type of network item: 1 - Company, 2 - Root Container (Companies and Network containers), 3 - Company Folder, 4 - Group, 5 - Computer, 6 - Virtual Machine, 7 - EC2 Instance, 14 - Containers Group, 15 - Container Host Folder, 16 - Container.

    • details, more information about the item. This field is available for 1 - Companies, 5 - Computers, 6 - Virtual Machines, 7 - EC2 Instances and 16 - Containers. For information regarding the content of the details member please refer to The details member.

The details member

Some network inventory items contain a details member. This member exposes more information regarding the item. The information depends on the item type.

Item type

Details

5(computer) and 6(virtual machine)

  • label, the label set to the endpoint

  • fqdn, the FQDN of the endpoint

  • groupId, the group ID of the endpoint

  • isManaged, boolean True, if this endpoint is managed

  • machineType, the type of the machine: (1 - computer, 2 - virtual machine, 0 - Other)

  • operatingSystemVersion, the OS version of the endpoint

  • ip, the IP address of the endpoint

  • macs, the list of MAC addresses of the endpoint

  • ssid, the Active Directory SID of the endpoint

  • managedWithBest, boolean True, if BEST is installed on this endpoint

  • isContainerHost, boolean True, if this endpoint is a Container Host

  • managedExchangeServer, boolean True, if this endpoint is an Exchange Server

  • managedRelay, boolean True, if this endpoint has Relay role

  • securityServer, boolean True, if this endpoint is a Security Server

  • managedWithNsx, boolean True, if this is an endpoint from a VMware NSX data center

  • managedWithVShield, boolean True, if this is an endpoint from a VMware vShield environment

  • managedWithHvi, boolean True, if this endpoint is managed by HVI

Example

Request:

  {
       "params": {
           "parentId": "23b19c39b1a43d89367b32ce",
           "page": 2,
           "perPage": 1,
           "filters": {
               "type": {
                   "computers": true
               },
               "depth": {
                   "allItemsRecursively": true
               }
           },
           "options": {
               "companies": {
                   "returnAllProducts": true
               }
           }
       },
       "jsonrpc": "2.0",
       "method": "getNetworkInventoryItems",
       "id": "301f7b05-ec02-481b-9ed6-c07b97de2b7b"
  }  

Response:

  {
      "id":"103d7b05-ec02-481b-9ed6-c07b97de2b7a",
      "jsonrpc":"2.0",
      "result": {
           page: 2,
           pagesCount: 11,
           perPage: 1,
           total: 11
           items[
               {
                   "id" : "21a295eeb1a43d8b497b24b7",
                   "name" : "Computer",
                   "type" : 5,
                   "parentId": "21a295eeb1a43d8b497b24b7",
                   "companyId": "21a295eeb1a43d8b497b24b7",
                   "details" : {
                       "label" : "endpoint 2",
                       "fqdn": "endpoint2.local",
                       "groupId": "5a5f4d36b1a43d5f097b23bb",
                       "isManaged": true,
                       "machineType": 2,
                       "operatingSystemVersion": "Windows Server",
                       "ip": "60.40.10.220",
                       "macs": [
                            "324935237346"
                       ],
                       "ssid": "",
                   }
               }
           ]
      }
  }  
  {
       "id": "301f7b05-ec02-481b-9ed6-c07b97de2b7b",
       "jsonrpc": "2.0",
       "result": {
           "total": 3,
           "page": 1,
           "perPage": 30,
           "pagesCount": 1,
           "items": [
               {
                   "id": "615ac2346e25a86d3c06c932",
                   "name": "test-customer-1",
                   "type": 1,
                   "parentId": "61430ad8d953fb02806ebd16",
                   "companyId": "61430ad8d953fb02806ebd12",
                   "details": {
                   "type": 0,
                   "address": "",
                   "phone": "",
                   "canBeManagedByAbove": true,
                   "enforce2FA": false,
                   "isSuspended": false,
                   "createdAt": "2021-10-04T11:58:28",
                   "country": "AF",
                   "state": "N/A",
                   "licenseInfo": {
                       "subscriptionType": 2,
                       "isAddon": false,
                       "expiryDate": "2023-03-19T17:21:50",
                       "usedSlots": 0,
                       "totalSlots": 50,
                       "licenseKey": "ARS4THG",
                       "additionalLicenses": [
                           {
                               "isAddon": false,
                               "expiryDate": "2023-03-19T17:21:50",
                               "usedSlots": 0,
                               "totalSlots": 50,
                               "licenseKey": "IDTGNIV"
                           },
                           {
                               "isAddon": false,
                               "expiryDate": "2024-05-19T17:21:50"
                               "usedSlots": 0,
                               "totalSlots": 50
                               "licenseKey": "6AZJ5EL",
                           }
                       ]
                   }
               }
           ]
       }
  }