GetSessionLog Method

Official Content

Syntax

GAMRepository.GetSessionLogs(in:GAMSessionLogFilter,out:GAMError Collection) : GAMSessionLog Collection


Description

This method returns all the sessions defined in the repository where the application is connected to.
It receives as a parameter a variable based on GAMSessionLogFilter external object which allows setting the filters for the search (date range, Initial IP Address, Status, UserGUID, etc).
It returns a collection of GAMSessionLog object which contains all the information on the session.
If any error is thrown by the method's execution, it can be handled by the second parameter of the method which is based on GAMError collection data type.

Example

&GAMSessionLogFilter.DateFrom  = &DateFrom
&GAMSessionLogFilter.DateTo  = &DateTo
&GAMSessionLogFilter.EndedFrom  = &EndedFrom
&GAMSessionLogFilter.EndedTo  = &EndedTo
&GAMSessionLogFilter.Limit   = &SessionsXPage
&GAMSessionLogFilter.Start = (&CurrentPage-1) * &GAMSessionLogFilter.Limit + 1

For &GAMSessionLog in GAMRepository.GetSessionLogs(&GAMSessionLogFilter, &Errors)
      &GAMSessionToken  = &GAMSessionLog.Token
      &GAMuserGUID   = &GAMSessionLog.User.GUID
      &name     = &GAMSessionLog.User.Name
Endfor

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.