Skip to main content
Skip table of contents

Get Sessions (getSessions) API

The Get Sessions (getSessions) API returns information about the specified session or a group of sessions.

Required Parameter Group:

PosNameI/OType
1API tokenInputchar(256)
2Session IDInputdecimal(7 0)
3FilterInputChar(*)
4SessionsOutputChar(*)
5Error codeI/OChar(*)

Service Program

To use this API, bind the following service program to your program module 

Service Program

Library

Thread safe

SERVICEAPIIEFFECTyes

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

OffsetI/OTypeDescriptionValid valuesSample
0InputCHAR(52)Filter field

sessionstart

sessionend

module

status

action

"sessionstart"
53InputCHAR(257)Filter value
"03.12.2018 09:52:54"
311InputCHAR(2)Filter comparison

eq - equal

ne - not equal

gt - greater

lt - less

ge - greater equal

le - less equal

ct - contains

"ge"
314InputCHAR(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 OperatorDescription
 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%oFinds any values that start with "a" and ends with "o"

Sessions

OUTPUT;  DATA STRUCTURE;

List of returned session informations.

OffsetI/OTypeDescription
0OutputDECIMAL(10)Count of elemens
4OutputARRAYOffset to list of session

List of session, there are up to 5000 elements supported.

OffsetI/OTypeDescription
0OutputDECIMAL(7)Session ID
4OutputCHAR(14)Status
19OutputCHAR(14)Module
33OutputCHAR(14)Action
47OutputCHAR(28)Session start
75OutputCHAR(28)Session end
103OutputCHAR(12)Duration
115OutputCHAR(1026)Command
1141OutputCHAT(1026)Server entry
2167OutputCHAR(14)Job description
2181OutputCHAR(14)Library
2195OutputCHAR(4)Task
2199OutputCHAR(52)Comment

Error code

I/O; CHAR(*)

The structure in which to return error information:

OffsetI/OTypeDescription
0OutputCHAR(1024)Message ID
1025OutputCHAR(1024)Message description
2049OutputCHAR(1024)Stack trace

Messages

All call to this API returns the following status and error messages

CodeMessageMessage explanationSample

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. 

JAVA
returnCode = getSessions(token: 
                         28130:
                         arrayOfFilterDS:
                         arrayOfSessionDS:
                         errorDS);     

See Sample programs


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.