Hitachi

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


5.13.3 Response action execution

Description

Executes the specified response action.

Execution permissions
  • JP1_Console_Admin

  • JP1_Console_Operator

  • JP1_Console_User

API version

v1

Format
Request line
POST /application/component/apivVersion/nodes/suggestions/action httpVersion
Request message body
{
    "sid": tree-SID,
    "suggestionId": suggestion-ID,
    "action": {
             "type": type-of-response-action,
             "params": parameters-of-response-action,
             "description": description-of-response-action
              }
}
Response message body
{
    "location": URL-of-destination-screen,
    "target": target-attribute-of-html-for-opening-URL-of-destination-screen,
    "suppressId":information-provided-in-the-Repeated-event-list-window-(suppressed-event-ID),
    "eventSevere":information-provided-in-the-Repeated-event-list-window-(severe-event),
    "suppressName":information-provided-in-the-Repeated-event-list-window-(repeated-event-condition-name),
    "nodeSid":information-provided-in-the-Repeated-event-list-window-(tree-SID-of-IM-management-node),
    "message":{
        "messageId": message-ID,
        "message": message-text
    }
}
Parameters
sid

Specify a tree SID.

suggestionId

Specify a suggestion ID. For details on the suggestion ID, see information regarding suggestionId in Suggestion definition file in Chapter 2. Definition Files.

action

Specify a response action.

  • type: Specify the type of response action. For details on the specifiable types of response actions, see (2) Response action in Suggestion definition file in Chapter 2. Definition Files.

  • params: Specify the response action's parameters after conversion of the variables. When the type of response action is jump and at the same time relatedEvent is also specified, the following members must also be specified. For details on each of these members, see 5.13.2 Response action suggestion.

    - suppressId

    - eventSevere

    - suppressName

    - nodeSid

  • description: Specify the description of the response action after conversion of the variables. You can specify a string not exceeding 512 characters, which must not include control characters. The specification of an empty string is not allowed.

Status codes

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

Status code

Message

Description

200

None

The response action execution REST API was successfully processed.

KAJY22029-W

The response action is currently being executed.

400

KAJY22031-E

The request of the REST API is invalid.

The possible causes are: invalid format of the tree SID of the IM management node, invalid suggestion IDs, invalid response action, etc.

KAJY22011-E

Either the specified tree SID does not exist or the logged-in user does not have the permission to view the specified IM management node.

KAJY22021-E

The specified suggestion IDs correspond to either those suggestions that are not mapped to the specified IM management node or those which the logged-in user is not allowed to view.

403

KAJY01000-E

The logged-in user does not have the permission to execute the REST API.

500

KAJY22033-E

The upper limit of concurrent executions for the response action is exceeded.

When the status code is 200, the following information is returned in the response body:

No.

Member name

Data type

Description

1

location

string

Returns the URL of the destination screen.

  • When the type of response action is jump and at the same time url is also specified:

    Returns the URL of the screen to which to jump.

  • In all the other cases:

    This member is not returned.

When the response action is being executed, this member is not returned regardless of the type of response action.

2

target

string

Returns the target attribute of HTML used for opening the URL of the destination screen.

  • When the type of response action is jump and at the same time url is also specified:

    Returns the target attribute of the HTML used for opening the URL of the screen to which to jump.

  • When the type of response action is other than jump:

    This member is not returned.

When the response action is being executed, this member is not returned regardless of the type of response action.

3

suppressId

string

Returns the information (suppressed event ID) provided in the Repeated event list window.

  • When the type of response action is jump and at the same time url is also specified:

    Returns the information (suppressed event ID) provided in the Repeated event list window.

  • In all the other cases:

    This member is not returned.

When the response action is being executed, this member is not returned regardless of the type of response action.

4

eventSevere

string

Returns the information (severe event) provided in the Repeated event list window.

  • When the type of response action is jump and at the same time relatedEvent is also specified:

    Returns the information (severe event) provided in the Repeated event list window.

  • In all the other cases:

    This member is not returned.

When the response action is being executed, this member is not returned regardless of the type of response action.

5

suppressName

string

Returns the information (repeated event condition name) provided in the Repeated event list window.

  • When the type of response action is jump and at the same time relatedEvent is also specified:

    Returns the information (repeated event condition name) provided in the Repeated event list window.

  • In all the other cases:

    This member is not returned.

When the response action is being executed, this member is not returned regardless of the type of response action.

6

nodeSid

string

Returns the information (tree SID of the IM management node) provided in the Repeated event list window.

  • When the type of response action is jump and at the same time relatedEvent is also specified:

    Returns the information (tree SID of the IM management node) provided in the Repeated event list window.

  • In all the other cases:

    This member is not returned.

When the response action is being executed, this member is not returned regardless of the type of response action.

7

message

object

When the response action is being executed, a message notifying the user that the response action is being executed is returned. When the response action is not being executed, this member is not returned.

8

messageId

string

Returns the message ID.

9

message

string

Returns the message text.

Notes

The maximum number of concurrent executions of this API is 10. When the maximum limit is exceeded, the error message KAJY22033-E is output, and the execution of the response action stops.

Examples

The following example shows how to execute the response action (suggestion ID: check_affected_rootJobnet) that consists of Move to the Related node tab displaying the JP1/AJS-Agent node for the IM management node (tree SID: _ROOT_AllSystems/_HOST_HOST1/_CATEGORY_platform/_SUBCATEGORY_JP1%2FPFM%20-%20Windows/_OBJECT_JP1PFM-ATA1HOST2) that belongs to the service provided by the PFM agent that constitutes a management object.

Request:
POST http://hostname:20703/im/api/v1/nodes/suggestions/action
{
    "sid":"_ROOT_AllSystems/_HOST_HOST1/_CATEGORY_platform/_SUBCATEGORY_JP1%2FPFM%20-%20Windows/_OBJECT_JP1PFM-ATA1HOST2",
    "suggestionId":"check_affected_rootJobnet",
    "action":
        {
            "type":" jump",
            "params":
                {
                    "url":"index?sid=%5FROOT%5FAllSystems%2F%5FHOST%5FHOST1%2F%5FCATEGORY%5FmanagementApplications%2F%5FOBJECT%5FJP1AJSAGT&view=tree&tab=relation&eou=1"
 
                },
            "description":"Move to the Related node tab displaying the JP1/AJS - Agent node"
        }
}
Response:
HTTP/1.1 200 OK
Content-Type: application/json
{
    "location":"index?sid=%5FROOT%5FAllSystems%2F%5FHOST%5FHOST1%2F%5FCATEGORY%5FmanagementApplications%2F%5FOBJECT%5FJP1AJSAGT&view=tree&tab=relation&eou=1",
    "target":""
}