Hitachi

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


5.6.3 Event status change

Description

Changes the event status of the specified events.

An error is issued if the logged-in JP1 user has no permission to view the specified events.

Execution permissions
  • JP1_Console_Admin

  • JP1_Console_Operator

API version

v1

Format
Request line
POST /application/component/apiVersion/events/status httpVersion
Request message body
{
    "dealt":"event-status"
    "sid":[
         "JP1-event-SID",...
}
Response message body
{
    "eventData":[
        event information object,...
    ],
    "messageId":massageID,
    "message":massage
}
Parameters
dealt

Specify one of the following values for a state to which you want to change the event status:

  • 0: Unprocessed

  • 1: Processed

  • 2: Processing

  • 3: Held

sid

Specify an array containing the SIDs of events whose status you want to get. For details on the event SID, see 7.2.1(1) Event information object. You can specify up to 2,000 event SIDs.

Status codes

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

Status code

Message

Description

200

None

The event status was changed successfully.

KAJY32110-W

Some events were not able to be handled due to insufficient permission.

400

KAJY32220-E

The request has a parameter with an invalid format.

500

KAJY32100-E

to

KAJY32109-E

An error occurred while the event status was being changed.

KAJY32221-E

Cannot be executed due to a change to the event status.

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

eventData

Object[]

Returns the list of events of which statuses were modified as the array of event information objects. For details, see 7.2.1(1) Event information object.

Returns the event for which the operation was correctly performed if some of the events could not be operated due to an inadequate permission.

2

messageId

string

Returns the message ID of the temporary error message that occurred during the modification of the statuses.

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

3

message

string

Returns the body text of the temporary error message that occurred during the modification of the statuses.

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

Notes
  • The concurrent execution of a large number of event status change APIs can lead to the degradation of manager performance or cause the manager to time out.

  • Before incorporating the execution of the event status change API into your operation, carefully examine how the resulting operation can affect API execution performance and manager performance to ensure that your operational needs are not compromised.

Examples

The following example uses this API to change the event status of specified events to Processed.

Request:
POST /im/api/v1/events/status HTTP/1.1
Authorization:Bearer xxxx
Accept-Language: ja
Content-Type: application/json
Accept: application/json
{
    "dealt": "1",
    "sid":[ 
    "_JP1IM_imhost1/_JP1IMSEQNO_697/_JP1IMEVBSEQNO_746",
    "_JP1IM_imhost1/_JP1IMSEQNO_698/_JP1IMEVBSEQNO_747",
    ]
}
Response:
HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, max-age=0
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: application/json
 
{
  "eventData": [
    {
      "sid": "_JP1IM_imhost1/_JP1IMSEQNO_697/_JP1IMEVBSEQNO_746",
      "value": [
        "E.@JP1IM_DEALT": "1"
      ]
    },
    {
      "sid": "_JP1IM_imhost1/_JP1IMSEQNO_698/_JP1IMEVBSEQNO_747",
      "value": [
        "E.@JP1IM_DEALT": "1"
      ]
    }
  ]
}