Skip to main content
Version: Next

Session info

Session info ( sessionId : Integer ) : Object

ParameterTypeDescription
sessionIDIntegerSession ID
ResultObjectInformation about the session
History
ReleaseChanges
20 R8Support of standalone sessions
20 R7Added

Description

The Session info command returns an object describing the session whose ID you pass in the sessionID parameter.. If you pass an invalid sessionID, the command returns a null object.

The returned object contains the following properties:

PropertyTypeDescription
typeTextSession type: "remote", "storedProcedure", "standalone"
userNameText4D user name (same value as Session.userName)
machineNameTextRemote sessions: name of the remote machine. Stored procedures session: name of the server machine. Standalone session: name of the machine
systemUserNameTextRemote sessions: name of the system session opened on the remote machine.
IPAddressTextIP address of the remote machine
hostTypeTextHost type: "windows" or "mac"
creationDateTimeDate ISO 8601Date and time of session creation. Standalone session: date and time of application startup
stateTextSession state: "active", "postponed", "sleeping"
IDTextSession UUID (same value as Session.id)
persistentIDTextRemote sessions: Session's persistent ID
note

This command returns the .info property of the sessionID session. To get information about the current session, you can directly call Session.info.

Here is an example of output object:


{
"ID": "3C81A8D7AFE64C2E9CCFFCDC35DC52F5",
"userName": "Designer",
"machineName": "My Computer",
"systemUserName": "John Doe",
"IPAddress": "localhost",
"hostType": "mac",
"type": "remote",
"state": "active",
"creationDateTime: "2024-09-10T09:55:54.787Z",
"persistentID:"8FFDAE519F1F4DCDB81E8E8DB00AD101"
}

Example


var $session : Object
var $id : Integer
$session:=Session info($id)

See also

Session class Session Session storage
Process info