Introduction
The REST API allows users to query the iQSonar results directly using the web client protocol. The results are returned in JSON format. The long-term plan is that Datahub will be deprecated and eventually retired, and development of third party applications which rely on data from iQSonar will use the RestAPI.
This worked example uses PowerShell to produce a CSV file containing details of devices directly from the scan results. A shorter version of this project can be found here. This longer example replicates the result of the DataHub Summary_V1.devices view as closely as possible. Note that DataHub does perform some data normalization tasks (for example on the Operating System name/version/edition). As this is a tutorial example, this normalization is left as an exercise for the reader.
This tutorial article is written to describe the Rest API as implemented in the Elcano R3 release (January 2018)
DataHub Summary_v1.Devices table
The DataHub Summary_v1.Devices table contains the following columns:
Column | Description |
---|---|
DeviceID | Unique identifier |
Product | Type of device (e.g. Unix, Windows, SNMP) |
Hostname | The host name for the device |
DNSHostname | The FQDN for the device if available |
DeviceIsVirtualized | Is this a virtual machine |
VirtualizationMethod | Virtualization Technology used |
PhysicalDeviceID | Device ID for host if this is a VM |
PhysicalHostname | Hostname for host if this is a VM |
Operating System Name | The name of the O/S which is used on the |
Operating System Version | Which version of the OS |
Operating System Edition | Standard, Enterprise etc |
Operating System Release | Release no or build |
Operating System InstallDate | Date the OS was installed |
BiosName | The Device instance’s BIOS Name e.g. ‘PhoenixBIOS 4.0 Release 6.0’ (if it isknown) |
BiosVersion | Version number for the BIOS if known |
BiosVendor | Manufacturer of the BIOS |
DeviceSerialNumber | Device serial number |
DeviceVendor | Manufacturer of the device |
DeviceModel | Model for the device |
ProcessorCount | How many CPUs |
ProcessorCoresPerProcessor | How many Cores per CPU |
MotherboardProcessorSocketCount | Number of CPU sockets on motherboard (Not available in Rest API) |
TotalMemory | Total memory for device (Not available in Rest API) |
OS Reported Memory | Memory reported by the OS |
ScanStatus | Scan status for this device (Not available in Rest API) |
LastSeenDate | Date this device was last scanned |
There are a small number of these columns we will not be able to populate in this example because the Rest API does not expose that information.