2.8.1 Obtaining Virtual Machine List
This API acquires a list of virtual machines.
Execution permission
Admin, Modify
API version
v1
Request format
GET http[s]://host:port/Analytics/version/objects/VirtualMachines
Request body
Not applicable.
Response body
The structure of the response body and the object attributes are as follows:Collections
{ "data":["...", ...], "pagination":{ "page":"...", "pageSize":"...", "numPages":"...", "totalCount":"..." }, "count":"..." }
Collections (Type: Collections)
Attribute |
Type |
Description |
---|---|---|
data |
anyType[] |
A list of VirtualMachine objects. For details about VirtualMachine, 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. |
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 |
VirtualMachine
{ "instanceID":"...", "name":"...", "ipAddress":"...", "status":"...", "monitorStatus":"...", "description":"...", "collectorID":"...", "collectorName":"...", "autoCollectionType":"...", "clusterName":"...", "hypervisorType":"...", "hypervisorID":"...", "hypervisorName":"...", "hypervisorMonitorStatus":"...", "hostName":"...", "thresholdProfileID":"...", "thresholdProfileName":"...", "groupIDs":["...", ...], "groupNames":["...", ...], "gradeNames":["...", ...], "gradeOrders":["...", ...], "usedCredentialID":"...", "usedCredentials":"...", "accessPointType":"...", "accessPointIpAddress":"...", "accessPointUser":"..." }
VirtualMachine (Type: VirtualMachine)
Attribute |
Type |
Description |
---|---|---|
instanceID |
long |
ID of the virtual machine |
name |
string |
Name of the virtual machine |
ipAddress |
string |
IP Address set for the virtual machine |
status |
enum |
Status of the virtual machine (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 virtual machine (For details about the specifiable values, see the table ComponentMonitorType in List of enumerators.) The specifiable values are as follows:
|
description |
string |
Detailed information about the virtual machine |
collectorID |
long |
ID for identifying a collector used for detection |
collectorName |
string |
Name of a collector used for detection |
autoCollectionType |
enum |
Settings for periodic executions of the collector. (For details about the specifiable values, see the table ConnectType in List of enumerators.) The specifiable values are as follows:
|
clusterName |
string |
Name of the Cluster that the virtual machine belongs to |
hypervisorType |
enum |
Type of hypervisor that the virtual machine belongs to (For details about the specifiable values, see the table ArgusNodeType in List of enumerators.) The specifiable values are as follows:
|
hypervisorID |
long |
ID of the hypervisor that the virtual machine belongs to |
hypervisorName |
string |
Name of the hypervisor that the virtual machine belongs to |
hypervisorMonitorStatus |
enum |
Monitoring status of the hypervisor that the virtual machine belongs to (For details about the specifiable values, see the table ManagementLevelType in List of enumerators.) The specifiable values are as follows:
|
hostName |
string |
The name of host whitch is installed on virtual machine |
thresholdProfileID |
long |
ID of the threshold profile assigned to the virtual machine |
thresholdProfileName |
string |
Name of the threshold profile assigned to the virtual machine |
groupIDs |
long[] |
ID of the consumer assigned to the virtual machine |
groupNames |
string[] |
Name of the consumer assigned to the virtual machine |
gradeNames |
string[] |
ID of the grade of the consumer assigned to the virtual machine |
gradeOrders |
integer[] |
Priority of the grade of the consumer assigned to the virtual machine |
usedCredentialID |
long |
ID for identifying authentication information used for detection |
usedCredentials |
string |
Name of authentication information used for detection |
accessPointType |
enum |
Type of the protocol or collector for 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:
|
accessPointIpAddress |
string |
IP address or host name used for connections to monitoring targets or management software |
accessPointUser |
string |
User ID used for connections to monitoring targets or management software |
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/VirtualMachines 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 05:21:50 GMT Server: Cosminexus HTTP Server Cache-Control: no-cache WWW-Authenticate: HSSO 7ca86aa5a44eb9b1c86c97c990674963cf98534d_WVlGcHsLfg5ffg0I_V0810 X-Frame-Options: SAMEORIGIN Transfer-Encoding: chunked Content-Type: application/json [Response Body] { "data" : [ { "instanceID" : 31, "name" : "vm017182", "ipAddress" : "172.17.17.182", "status" : "Normal", "monitorStatus" : "InUse", "description" : "vm017182 : 564d326f-e63b-1ec9-2cf0-7d1ae7755abe", "collectorID" : 0, "collectorName" : "172.17.17.115", "autoCollectionType" : "AutoConnect", "hypervisorType" : "SERVER_ESX", "hypervisorID" : 1, "hypervisorName" : "172.17.17.181", "hypervisorMonitorStatus" : "Manage", "hostName" : "vm017182", "thresholdProfileID" : 19, "thresholdProfileName" : "Default Profile for VM", "groupIDs" : [ 0 ], "groupNames" : [ "#Unassigned Resources" ], "gradeNames" : [ "" ], "gradeOrders" : [ -1 ], "accessPointType" : "VCENTER", "accessPointIpAddress" : "172.17.17.115", "accessPointUser" : "Administrator" } ], "count" : 11 }