I-Insight RESTFul API

ver. 3.0.0

Authentication

To authenticate against I-Insight API each request should contain Authorization token.

Authorization: Basic ZGVtbzpkZW1v

Host Search

MethodURL
GET/rest/api/hosts/search?filter=host_hame[&page=n][&pageSize=m]

When the request succeeds, an HTTP 200 response will be returned with a JSON object containing list of hosts matching search request. This method returns paginated output.

Required parameters

Parameter NameParameter TypeDescription
filterstringFull or partial hostname

To navigate through the search results a few optional parameters are available:

Optional parameters

Parameter NameParameter TypeDescription
pageSizeintegernumber of history item per page
pageintegercurrent page (from 0 to value returned in pageNumbers - 1)

Output parameters

Parameter NameParameter TypeDescription
itemNumbersintegertotal number of updates for the hostname in the search
pageintegercurrent page
pageNumbersintegernumber of pages
pageSizeintegerpage size
sItemslista list of host found matching the hostname string
id integerid of the host in the database
namestringhostname of the host
buildstringOS build information
cpuNumberintegernumber of CPUs
dnsNamestringDNS domain name
hardwarestringhardware type
kernelstringOS current kernel version
memoryInKbintegeramount of Memory in Kb
osstringOS name
osTypestringOS grouped by type. E.g Linux, Windows, etct
osVersionstringOS versions
serialNumberstringhosts serial number
uptimestringtime since last reboot
curl http://localhost:8080/insight/rest/api/hosts/search?filter=vpn \
		--header "Authorization: Basic ZGVtbzpkZW1v" 
						
{
  "itemNumbers": 3,
  "page": 0,
  "pageNumbers": 1,
  "pageSize": 15,
  "sItems": [{
	"checked":false,
	"id":4005,
	"name":"vpn0",
	"cpuNumber":1,
	"dnsName":"threeisquared.com",
	"hardware":"HVM domU",
	"memoryInKb":0,
	"os":"Linux CentOS Linux 7",
	"uptime":"39 days"}  
}]
}
						

Host summary information

MethodURL
GET/rest/api/hosts/{id}

When the request succeeds, an HTTP 200 response will be returned with a JSON object containing information about host configuration.

Required parameters

Parameter NameParameter TypeDescription
idintegerThe id of the host in the database and NOT the hosts hostid

Output parameters

Parameter NameParameter TypeDescription
id integerid of the host in the database
namestringhostname of the host
buildstringOS build information
cpuNumberintegernumber of CPUs
dnsNamestringDNS domain name
hardwarestringhardware type
kernelstringOS current kernel version
memoryInKbintegeramount of Memory in Kb
osstringOS name
osTypestringOS grouped by type. E.g Linux, Windows, etct
osVersionstringOS versions
serialNumberstringhosts serial number
uptimestringtime since last reboot
curl http://localhost:8080/insight/rest/api/hosts/6 \
	--header "Authorization: Basic ZGVtbzpkZW1v" 
						
{
  "id": 6,
  "name": "jenkins00",
  "build": "#1 SMP Tue Dec 6 23:06:41 UTC 2016",
  "cpuNumber": 2,
  "dnsName": "threeisquared.com",
  "hardware": "HVM domU",
  "kernel": "3.10.0-514.2.2.el7.x86_64",
  "memoryInKb": 7747276,
  "os": "Linux",
  "osType": "Linux",
  "osVersion": "CentOS Linux 7",
  "serialNumber": "d3e54946-b95e-3185-c338-7f885a68f665",
  "uptime": "33 days"
}
						

Host storage information

MethodURL
GET/rest/api/hosts/{id}/storage

When the request succeeds, an HTTP 200 response will be returned with a JSON object containing information about host storage configuration.

Required parameters

Parameter NameParameter TypeDescription
idintegerThe id of the host in the database and NOT the hosts hostid

Output parameters

Parameter NameParameter TypeDescription
hbaslista list of hbas installed in the host
serialstringserial number of the hba
wwnstringwwn of the hba
lunslista list of luns or physical devices visible to the host
capacityInKbintegersize of the lun
devicestringOS path to the lun
serialstringserial number of the device
mountPointslista list of filesystem mountpoints on the host
availableInKbintegeravailable filesystem space in Kb
devicestringdevice path to the filesystem
fsTypestringfilesystem type
namestringfilesystem mountpoint
sizeInKbintegersize of the filesystem in Kb
volumeslista list of logical volumes on the host
namestringname of the logical volume
sizeInKbintegersize of the volume in Kb
statestringstate of the logical volume
curl http://localhost:8080/insight/rest/api/hosts/6/storage \
	--header "Authorization: Basic ZGVtbzpkZW1v"
						
