Hitachi

JP1 Version 12 JP1/Integrated Management 2 - Manager Command, Definition File and API Reference


5.5.1 Link information acquisition

Description

Gets the link information that represents order relationships between objects, such as jobs.

When link information is registered in the system, the link information that satisfies the specified criteria, such as before or after a particular object, is retrieved.

Execution permissions

See the section on operating permissions required for system monitoring using the Intelligent Integrated Management Base in the JP1/Integrated Management 2 - Manager Overview and System Design Guide.

API version

v1

Format
Request line
POST /application/component/apiVersion/links httpVersion
Request message body
{
"type": type-of-the-target,
"sid": target-IM-management-node-SID,
"fromLayerCount": layer-count-of-the-preceding-node,
"toLayerCount": layer-count-of-the-succeeding-node,
"countPerLayer": node-count-per-layer,
"linkCount": node-relationship-count
}
Response message body
{
    "links": [
        {
            "from": the-preceding-node-SID,
            "to": the-succeeding-node-SID,
            "type": type-of-the-target
        }, ...
],
    "exceedCountDetected": {
        "countPerLayer": {
        ...,
            "layer-2": whether-node-count-for-layer-2-exceeds-the-upper-limit,
            "layer-1": whether-node-count-for-layer-1-exceeds-the-upper-limit,
            "layer0": whether-node-count-for-layer0-exceeds-the-upper-limit,
            "layer1": whether-node-count-for-layer1-exceeds-the-upper-limit,
            "layer2": whether-node-count-for-layer2-exceeds-the-upper-limit,
            ...
         },
        "linkCount": whether-node-relationship-count-exceeds-the-upper-limit
    },
    "messageId": message-ID,
    "message":message
}
Parameters
type

Specify the type of the link information that you want to retrieve, among the link information types applied to the system.

type describes a grouping of relations that have the same meaning. On the Related node tab in the Integrated Operation Viewer window, you can filter relations to display only those belonging to a specific type.

For relations within a JP1/IM product or between a JP1/IM product and another product, the following types are used. In addition to these types, the use of user-specified types is also allowed.

  • rootJobnetExecutionOrder: Relation of the execution order of root jobnets

  • managerAgent: Relation between the manager and agent of a JP1 product

  • rootJobnetAgent: Relation between a root jobnet and an AJS agent

  • sameNode: Relation between nodes with the same name

  • L2Connection: Relation between layer-2 connection lines managed by JP1/NNMi

  • Infrastructure: Relation between infrastructure resources managed by JP1/OA

  • monitoringConfiguration: Relation between a product and a monitoring target in a monitoring product configuration

If this attribute is omitted or it is set to an empty string, the applicable link information is returned regardless of the type of the information.

If this attribute is specified, the link information for the specified type among applicable sets of link information is returned.

sid

Specify the SID of the target node. The information on the preceding and succeeding nodes of the specified target is returned.

(Example) When specifying a root jobnet:

_JP1AJS-M_JP1/AJS3-manager-host-name/_HOST_JP1/AJS3-manager-host-name/_JP1SCHE_scheduler-service-name/_JP1JOBG_job-group-name_JP1ROOTJOBNET_node-name

Omitting this parameter causes all link information to be retrieved.

fromLayerCount

Specify the maximum number of layers of the preceding node to be retrieved, in the range of 0 to 2147483647.

If sid is specified, the fromLayerCount parameter cannot be omitted.

If sid is omitted, the value specified for the fromLayerCount parameter is ignored.

If the same node exists in more than one layer in link information, the number of layers can exceed the specified value depending on how layers are interpreted.

If this can cause a problem, check whether the excess occurs while retrieving link information before using it.

toLayerCount

Specify the maximum number of layers of the succeeding node to be retrieved, in the range of 0 to 2147483647.

If sid is specified, the toLayerCount parameter cannot be omitted.

If sid is omitted, the value specified for the toLayerCount parameter is ignored.

If the same node exists in more than one layer in link information, the number of layers can exceed the specified value depending on how layers are interpreted.

If this can cause a problem, check whether the excess occurs while retrieving link information before using it.

countPerLayer

Specify the maximum number of nodes to be retrieved for each node layer, in the range of 1 to 2147483647.

If sid is specified, the countPerLayer parameter cannot be omitted.

If sid is omitted, the value specified for the countPerLayer parameter is ignored.

If the same node exists in more than one layer in link information, the number of layers can exceed the specified value depending on how layers are interpreted.

If this can cause a problem, check whether the excess occurs while retrieving link information before using it.

linkCount

Specify the maximum number of node-node relationships (the number of pairs of preceding and succeeding nodes) to be retrieved, in the range of 1 to 2147483647.

If sid is specified, the linkCount parameter cannot be omitted.

If sid is omitted, the value specified for the linkCount parameter is ignored.

