Put Sessions Status (putSessionsStatus) API
The Put Sessions Status (putSessionsStatus) API can be used to update the i-effect logbook session status and optionally add additional information to a logbook session.
Required Parameter Group:
Pos | Name | I/O | Type |
---|---|---|---|
1 | API token | Input | char(256) |
2 | Session ID | Input | decimal(7 0) |
3 | Status | Input | char(10) |
4 | Message | Input | char(1024) |
5 | Comment | Input | char(256) |
6 | Error code | I/O | Char(*) |
Service Program
To use this API, bind the following service program to your program module
Service Program | Library | Thread safe |
---|---|---|
SERVICEAPI | IEFFECT | yes |
The job using this API has to be set to the correct country specific CCSID. A job CCSID of 65535 is not supported.
Authorities and Locks
Public API Authority *USE
Parameter details
API token
INPUT; CHAR(256)
API token for authentification on the server. The authorised user can generate this token with i-effect WebControl. See Generate API token
Session ID
INPUT; DECIMAL(7 0)
i-effect logbook session number for the status change.
Status
INPUT; CHAR(10)
The new logbook session status. Possible values are
Value | Description |
---|---|
OK | i-effect processing was successfull |
ERROR | i-effect processing finished abnormally |
DIAG | i-effect processing ended with diagnostic messages |
WAIT | i-effect is waiting for the update of the session status |
ACTIVE | i-effect processing is active |
Message
INPUT; CHAR(1024)
User defined message, that should be added to this session. This message will apear in the second level message text together with the following message ID
Message ID | Description |
---|---|
GZI9026 | Session status was changed from user &1 from &2 to &3. |
Comment
INPUT; CHAR(256)
User defined comment to this logbook session.
Comments for an i-effect logbook session can only be displayed and edited in i-effect WebControl.
Error code
I/O; CHAR(*)
The structure in which to return error information:
Offset | I/O | Type | Description |
---|---|---|---|
0 | Output | CHAR(1024) | Message ID |
1025 | Output | CHAR(1024) | Message description |
2049 | Output | CHAR(1024) | Stack trace |
Messages
All call to this API returns the following status and error messages
Message ID | Description | Sample Message description | Sample Callstack |
---|---|---|---|
200 | The API call was successful | ||
400 | The API Call returned an error | Could not find the specified session '99999' in the database! | com.menten.ieffect.rest.exceptions.SessionNotFoundException: Could not find the specified session '99999' in the database! at com.menten.ieffect.rest.controller.LogbookController.getSession(LogbookController.java:110) |
401 | The API Authentification was unsuccessful | Authentication failed. |
Sample
Prototype
In this sample API call in RPG-FREE, the session 28130 is set to status OK, and the second level message text of GZI9026 is set to contain a user defined message.
returnCode = putSessionsStatus(token:
28130:
'OK':
'Short user defined message':
'Long explanatory text to be added to the comment':
errorDS);
See Sample programs