2.18.1 Obtaining Host List
The API acquires a list of hosts.
Execution permission
Admin, Modify
API version
v1
Request format
GET http[s]://host:port/Analytics/version/objects/Hosts
Request body
Not applicable.
Response body
The structure of the response body and the object attributes are as follows:{ "data":[{ "instanceID":"...", "name":"...", "ipAddress":"...", "osType":"...", "status":"...", "monitorStatus":"...", "description":"...", "vmName":"...", "usedCredentialID":"...", "usedCredentials":"...", "thresholdProfileID":"...", "thresholdProfileName":"...", "originalThresholdProfileID":"...", "groupIDs":["...", ...], "groupNames":["...", ...], "gradeNames":["...", ...], "gradeOrders":["...", ...], "deviceClassificationLabel":"...", "accessPointType":"...", "accessPointSnmpVersion":"...", "accessPointIpAddress":"...", "accessPointUser":"...", "pluginId":"...", "creatorType":"..." }, : ], "pagination":{ "page":"...", "pageSize":"...", "numPages":"...", "totalCount":"..." }, "count":"..." }
Collections (Type: Collections)
Attribute |
Type |
Description |
---|---|---|
data |
Host[] |
A list of Host objects. For details about Host, see the table below. |
pagination |
Pagination |
Page information. This parameter is displayed only when the relevant resource exists. |
count |
int |
Number of data items that meet the conditions. |
data (Type: Host)
Attribute |
Type |
Description |
---|---|---|
instanceID |
long |
ID for identifying instances |
name |
string |
Name of the host |
ipAddress |
string |
IP address of the host |
osType |
string |
OS type of the host. The following the value can be specified. ・SERVER_WINDOWS: The OS is Windows. ・SERVER_LINUX: The OS is Linux. ・SERVER_SOLARIS: The OS is Solaris. ・SERVER_HPUX: The OS is HP-UX. ・SERVER_AIX: The OS is AIX. ・GENERIC_COMPUTER: This is a host for which information is collected by a plug-in. ・UNKNOWN: A host about which information is collected as an alive-monitoring target, or a host that is an SNMP trap-notification source registered as a management target. |
status |
enum |
Status of the host (For details about the specifiable values, see the table NodeStatusType in List of enumerators.) The specifiable values are as follows:
|
monitorStatus |
enum |
Monitoring status of the host. (For details about the specifiable values, see the table ManagementLevelType in List of enumerators.) The specifiable values are as follows:
|
description |
string |
Detailed information about the host |
vmName |
string |
Name of the virtual machine if the host is running on a virtual machine |
usedCredentialID |
long |
ID for identifying authentication information used for detection |
usedCredentials |
string |
Name of authentication information used for detection |
thresholdProfileID |
long |
ID of the threshold profile assigned to the host |
thresholdProfileName |
string |
Name of the threshold profile assigned to the host |
originalThresholdProfileID |
string |
Original threshold profile ID of the threshold profile assigned to the host |
groupIDs |
long[] |
ID of the consumer assigned to the host |
groupNames |
string[] |
Name of the consumer assigned to the host |
gradeNames |
string[] |
Name of the grade of the consumer assigned to the host |
gradeOrders |
integer[] |
Priority of the grade of the consumer assigned to the host |
deviceClassificationLabel |
string |
Name of the classification label assigned to the host |
accessPointType |
enum |
Type of authentication information used for detection. (For details about the specifiable values, see the table ProtocolType in List of enumerators.) The specifiable values are as follows:
|
accessPointSnmpVersion |
enum |
SNMP version of credential (For details about the specifiable values, see the table SnmpVersion in List of enumerators.) The specifiable values are as follows:
|
accessPointIpAddress |
string |
IP address used for connections to monitoring targets |
accessPointUser |
string |
User ID used for connections to monitoring targets |
pluginId |
string |
ID for the plug-in applied to the host. |
creatorType |
enum |
The type of creator that added the host as a monitoring target. This member is enabled only if osType is UNKNOWN. (For details about the specifiable values, see the table NodeCreatorType in List of enumerators.) The specifiable values are as follows:
|
pagination (Type: Pagination)
Attribute |
Type |
Description |
---|---|---|
page |
integer |
page |
pageSize |
integer |
Size of the pages |
numPages |
integer |
Number of the pages |
totalCount |
integer |
Number of the objects |
Status codes
Status code |
Reason phrase |
Description |
---|---|---|
200 |
OK |
Success. |
401 |
Unauthorized |
No login privilege. |
403 |
Forbidden |
No reference privilege. |
412 |
Precondition Failed |
The server is not available. |
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header] GET /Analytics/v1/objects/Hosts HTTP/1.1 Authorization: Basic c3lzdGVtOm1hbmFnZXI= User-Agent: curl/7.33.0 Host: localhost:22015 Accept: application/json Accept-Language: ja [Response Header] HTTP/1.1 200 OK Date: Fri, 27 Nov 2015 07:11:36 GMT Server: Cosminexus HTTP Server Cache-Control: no-cache WWW-Authenticate: HSSO 87d94e387ca516a82287ff4254ddac7f44e18bd4_WVlGcHsLfg5ffg0I_V0810 X-Frame-Options: SAMEORIGIN Transfer-Encoding: chunked Content-Type: application/json [Response Body] { "data" : [ { "instanceID" : 8, "name" : "fuji", "ipAddress" : "10.197.87.43", "osType" : "SERVER_LINUX", "status" : "Unknown", "monitorStatus" : "Manage", "description" : "XXXX YYYY/ZZ Linux Server", "usedCredentialID" : 17, "usedCredentials" : "10.197.87.43", "thresholdProfileID" : 4, "thresholdProfileName" : "Default Profile for Linux/UNIX", "groupIDs" : [ 0 ], "groupNames" : [ "#Unassigned Resources" ], "gradeNames" : [ "" ], "gradeOrders" : [ -1 ], "deviceClassificationLabel":"Linux Development Env", "accessPointType" : "SSH", "accessPointIpAddress" : "10.197.87.43", "accessPointUser" : "root" }, { "instanceID" : 1, "name" : "10.197.199.44", "ipAddress" : "10.197.199.44", "osType" : "UNKNOWN", "status" : "NotMonitored", "monitorStatus" : "MonitorOff", "description" : "", "groupIDs" : [ 0 ], "groupNames" : [ "#Unassigned Resources" ], "gradeNames" : [ "" ], "gradeOrders" : [ -1 ], "deviceClassificationLabel" : "RPA system", "accessPointIpAddress" : "10.197.199.44", "creatorType" : "Discovery" } ], "count" : 2 }