Target Audience:
This series of articles is aimed at customers who administer iQSonar version 4 installations. The examples will be based on duplicating results which were available as database views / reports available in the version 3 of iQSonar, but using the V4 RestAPI to derive the information. Users should be familiar with PowerShell. The outputs of these scripts will be saved as CSV files. In a customer environment it might be expected to export data selected directly to another database or reporting tool rather than using CSV as an intermediate transfer format.
For these worked examples, we will use PowerShell scripting tools, as PowerShell is installed as part of Windows Server 2012 and Windows Server 2016 without any additional prerequisites or requirements other than the base operating system. It should be noted that other scripting languages or even compiled languages can also be used to interact with the RestAPI. In the introductory RestAPI series, some of the worked examples are given in PHP and Python as well as in PowerShell.
Pre-requisites:
In order to use these scripts in your environment, you will need
- An instance of iQSonar v4 with the RestAPI integration installed. (This is installed by default, but can be turned off)
- An iQSonar user with permission to access the RestAPI, and the password for this user.
- A windows computer on which you have permission to run PowerShell, and for some of the examples, the facility to install additional PowerShell modules from Microsoft. The PowerShell scripts can be run from the server or from your workstation (Windows 7, Windows 8 and Windows 10 should all work).
Worked Examples
OutputDevices - the OutputDevices report in V3 of iQSonar returns core information on all scanned devices and the associated virtualization information.