If the same node exists in more than one layer in link information, the number of layers can exceed the specified value depending on how layers are interpreted.

If this can cause a problem, check whether the excess occurs while retrieving link information before using it.

Status codes

The following table describes the status codes that are returned as a response to the request:

Status code

Message

Description

200

None

There is no data that has not been returned because of the upper limit restriction.

KAJY22000-W

There is data that has not been returned because of the upper limit restriction.

400

KAJY22002-E

The request has a parameter with an invalid format. (The key does not exist or specification and data type are different)

500

KAJY22002-E

The request has a parameter with an invalid format. (The value is invalid.)

For details on the messages, see the manual JP1/Integrated Management 2 - Manager Messages.

Return values

The following information is returned in the response body if the status code is 200:

No.

Member name

Data type

Description

1

links

array

An array of response objects.

The order of the array is irrelevant.

2

from

string

The preceding node.

The format is the same as that of sid in the message body.

3

to

string

The succeeding node.

The format is the same as that of sid in the message body.

4

type

string

The same value as type of the request parameter.

5

exceedCountDetected

object

Whether the specified upper limit for a parameter is exceeded.

Each parameter has members. If sid is not specified, none is returned.

6

countPerLayer

boolean

Whether the number of nodes per layer exceeds the upper limit.

Each layer has members.

7

layerinteger

string

Whether the number of nodes per layer exceeds the upper limit (for all the target layers).

A number is assigned to integer as follows: 0 for the layer specified as sid, +1 for the succeeding layer, and -1 for the preceding layer. The number is incremented by one for further succeeding layers, and decremented by one for further preceding layers.

8

linkCount

boolean

Whether the number of links exceeds the upper limit.

  • true: Exceeded

  • false: Not exceeded

9

messageId

string

The message ID.

This is returned only if there is a message to be notified.

10

message

string

The message body.

The used language is determined by the value specified for the Accept-Language property in the HTTP request header.

This is returned only if there is a message to be notified.

Example 1

The example below executes the API in the following scenario:

  • Identifiers for the target system

    - JP1/AJS3 manager host name: host1

    - Scheduler service name: scheduler1

    - Job group name: jobgroup1

    - Node name: rootjobnet3

  • The number of layers of the preceding node to be retrieved: 100

  • The number of layers of the succeeding node to be retrieved: 1

  • The number of nodes to be retrieved per node layer: 100

  • The number of node relationships to be retrieved: 100

  • The relationship between nodes:

    [Figure]

  • Language used in messages: English

Request:
POST /im/api/v1/links 1.1
Authorization: Bearer XXXX
Accept-Language: ja
Content-Type: application/json
Accept: application/json
{
    "type": "rootJobnetExecutionOrder",
    "sid": "_JP1AJS-M_host1/_HOST_host1/_JP1SCHE_scheduler1/_JP1JOBG_jobgroup1/_JP1ROOTJOBNET_rootjobnet3",
    "fromLayerCount": 100,
    "toLayerCount": 1,
    "countPerLayer": 100,
    "linkCount": 100
}
Response:
HTTP/1.1 200 OK
Content-Type: application/json
{
    "links": [
        {
        "from": "_JP1AJS-M_host1/_HOST_host1/_JP1SCHE_scheduler2/_JP1JOBG_jobgroup3._JP1ROOTJOBNET_rootjobnet1",
        "to": "_JP1AJS-M_host1/_HOST_host1/_JP1SCHE_scheduler1/_JP1JOBG_jobgroup1/_JP1ROOTJOBNET_rootjobnet3",
"type": "rootJobnetExecutionOrder"
        },
        {
        "from": "_JP1AJS-M_host1/_HOST_host1/_JP1SCHE_scheduler4/_JP1JOBG_jobgroup3/_JP1ROOTJOBNET_rootjobnet2",
        "to": "_JP1AJS-M_host1/_HOST_host1/_JP1SCHE_scheduler1/_JP1JOBG_jobgroup1/_JP1ROOTJOBNET_rootjobnet3",
        "type": "rootJobnetExecutionOrder"
        },
        {
        "from": "_JP1AJS-M_host1/_HOST_host1/_JP1SCHE_scheduler1/_JP1JOBG_jobgroup1/_JP1ROOTJOBNET_rootjobnet3",
        "to": "_JP1AJS-M_host1/_HOST_host1/_JP1SCHE_scheduler1/_JP1JOBG_jobgroup2/_JP1ROOTJOBNET_rootjobnet4",
        "type": "rootJobnetExecutionOrder"
        }
        ],
        "exceedCountDetected": {
            "countPerLayer": {
                "layer-1": false,
                "layer0": false,
                "layer1": false,
                 },
        "linkCount": false
    },
    "messageId": "KAJY22000-W",
    "message": "There is data that is not displayed because the upper limit is reached. (item = succeeding node layer count)"
}