i-effect Manual

Get Sessions Activities Message (getSessionsActivitiesMessage) API

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

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

Messages

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 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

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"

Messages

OUTPUT;  DATA STRUCTURE;

List of returned message informations.

Offset

I/O

Type

Description

0

Output

DECIMAL(7)

Session ID

4

Output

DECIMAL(10)

Count of elemens

8

Output

ARRAY

Offset to list of messages

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

Offset

I/O

Type

Description

0

Output

CHAR(52)

Action

53

Output

CHAR(28)

Timestamp

81

Output

CHAR(12)

Rating

93

Output

CHAR(7)

Message ID

100

Output

CHAR(136)

Message

236

Output

CHAR(1026)

Long message

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 '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