Hitachi

JP1 Version 12 JP1/Operations Analytics REST API Reference Guide


2.10.10 Obtaining Consumer Allocation Information with a Specified Resource Allocation Category

This API acquires information required for allocating the specified consumer to monitoring targets based on the specified allocation category.

Execution permission

Admin, Modify

API version

v1

Request format

GET http[s]://host:port/Analytics/version/objects/Groups/{id}/actions/updateTargetResourceWithAssignmentType

Request body

Not applicable.

Response body

The structure of the response body and the object attributes are as follows:
{
        "name":"...",
        "href":"...",
        "method":"...",
        "type":"...",
        "parameters":[{
            "volumes":[{
                "id":"...",
                "assignmentType":"..."
            },
            :
            ],
            "vms":[{
                "id":"...",
                "assignmentType":"..."
            },
            :
            ],
            "resources":[{
                "id":"...",
                "assignmentType":"..."
            },
            :
            ],
            "hypervisors":[{
                "id":"...",
                "assignmentType":"..."
            },
            :
            ],
            "applications":[{
                "id":"...",
                "assignmentType":"..."
            },
            :
            ],
            "pods":[{
                "id":"...",
                "assignmentType":"..."
            },
            :
            ],
            "instances":[{
                "id":"...",
                "assignmentType":"..."
            },
            :
            ]
        },
        :
        ]
}

Action (Type: Action)

Attribute

Type

Description

name

string

Name of the execute an operation.

href

string

URL of the execute an operation.

method

string

Name of the method.

type

string

Data format of the object.

parameters

UpdateTargetResourceWithAssignmentType[]

A list of UpdateTargetResourceWithAssignmentType objects necessary to execute an operation. For details about UpdateTargetResourceWithAssignmentType, see the table below.

parameters (Type: UpdateTargetResourceWithAssignmentType)

Attribute

Type

Description

volumes

TargetResource[]

List of volumes to be allocated

vms

TargetResource[]

List of virtual machines to be allocated

resources

TargetResource[]

List of hosts to be allocated

hypervisors

TargetResource[]

List of hypervisors to be allocated

applications

TargetResource[]

List of applications to be allocated

pods

TargetResource[]

List of pods to be allocated

instances

TargetResource[]

List of instances to be allocated

volumes (Type: TargetResource)

Attribute

Type

Description

id

long

ID of the resource

assignmentType

enum

Resource owned division

(For details about the specifiable values, see the table AssignmentType in List of enumerators.)

vms (Type: TargetResource)

Attribute

Type

Description

id

long

ID of the resource

assignmentType

enum

Resource owned division

(For details about the specifiable values, see the table AssignmentType in List of enumerators.)

resources (Type: TargetResource)

Attribute

Type

Description

id

long

ID of the resource

assignmentType

enum

Resource owned division

(For details about the specifiable values, see the table AssignmentType in List of enumerators.)

hypervisors (Type: TargetResource)

Attribute

Type

Description

id

long

ID of the resource

assignmentType

enum

Resource owned division

(For details about the specifiable values, see the table AssignmentType in List of enumerators.)

applications (Type: TargetResource)

Attribute

Type

Description

id

long

ID of the resource

assignmentType

enum

Resource owned division

(For details about the specifiable values, see the table AssignmentType in List of enumerators.)

pods (Type: TargetResource)

Attribute

Type

Description

id

long

ID of the resource

assignmentType

enum

Resource owned division

(For details about the specifiable values, see the table AssignmentType in List of enumerators.)

instances (Type: TargetResource)

Attribute

Type

Description

id

long

ID of the resource

assignmentType

enum

Resource owned division

(For details about the specifiable values, see the table AssignmentType in List of enumerators.)

Status codes

Status code

Reason phrase

Description

200

OK

Success.

401

Unauthorized

No login privilege.

403

Forbidden

No reference privilege.

404

Not Found

The resource was not found.

412

Precondition Failed

The server is not available.

500

Internal Server Error

Server processing error.

Example code

[Request Header]
GET /Analytics/v1/objects/Groups/160/actions/updateTargetResourceWithAssignmentType 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:40 GMT
Server: Cosminexus HTTP Server
Cache-Control: no-cache
WWW-Authenticate: HSSO 8f3ef6f6876454e97ada389e335bf56513efd6a_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]
{
  "name" : "updateTargetResourceWithAssignmentType",
  "href" : "http://JP1OAServer:22015/Analytics/v1/objects/Groups/160/actions/updateTargetResourceWithAssignmentType/invoke",
  "method" : "POST",
  "type" : "application/json",
  "parameters" : [ {
    "volumes" : [ {
      "id" : 13642,
      "assignmentType" : "NoChange"
    }, {
      "id" : 13671,
      "assignmentType" : "NoChange"
    }, {

      ........

    }, {
      "id" : 16997,
      "assignmentType" : "NoChange"
    } ],
    "resources" : [ ],
    "hypervisors" : [ {
      "id" : 255,
      "assignmentType" : "NoChange"
    } ],
    "applications" : [ {
      "id" : 202,
      "assignmentType" : "NoChange"
    }, {
      "id" : 205,
      "assignmentType" : "NoChange"
    } ],
    "pods" : [ {
      "id" : 3001,
      "assignmentType" : "NoChange"
    } ]
  } ]
}