{
  "hbas": [{
    "serial":"BT83607873",
    "wwwn":"20000000D45B62F8"},
   {"serial":"BT83607614",
    "wwwn":"20000000D45B6152"
  }],
  "luns": [{
    "capacityInKb": 33554432,
    "device": "xvda",
    "serial": ""
  }],
  "mountPoints":[{
    "availableInKb": 258792,
    "device": "/dev/xvda1",
    "fsType": "xfs",
    "name": "/boot",
    "sizeInKb": 508588
  }],
  "volumes":[{
    "name": "root",
    "sizeInKb": 29643243,
    "state": "available"
  }]
}
						

Host network configuration

MethodURL
GET/rest/api/hosts/{id}/network

When the request succeeds, an HTTP 200 response will be returned with a JSON object containing information about host network configuration.

Output parameters

Parameter NameParameter TypeDescription
listenerslista list of listeners running on the host
counterintegernumber of open connections
localHoststringlocal host host
localIpstringlocal host IP
localPortstringlocal host port
protocolstringlistener protocol
remoteIpstringremote host IP
remotePortstringremote host name
statusstringlistener status
typestringtype of the listener. E.g. IN, OUT
nicslista list of NIC configured on the host
ipslista list of IP found on the host
addressstringIP address
broadcaststringIP broadcast
netmaskstringIP net mask
macAddressstringMAC address of the NIC
namestringname of network interface
curl http://localhost:8080/insight/rest/api/hosts/6/network \
	--header "Authorization: Basic ZGVtbzpkZW1v"
						
{
  "listeners":[{
    "counter": 1,
    "localHost": "jenkins00",
    "localIp": "10.123.45.8",
    "localPort": "",
    "protocol": "udp",
    "remoteIp": "129.250.35.251",
    "remotePort": "123",
    "status": "", 
    "type": "OUT"
  }],
  "nics":[{
    "ips":[{
      "address": "10.123.45.8",
      "broadcast": "10.123.45.255",
      "netmask": "255.255.255.0"
    },{
      "address": "fe80:0:0:0:301b:70ff:fe5a:a9be",
      "broadcast": "",
      "netmask": ""
    }],
    "macAddress": "32:1b:70:5a:a9:be",
    "name": "eth0"
  }]
}
						

Host update history

MethodURL
GET/rest/api/hosts/{id}/history[?page=n][&pageSize=m][&attr=a][&date=d][&filter=t]

When the request succeeds, an HTTP 200 response will be returned with a JSON object containing information about host update history.

Required parameters

Parameter NameParameter TypeDescription
idintegerThe id of the host in the database and NOT the hosts hostid

This method returns paginated output. To navigate through the search results a few optional parameters are available:

Optional parameters

Parameter NameParameter TypeDescription
pageintegercurrent page (from 0 to value returned in pageNumbers - 1)
pageSizeintegernumber of history item per page
attrstringhistory attribute
datestringdate in 'yyyy-MM-dd' format
filterstringspecific text to search for

Output parameters

Parameter NameParameter TypeDescription
itemNumbersintegertotal number of updates for the hostname in the search
pageintegercurrent page
pageNumbersintegernumber of pages
pageSizeintegerpage size
hItemslista list of host history updates
namestringhistory attribute name
newValuestringnew value
oldValuestringold value
personstringname of the user who made the update
updatedstringdate and time of the update
curl http://localhost:8080/insight/rest/api/hosts/6/history \
	--header "Authorization: Basic ZGVtbzpkZW1v"
						
{
  "hItems":[{
    "name": "HOST MEMORY", 
    "newValue": "7.39 GB",
    "oldValue": "0 kB",
    "person":"System",
    "updated":"Thu Jan 26 00:00:37 GMT 2017"
  },{
    "name": "HOST CPU NUMBER",
    "newValue": "2",
    "oldValue": "0",
    "person": "System",
    "updated": "Thu Jan 26 00:00:37 GMT 2017"
  },{
    "name": "HOST SERIAL",
    "newValue": "d3e54946-b95e-3185-c338-7f885a68f665",
    "oldValue": "-",
    "person": "System",
    "updated": "Thu Jan 26 00:00:37 GMT 2017"
  }],
  "itemNumbers": 669,
  "page": 0,
  "pageNumbers": 45,
  "pageSize": 15
}
						

Check results for the host

MethodURL
GET/rest/api/hosts/{id}/checkResults

When the request succeeds, an HTTP 200 response will be returned with a JSON object containing information about host check results.

Required parameters

Parameter NameParameter TypeDescription
idintegerThe id of the host in the database and NOT the hosts hostid

Output parameters

Parameter NameParameter TypeDescription
datestringdate and time when check ran
descriptionstringcheck result description
resultstringresult of the check. E.g. FAIL, PASS, UNKNOWN, NA or ERROR
typestringtype of the check
curl http://localhost:8080/insight/rest/api/hosts/6/checkResults \
	--header "Authorization: Basic ZGVtbzpkZW1v"
						
[{
  "date": "2017-02-08T04:37:12Z",
  "description": "There is no server data available (/usr/sbin/vxdisk list)",
  "result": "UNKNOWN",
  "type": "VxVM Disks Failing"
}, {
  "date": "2017-02-08T04:37:13Z",
  "description": "The host has 2 accounts with UID = 0: root, marktst",
  "result": "FAIL",
  "type": "UID 0 exists only once"
}, {
  "date": "2017-02-08T04:37:13Z",
  "description": "System account group membership complies with template",
  "result": "PASS",
  "type": "Privileged System Groups"
}]
						

