Hitachi

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


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

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

権限

Admin, Modify

APIのバージョン

v1

リクエスト形式

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

リクエストボディー

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

レスポンスボディー

レスポンスボディーの構造とオブジェクトの属性を次に示します。

Collections

{
        "data":["...", ...],
        "pagination":{
            "page":"...",
            "pageSize":"...",
            "numPages":"...",
            "totalCount":"..."
        },
        "count":"..."
}

Collections (Type: Collections)

属性

データ型

説明

data

anyType[]

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

pagination

Pagination

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

count

int

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

pagination (Type: Pagination)

属性

データ型

説明

page

integer

ページ

pageSize

integer

ページサイズ

numPages

integer

ページの数

totalCount

integer

オブジェクトの数

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)

属性

データ型

説明

instanceID

long

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

name

string

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

status

enum

コンシューマーの状態。

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

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

  • Normal
  • Warning
  • Error

gradeKey

string

グレードを識別するID。

gradeName

string

グレードの名称。

gradeDisplayOrder

int

グレードの優先順位

description

string

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

urls

string[]

URL

urlDisplayNames

string[]

URLの表示文字列

templateCreatorType

enum

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

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

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

  • User
  • Default

vmAutoAssignment

boolean

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

applicationAssignFollow

boolean

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

numOfVolumes

int

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

numOfVMs

int

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

numOfHosts

int

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

numOfHypervisors

int

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

numOfApplications

int

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

vmAutoAssignFilters

string[]

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

hostAutoAssignFilters

string[]

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

volumeIDs

long[]

コンシューマーに割り当てられているボリュームを特定するIDのリスト

vmIDs

long[]

コンシューマーに割り当てられている仮想マシンを特定するIDのリスト

hostIDs

long[]

コンシューマーに割り当てられているホストを特定するIDのリスト

hypervisorIDs

long[]

コンシューマーに割り当てられているハイパーバイザーを特定するIDのリスト

applicationIDs

long[]

コンシューマーに割り当てられているアプリケーションを特定するIDのリスト

ステータスコード

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
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
}