Hitachi

JP1 Version 12 JP1/Operations Analytics REST APIリファレンス


2.10.1 コンシューマーの一覧の取得

コンシューマーの一覧を取得します。

権限

Admin, Modify

APIのバージョン

v1

リクエスト形式

GET http[s]://host:port/Analytics/version/objects/Groups

リクエストボディー

リクエストボディーには何も設定しません。

レスポンスボディー

レスポンスボディーの構造とオブジェクトの属性を次に示します。
{
        "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)

属性

データ型

説明

data

Group[]

Groupのコレクション。Groupの詳細は以下の表を参照ください。

pagination

Pagination

ページ情報。リソースが存在しない場合、このパラメータは表示されません。

count

int

条件に合致したデータの個数

data (Type: Group)

属性

データ型

説明

instanceID

long

インスタンスを特定するID。

name

string

コンシューマーの名称。128文字以下の文字列を指定します。

status

enum

コンシューマーの状態。

(指定可能な値は「列挙型一覧」のNodeStatusTypeの表を参照してください。)

以下に示す値のみ指定可能です。

  • Normal
  • Warning
  • Error

gradeKey

string

グレードを識別するID。

gradeName

string

グレードの名称。

gradeDisplayOrder

integer

グレードの優先順位

description

string

コンシューマーの説明。1000文字以下の文字列を指定します。

urls

string[]

URL

urlDisplayNames

string[]

URLの表示文字列

templateCreatorType

enum

コンシューマーの変更種別

(指定可能な値は「列挙型一覧」のTemplateCreatorTypeの表を参照してください。)

以下に示す値のみ指定可能です。

  • User
  • Default

vmAutoAssignment

boolean

このコンシューマーに属するハイパーバイザー配下の仮想マシンを自動的に割り当てる場合にtrue

applicationAssignFollow

boolean

このコンシューマーに属するリソース配下のアプリケーションを自動的に割り当てる場合にtrue

numOfVolumes

integer

コンシューマーが割り当てられているボリュームの数。

numOfVMs

integer

コンシューマーが割り当てられている仮想マシンの数。

numOfHosts

integer

コンシューマーが割り当てられているホストの数。

numOfHypervisors

integer

コンシューマーが割り当てられているハイパーバイザーの数。

numOfApplications

integer

コンシューマーが割り当てられているアプリケーションの数。

numOfPods

integer

コンシューマーが割り当てられているポッドの数。

numOfInstances

integer

コンシューマーが割り当てられているインスタンスの数。

vmAutoAssignFilters

string[]

仮想サーバに設定されている自動割り当てルールのルール名。

hostAutoAssignFilters

string[]

ホストに設定されている自動割り当てルールのルール名。

podAutoAssignFilters

string[]

ポッドに設定されている自動割り当てルールのルール名。

instanceAutoAssignFilters

string[]

インスタンスに設定されている自動割り当てルールのルール名。

pagination (Type: Pagination)

属性

データ型

説明

page

integer

ページ

pageSize

integer

ページサイズ

numPages

integer

ページの数

totalCount

integer

オブジェクトの数

ステータスコード

HTTPステータスコード

Reason phrase

説明

200

OK

正常終了

400

Bad Request

クエリパラメーター不正

401

Unauthorized

ログイン権限がない

403

Forbidden

参照権限がない

412

Precondition Failed

サーバーが起動していない

500

Internal Server Error

サーバーサイドエラー

使用例

[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,
    "volumeAutoAssignFilters" : [ ],
    "vmAutoAssignFilters" : [ ],
    "hostAutoAssignFilters" : [ ],
	"podAutoAssignFilters": [ ]
  }, {
    "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,
    "volumeAutoAssignFilters" : [ ],
    "vmAutoAssignFilters" : [ ],
    "hostAutoAssignFilters" : [ ],
	"podAutoAssignFilters": [ ]
  }, {
    "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,
    "volumeAutoAssignFilters" : [ ],
    "vmAutoAssignFilters" : [ "XX Team VM" ],
    "hostAutoAssignFilters" : [ "XX Team HostOS" ],
	"podAutoAssignFilters": [ ]
  } ],
  "count" : 3
}