Hitachi

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


5.6.4 Event generation

Description

Issues the specified JP1 event and registers it with the manager host (local host). After the registration, the serial number of the issued event is returned.

Execution permissions
  • JP1_Console_Admin

  • JP1_Console_Operator

  • JP1_Console_User

API version

v1

Format
Request line
POST /application/component/apiVersion/events/send httpVersion
Request message body
{
    "eventId": event-ID,
    "message": message,
    "attrs": {extended-attribute-name:extended-attribute-value[, ...]}
}
Response message body
serial-number-of-the-issued-event
Parameters
eventId

A basic part event ID to be issued.

Specify it in the following range:

  • 0 to 1FFF

  • 7FFF8000 to 7FFFFFFF

If a value is out of specifiable range, the KAJY02047-E message is output.

Omitting this parameter causes eventId to be set to 0.

message

Specify message text that describes the JP1 event as a string of 1,023 bytes or smaller. If a string of 1,024 bytes or larger is specified, an exception occurs to exit the process.

Note that the character code of the registered message depends on that of the OS environment in which the manager is located.

attrs

An extended attribute.

If the same extended attribute name is specified multiple times, this parameter is overwritten by the value of the last specified extended attribute.

Specify the extended attribute name with a string of up to 32 bytes consisting of alphanumeric characters and underscores (starting with an alphabetic letter and having all capital alphabetic letters). If an extended attribute name that contains any unspecifiable string is specified, the KAJY02047-E message is output. In addition, do not use the prefix E. in the extended attribute name. If E. is specified, the KAJY02047-E message is output.

The total length of all the extended attribute values you can specify is 10,000 bytes.

The following table lists and describes the event attributes registered by the event registration function.

Table 5‒12: TableList of event attributes registered by the event registration function

No.

Category

Item name

Attribute name

Description of the event attribute value

Event attribute value example

1

Basic attribute

Serial number

SEQNO

Serial number of the JP1 event to be issued

SQ 18840074

2

Event ID#1

ID

Event ID passed through the parameter

ID 00010000

3

Registered reason

REASON

Reason why the event was registered in the current server:

  • 1: The event was issued to the local event server on the current event server.

  • 2: The event was issued from the current server to a different server (the value cannot be obtained).

  • 3: The event was issued from a different server to the current server.

  • 4. The event was transferred from a different server due to the environment setting.

RR 1

4

Source process ID

PROCESSID

Process ID of the source API

RT 0

5

Registered time

TIME

Registration time on the source event server

RT 1559609722

6

Arrived time

ARRIVEDTIME

Registration time on the local event server

AT 1559609722

7

Source user ID

USERID

User ID of the source process (number)

UI -1

8

Source group ID

GROUPID

Group ID of the source process (number)

Fixed value by the environment setting in Windows and Java

GI -1

9

Source user name

USERNAME

User name of the source process

UN jp1admin

10

Source group name

GROUPNAME

Group name of the source process

Null string in Windows and Java

GN (space)

11

Event source server name

SOURCESERVER

Source event server name.

If the source server name is not specified, the local host is specified.

SI HOSTA

12

Source IP address

SOURCEIPADDR

IP address of the source event server

