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.
No. |
Category |
Item name |
Attribute name |
Description of the event attribute value |
---|---|---|---|---|
1 |
Basic attribute |
Serial number |
SEQNO |
Serial number of the JP1 event to be issued |
2 |
Event ID#1 |
ID |
Event ID passed through the parameter |
|
3 |
Registered reason |
REASON |
Reason why the event was registered in the current server:
|
|
4 |
Source process ID |
PROCESSID |
Process ID of the source API |
|
5 |
Registered time |
TIME |
Registration time on the source event server |
|
6 |
Arrived time |
ARRIVEDTIME |
Registration time on the local event server |
|
7 |
Source user ID |
USERID |
User ID of the source process (Fixed value: -1) |
|
8 |
Source group ID |
GROUPID |
Group ID of the source process (Fixed value: -1) |
|
9 |
Source user name |
USERNAME |
User name of the source process In Windows: SYSTEM, In Linux: root |
|
10 |
Source group name |
GROUPNAME |
Group name of the source process (Fixed value: Null string) |
|
11 |
Event source server name |
SOURCESERVER |
Source event server name. If the source server name is not specified, the local host is specified. |
|
12 |
Source IP address |
SOURCEIPADDR |
IP address of the source event server |
|
13 |
Destination IP address |
DESTIPADDR |
Name of a different event server if the source API clearly specifies transfer to a different event server. |
|
14 |
Source serial number |
SOURCESEQNO |
Serial number on the source host |
|
15 |
Code set |
CODESET |
Stores the character code specified for the OS. |
|
16 |
Message |
MESSAGE |
String that describes the JP1 event |
|
17 |
Detailed event information |
BASIC |
Detailed information on a basic event attribute |
|
18 |
AOM information |
AOM |
AOM information of the event |
|
19 |
Extended attribute (common information)#2 |
Original severity level |
SEVERITY |
The following strings to represent severity, etc.:
|
20 |
User name |
USER_NAME |
Name of the execution user |
|
21 |
Product name |
PRODUCT_NAME |
Name of the program that issued the JP1 event It can be one of the following program names:
|
|
22 |
Object type |
OBJECT_TYPE |
One of the following strings that indicate the object type, etc.:
|
|
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 |
|
24 |
Root object type |
ROOT_OBJECT_TYPE |
Type of an object |
|
25 |
Root object name |
ROOT_OBJECT_NAME |
Name that acts as a unit of directing execution on user operation |
|
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 |
|
27 |
Occurrence |
OCCURRENCE |
String that represents an event which occurred on OBJECT_NAME, such as:
|
|
28 |
Start time |
START_TIME |
Time execution started or re-execution started |
|
29 |
End time |
END_TIME |
Time execution ended or re-execution ended |
|
30 |
Result code |
RESULT_CODE |
Result code |
|
31 |
Event source host name |
JP1_SOURCEHOST |
Is set to B.SOURCESERVER if an event source host name is not specified |
|
32 |
Individual extended attribute count |
Individual extended attribute count |
Number of extended attributes |
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 JP1/Integrated Management 3 - 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