The Get Sessions (getSessions) API returns information about the specified session or a group of sessions.
Required Parameter Group:
|
Pos |
Name |
I/O |
Type |
|---|---|---|---|
|
1 |
API token |
Input |
char(256) |
|
2 |
Session ID |
Input |
decimal(7 0) |
|
3 |
Filter |
Input |
Char(*) |
|
4 |
Sessions |
Output |
Char(*) |
|
5 |
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 to be updated.
Filter
INPUT; ARRAY OF DATA STRUCTURE;
List of search patterns, There are up to 999 elements supported. The structure of one array element is
|
Offset |
I/O |
Type |
Description |
Valid values |
Sample |
|---|---|---|---|---|---|
|
0 |
Input |
CHAR(52) |
Filter field |
sessionstart sessionend module status action |
"sessionstart" |
|
53 |
Input |
CHAR(257) |
Filter value |
|
"03.12.2018 09:52:54" |
|
311 |
Input |
CHAR(2) |
Filter comparison |
eq - equal ne - not equal gt - greater lt - less ge - greater equal le - less equal ct - contains |
"ge" |
|
314 |
Input |
CHAR(3) |
Filter and/or |
and or |
"and" |
If Filter "ct" is defined, use the following sepcial characters in your filter value field to specify the search string
|
LIKE Operator |
Description |
|---|---|
|
a% |
Finds any values that start with "a" |
|
%a' |
Finds any values that end with "a" |
|
'%or% |
Finds any values that have "or" in any position |
|
_r% |
Finds any values that have "r" in the second position |
|
a_%_% |
Finds any values that start with "a" and are at least 3 characters in length |
|
a%o |
Finds any values that start with "a" and ends with "o" |
Sessions
OUTPUT; DATA STRUCTURE;
List of returned session informations.
|
Offset |
I/O |
Type |
Description |
|---|---|---|---|
|
0 |
Output |
DECIMAL(10) |
Count of elemens |
|
4 |
Output |
ARRAY |
Offset to list of session |
List of session, there are up to 5000 elements supported.
|
Offset |
I/O |
Type |
Description |
|---|---|---|---|
|
0 |
Output |
DECIMAL(7) |
Session ID |
|
4 |
Output |
CHAR(14) |
Status |
|
19 |
Output |
CHAR(14) |
Module |
|
33 |
Output |
CHAR(14) |
Action |
|
47 |
Output |
CHAR(28) |
Session start |
|
75 |
Output |
CHAR(28) |
Session end |
|
103 |
Output |
CHAR(12) |
Duration |
|
115 |
Output |
CHAR(1026) |
Command |
|
1141 |
Output |
CHAT(1026) |
Server entry |
|
2167 |
Output |
CHAR(14) |
Job description |
|
2181 |
Output |
CHAR(14) |
Library |
|
2195 |
Output |
CHAR(4) |
Task |
|
2199 |
Output |
CHAR(52) |
Comment |
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
|
Code |
Message |
Message explanation |
Sample |
|---|---|---|---|
|
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 '9999' in the database! at com.menten.ieffect.rest.controller.LogbookController.getSession(LogbookController.java:110) |
|
401 |
The API Authentification was unsuccessful |
Authentication failed. |
|
Sample
In this sample API call in RPG-FREE, information for session 28130 will be requested.
returnCode = getSessions(token:
28130:
arrayOfFilterDS:
arrayOfSessionDS:
errorDS);
See Sample programs