Hosts which do not belong to any host group

MethodURL
GET/rest/api/hosts/notInGroup

When the request succeeds, an HTTP 200 response will be returned with a JSON object containing list of hosts which do not belong to any host groups.

Output parameters

Parameter NameParameter TypeDescription
id integerid of the host in the database
namestringhostname of the host
buildstringOS build information
cpuNumberintegernumber of CPUs
dnsNamestringDNS domain name
hardwarestringhardware type
kernelstringOS current kernel version
memoryInKbintegeramount of Memory in Kb
osstringOS name
osTypestringOS grouped by type. E.g Linux, Windows, etct
osVersionstringOS versions
serialNumberstringhosts serial number
uptimestringtime since last reboot
curl http://localhost:8080/insight/rest/api/hosts/notInGroup \
	--header "Authorization: Basic ZGVtbzpkZW1v"
						
[{
  "id": 11, 
  "name": "purgatory",
  "build": "generic",
  "cpuNumber": 2,
  "dnsName": "threeisquared.com",
  "hardware": "HVM domU",
  "kernel": "Generic_150401-41",
  "memoryInKb": 2093056,
  "os": "SunOS",
  "osType": "Solaris",
  "osVersion": "5.10",
  "serialNumber": "b66ad852-b218-b773-9195-df8c57a2f8ee",
  "uptime": "90 days"
}]
						

Hosts for which there was no raw data

MethodURL
GET/rest/api/hosts/noData[?date=d]

When the request succeeds, an HTTP 200 response will be returned with a JSON object containing list of hosts which do not have raw data available.

Optional parameters

Parameter NameParameter TypeDescription
datestringdate in 'yyyy-MM-dd' format

Output parameters

Parameter NameParameter TypeDescription
id integerid of the host in the database
namestringhostname of the host
buildstringOS build information
cpuNumberintegernumber of CPUs
dnsNamestringDNS domain name
hardwarestringhardware type
kernelstringOS current kernel version
memoryInKbintegeramount of Memory in Kb
osstringOS name
osTypestringOS grouped by type. E.g Linux, Windows, etct
osVersionstringOS versions
serialNumberstringhosts serial number
uptimestringtime since last reboot
curl http://localhost:8080/insight/rest/api/hosts/noData \
	--header "Authorization: Basic ZGVtbzpkZW1v"
						
[{
  "id": 11,
  "name": "purgatory",
  "build": "generic",
  "cpuNumber": 0,
  "dnsName": "threeisquared.com",
  "hardware": "generic",
  "memoryInKb": 0,
  "osType": "generic",
  "osVersion": "generic"
}]
						

List of application

MethodURL
GET/rest/api/applications

When the request succeeds, an HTTP 200 response will be returned with a JSON object containing a list of applications.

Output parameters

Parameter NameParameter TypeDescription
id integerid of the host in the database
namestringhostname of the host
curl http://localhost:8080/insight/rest/api/applications \
		--header "Authorization: Basic ZGVtbzpkZW1v"
						
[{
  "id": 1,
  "name": "Cash Application-UK"
},{
  "id": 2, 
  "name": "Cash Application-US"
},{
  "id": 3,
  "name": "Service Application"
},{
  "id": 4,
  "name": "Database"
},{
  "id": 8,
  "name": "JIMS-Global Application"
},{
  "id": 9,
  "name": "Global Application"
},{
  "id": 10,
  "name": "Production Application"
}]
						

Hosts aligned to a particular application

MethodURL
GET/rest/api/applications/{id}/hosts

When the request succeeds, an HTTP 200 response will be returned with a JSON object containing information about hosts aligned to the application.

Required parameters

Parameter NameParameter TypeDescription
idintegerThe id of the application in the database

Output parameters

Parameter NameParameter TypeDescription
id integerid of the host in the database
namestringhostname of the host
curl http://localhost:8080/insight/rest/api/applications/8/hosts \
		--header "Authorization: Basic ZGVtbzpkZW1v"
						
[{
  "id": 30,
  "name": "demoxsolp5",
  "build": "generic",
  "cpuNumber": 2,
  "dnsName": "threeisquared.com",
  "hardware": "generic",
  "kernel": "Generic_144489-06",
  "memoryInKb": 100653056,
  "os": "SunOS",
  "osType": "Solaris",
  "osVersion": "5.10",
  "uptime": "194 days"
},{
  "id": 31,
  "name": "demoxsolp6",
  "build": "generic",
  "cpuNumber": 4,
  "dnsName": "threeisquared.com",
  "hardware": "generic",
  "kernel": "Generic_142901-12",
  "memoryInKb": 268435456,
  "os": "SunOS",
  "osType": "Solaris",
  "osVersion": "5.10",
  "uptime": "197 days"
 }]