%0Aワト(

13

Destination IP address

DESTIPADDR

Name of a different event server if the source API clearly specifies transfer to a different event server.

Not registered if the IP address of a different event server does not exist.

14

Source serial number

SOURCESEQNO

Serial number on the source host

HQ 18840074

15

Code set

CODESET

Stores the character code specified for the OS.

CS MS932

16

Message

MESSAGE

String that describes the JP1 event

MS event was registered successfully

17

Detailed event information

BASIC

Detailed information on a basic event attribute

Not registered if the detailed event information does not exist.

18

AOM information

AOM

AOM information of the event

Not registered if the AOM information does not exist.

19

Extended attribute (common information)#2

Original severity level

SEVERITY

The following strings to represent severity, etc.:

  • "Emergency": Urgent

  • "Alert" : Alert

  • "Critical" : Critical

  • "Error" : Error

  • "Warning" : Warning

  • "Notice" : Notice

  • "Information" : Informative

  • "Debug: Debug

XV SEVERITY=Error

20

User name

USER_NAME

Name of the execution user

XV USER_NAME=user1

21

Product name

PRODUCT_NAME

Name of the program that issued the JP1 event

It can be one of the following program names:

  • "/HITACHI/JP1/AJS"

  • "/HITACHI/JP1/AOM"

  • "/HITACHI/JP1/IM"

  • "/HITACHI/JP1/NBQ"

  • "/HITACHI/JP1/NETMDM"

  • "/HITACHI/JP1/NPS"

  • "/HITACHI/JP1/NQSEXEC"

XV PRODUCT_NAME=/COMPANY/PRODUCT

22

Object type

OBJECT_TYPE

One of the following strings that indicate the object type, etc.:

  • "JOB"

  • "JOBNET"

  • "ACTION"

  • "ACTIONFLOW"

  • "PRINTJOB"

  • "PRINTQUEUE"

  • "PRINTER"

  • "BATCHQUEUE"

  • "PIPEQUEUE"

  • "JOBBOX"

  • "LOGFILE"

  • "LINK"

  • "SERVICE"

  • "PRODUCT"

  • "CONFIGRATION"

  • "SERVER"

XV OBJECT_TYPE=SERVICE

23

Object name

OBJECT_NAME

Name of an object, such as a job or jobnet. An element at the bottom layer for a hierarchical object, such as a jobnet

XV OBJECT_NAME=OBJECT

24

Root object type

ROOT_OBJECT_TYPE

Type of an object

ROOT_OBJECT_TYPE=SERVICE

25

Root object name

ROOT_OBJECT_NAME

Name that acts as a unit of directing execution on user operation

XV ROOT_OBJECT_NAME=ROOT_OBJECT

26

Object ID

OBJECT_ID

Object ID

String that can be combined with PRODUCT_NAME to uniquely identify the instance of an object within the integrated system

XV OBJECT_ID=ID

27

Occurrence

OCCURRENCE

String that represents an event which occurred on OBJECT_NAME, such as:

  • "ACTIVE": Active

  • "INACTIVE": Inactive

  • "START": Start

  • "END": End

  • "NOTSTART": Failed to start

  • "CANCEL": Canceled

  • "LATESTART": Scheduled start time has passed

  • "LATEEND": Scheduled end time has passed

  • "SUBMIT": Submitted

  • "ENQUEU": Enqueued

  • "DEQUEU": Dequeued

  • "PAUSE": Paused (suspended)

  • "RELEASE": Paused (resumed)

  • "RESTART": Restarted

  • "CREATE": Created

  • "DELETE": Deleted

  • "MODIFY": Updated

  • "RETRY": Retry started

  • "STOP": Stopped

  • "MOVE": Moved

  • "COPY": Copied

  • "NOTICE": Noticed

  • "REPLY": Replied

  • "CONNECT": Connected

  • "DISCONNECT": Disconnected

  • "EXCEPTION": Error other than the above

XV OCCURRENCE=START

28

Start time

START_TIME

Time execution started or re-execution started

XV START_TIME=1558396092

29

End time

END_TIME

Time execution ended or re-execution ended

XV END_TIME=1558914205

30

Result code

RESULT_CODE

Result code

XV RESULT_CODE=604665981

31

Event source host name

JP1_SOURCEHOST

Is set to B.SOURCESERVER if an event source host name is not specified

HOSTA

32

Individual extended attribute count

Individual extended attribute count

Number of extended attributes

XN=2

#1

The following shows the format for database output:

Example: ID:IDEXT 0000000A:00000000

#2

Common attributes are stored in an array. They are not registered if not specified.

The following shows the attribute values of an event registered by this REST API:

-- This parameter is used for execution

{
   "eventId":"10000",
   "message":"A failure occurred in the cloud service",
   "attrs":{"SEVERITY":"Error"}
}
SQ 18840099
ID 00010000:00000000
KN 0
HD 0
PI 0
RT 1559790829
AT 1559790829
RR 1
UI -1
GI -1
HQ 18840099
UN jp1admin
GN 
SN HOSTA
SI %0Aワト(
CS MS932
MS A failure occurred in the cloud service
UP %00%00%00%00%00%00%00%00
XN 1
XV SEVERITY= Error
Status codes

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

Status code

Message

Description

200

None

A JP1 event was issued.

400

KAJY02047-E

The format of the parameter specified for the request is invalid.

403

KAJY01000-E

There is no permission to run the REST API.

500

KAJY02048-E

A JP1 event could not be issued.

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:

Data type

Description

Number

Serial number of an issued event

Examples

The following shows a usage example of the event API:

Request:
POST http://hostname:20703/im/api/v1/events/send
{
  "eventId":"1FFF",
  "message":"A failure occurred in Service A",
  "attrs":{"SEVERITY":"Error","JP1_SOURCEHOST":"HOSTA"}
}
Response:
18839936