Hitachi

JP1 Version 12 JP1/Operations Analytics REST API Reference Guide


2.10.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:
{
        "data":[{
            "instanceID":"...",
            "name":"...",
            "status":"...",
            "gradeKey":"...",
            "gradeName":"...",
            "gradeDisplayOrder":"...",
            "description":"...",
            "urls":["...", ...],
            "urlDisplayNames":["...", ...],
            "templateCreatorType":"...",
            "vmAutoAssignment":"...",
            "applicationAssignFollow":"...",
            "numOfVolumes":"...",
            "numOfVMs":"...",
            "numOfHosts":"...",
            "numOfHypervisors":"...",
            "numOfApplications":"...",
            "numOfPods":"...",
            "numOfInstances":"...",
            "vmAutoAssignFilters":["...", ...],
            "hostAutoAssignFilters":["...", ...],
            "podAutoAssignFilters":["...", ...],
            "instanceAutoAssignFilters":["...", ...]
        },
        :
        ],
        "pagination":{
            "page":"...",
            "pageSize":"...",
            "numPages":"...",
            "totalCount":"..."
        },
        "count":"..."
}

Collections (Type: Collections)

Attribute

Type

Description

data

Group[]

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.

data (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:

  • Normal
  • Warning
  • Error

gradeKey

string

ID for identifying grades

gradeName

string

Grade name

gradeDisplayOrder

integer

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:

  • User
  • Default

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

integer

Number of volumes to which the consumer is assigned.

numOfVMs

integer

Number of virtual machines to which the consumer is assigned.

numOfHosts

integer

Number of hosts to which the consumer is assigned.

numOfHypervisors

integer

Number of hypervisors to which the consumer is assigned.

numOfApplications

integer

Number of applications to which the consumer is assigned.

numOfPods

integer

Number of pods to which the consumer is assigned.

numOfInstances

integer

Number of instances 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

podAutoAssignFilters

string[]

Name of the automatic assignment rule set for the pods

instanceAutoAssignFilters

string[]

Name of the automatic assignment rule set for the instances

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.

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
Host: JP1OAServer:22015
User-Agent: curl/7.63.0
Content-Type: application/json
Accept: application/json
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
Accept-Language: ja

[Response Header]
HTTP/1.1 200 OK
Date: Fri, 06 Sep 2019 09:38:13 GMT
Server: Cosminexus HTTP Server
Cache-Control: no-cache
WWW-Authenticate: HSSO 391057f139ab541fcdada36041750307958a6e_ZAlDSFUHGHp9UB8WcRQLdA==_V0810
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block 
X-Content-Type-Options: nosniff
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.",
    "urls" : [ ],
    "urlDisplayNames" : [ ],
    "templateCreatorType" : "Default",
    "vmAutoAssignment" : false,
    "applicationAssignFollow" : false,
    "numOfVolumes" : 784,
    "numOfVMs" : 162,
    "numOfHosts" : 9,
    "numOfHypervisors" : 13,
    "numOfApplications" : 55,
    "numOfPods" : 10,
    "numOfInstances" : 10,
    "volumeAutoAssignFilters" : [ ],
    "vmAutoAssignFilters" : [ ],
    "hostAutoAssignFilters" : [ ],
	"podAutoAssignFilters": [ ],
	"instanceAutoAssignFilters": [ ]
  }, {
    "instanceID" : 160,
    "name" : "Hitachi Cloud for JP1",
    "status" : "Normal",
    "gradeKey" : "0",
    "gradeName" : "Platinum",
    "gradeDisplayOrder" : 0,
    "description" : "Company: Hitachi\nSystem: Private Cloud for JP1 \nTel: xxx-xxx-xxx-xxx-xxx\nAddress:xxxx-xxx-xxx-xxx\nContact Person: jp1 support center\n",
    "urls" : [ "http://" ],
    "urlDisplayNames" : [ "support senter" ],
    "templateCreatorType" : "User",
    "vmAutoAssignment" : true,
    "applicationAssignFollow" : true,
    "numOfVolumes" : 8,
    "numOfVMs" : 273,
    "numOfHosts" : 0,
    "numOfHypervisors" : 1,
    "numOfApplications" : 2,
    "numOfPods" : 0,
    "numOfInstances" : 0,
    "volumeAutoAssignFilters" : [ ],
    "vmAutoAssignFilters" : [ ],
    "hostAutoAssignFilters" : [ ],
	"podAutoAssignFilters": [ ],
	"instanceAutoAssignFilters": [ ]
  }, {
    "instanceID" : 161,
    "name" : "XX Team",
    "status" : "Normal",
    "gradeKey" : "10",
    "gradeName" : "Gold",
    "gradeDisplayOrder" : 10,
    "description" : "Company: AAA , XX Team\nSystem: XX Team system\nTel: xxx-xxx-xxx-xxx-xxx\nAddress:xxx-xxx-xxx-xxx-xxx\nContact Person: hitachi support\n",
    "urls" : [ "https://hitachi-support-center-url" ],
    "urlDisplayNames" : [ "hitachi support" ],
    "templateCreatorType" : "User",
    "vmAutoAssignment" : false,
    "applicationAssignFollow" : true,
    "numOfVolumes" : 60,
    "numOfVMs" : 5,
    "numOfHosts" : 4,
    "numOfHypervisors" : 1,
    "numOfApplications" : 0,
    "numOfPods" : 0,
    "numOfInstances" : 0
    "volumeAutoAssignFilters" : [ ],
    "vmAutoAssignFilters" : [ "XX Team VM" ],
    "hostAutoAssignFilters" : [ "XX Team HostOS" ],
	"podAutoAssignFilters": [ ],
	"instanceAutoAssignFilters": [ ]
  } ],
  "count" : 3
}