Skip to main content
Skip table of contents

Get Sessions Activities Message (getSessionsActivitiesMessage) API

The Get Sessions Activities Message (getSessionsActivitiesMessage) API returns information about messages of a specified session.

Required Parameter Group:

PosNameI/OType
1API tokenInputchar(256)
2Session IDInputdecimal(7 0)
3FilterInputChar(*)
4MessagesOutputChar(*)
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 retrieved..

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"

Messages

OUTPUT;  DATA STRUCTURE;

List of returned message informations.

OffsetI/OTypeDescription
0OutputDECIMAL(7)Session ID
4OutputDECIMAL(10)Count of elemens
8OutputARRAYOffset to list of messages

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

OffsetI/OTypeDescription
0OutputCHAR(52)Action
53OutputCHAR(28)Timestamp
81OutputCHAR(12)Rating
93OutputCHAR(7)Message ID
100OutputCHAR(136)Message
236OutputCHAR(1026)Long message

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 '99999' 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, messages for session 28130 will be requested. 

JAVA
returnCode = getSessionsActivitiesMessage(token:
                                          28130:
                                          arrayOfFilterDS:
                                          arrayOfMessagesDS:
                                          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.