2.6.1 Obtaining Consumer List
This API acquires a list of consumers.
Execution permission
Admin, Modify
API version
v1
Request format
GET http[s]://host:port/Analytics/version/objects/Groups
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 Group objects. For details about Group, 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 |
Group
{
"instanceID":"...",
"name":"...",
"status":"...",
"gradeKey":"...",
"gradeName":"...",
"gradeDisplayOrder":"...",
"description":"...",
"urls":["...", ...],
"urlDisplayNames":["...", ...],
"templateCreatorType":"...",
"vmAutoAssignment":"...",
"applicationAssignFollow":"...",
"numOfVolumes":"...",
"numOfVMs":"...",
"numOfHosts":"...",
"numOfHypervisors":"...",
"numOfApplications":"...",
"vmAutoAssignFilters":["...", ...],
"hostAutoAssignFilters":["...", ...],
"volumeIDs":["...", ...],
"vmIDs":["...", ...],
"hostIDs":["...", ...],
"hypervisorIDs":["...", ...],
"applicationIDs":["...", ...]
}
Group (Type: Group)
|
Attribute |
Type |
Description |
|---|---|---|
|
instanceID |
long |
ID for identifying instances |
|
name |
string |
Consumer name. Use 128 or fewer characters. |
|
status |
enum |
Status of the consumer. (For details about the specifiable values, see the table NodeStatusType in List of enumerators.) The specifiable values are as follows:
|
|
gradeKey |
string |
ID for identifying grades |
|
gradeName |
string |
Grade name |
|
gradeDisplayOrder |
int |
Priority of the grade |
|
description |
string |
Description of the consumer. Use 1000 or fewer characters. |
|
urls |
string[] |
URL |
|
urlDisplayNames |
string[] |
Character string displayed for the URL |
|
templateCreatorType |
enum |
Change type of the consumer. (For details about the specifiable values, see the table TemplateCreatorType in List of enumerators.) The specifiable values are as follows:
|
|
vmAutoAssignment |
boolean |
Set true if you assign a virtual machine under the hypervisor that belong to this Group automatically |
|
applicationAssignFollow |
boolean |
Set true if you assign a application under the resource that belong to this Group automatically |
|
numOfVolumes |
int |
Number of volumes to which the consumer is assigned. |
|
numOfVMs |
int |
Number of virtual machines to which the consumer is assigned. |
|
numOfHosts |
int |
Number of hosts to which the consumer is assigned. |
|
numOfHypervisors |
int |
Number of hypervisors to which the consumer is assigned. |
|
numOfApplications |
int |
Number of applications to which the consumer is assigned. |
|
vmAutoAssignFilters |
string[] |
Name of the automatic assignment rule set for the virtual machines |
|
hostAutoAssignFilters |
string[] |
Name of the automatic assignment rule set for the hosts |
|
volumeIDs |
long[] |
List of IDs identifying volumes allocated to consumers |
|
vmIDs |
long[] |
List of IDs identifying virtual machines allocated to consumers |
|
hostIDs |
long[] |
List of IDs identifying hosts allocated to consumers |
|
hypervisorIDs |
long[] |
List of IDs identifying hypervisors allocated to consumers |
|
applicationIDs |
long[] |
List of IDs identifying applications allocated to consumers |
Status codes
|
Status code |
Reason phrase |
Description |
|---|---|---|
|
200 |
OK |
Success. |
|
400 |
Bad Request |
A query parameter is invalid. |
|
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/Groups 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 3ffa18cbf3e9f46049c06aaf52a1c5444c5e2c3a_WVlGcHsLfg5ffg0I_V0810
X-Frame-Options: SAMEORIGIN
Transfer-Encoding: chunked
Content-Type: application/json
[Response Body]
{
"data" : [ {
"instanceID" : 0,
"name" : "#Unassigned Resources",
"description" : "Resources which have not been assigned to a consumer.",
"templateCreatorType" : "Default",
"numOfVolumes" : 0,
"numOfVMs" : 27,
"numOfHosts" : 0,
"volumeAutoAssignFilters" : [ ],
"vmAutoAssignFilters" : [ ],
"hostAutoAssignFilters" : [ ]
} ],
"count" : 1
}