"listSessions"
JSON ADMIN "listSessions"
action returns a list of active sessions
The "listSessions"
action returns a list of active sessions that the logged-in account is authorized to see. The list can be filtered to include sessions from specific usernames.
Request examples
Minimal request
{ "api": "admin", "authToken": "anAuthorizationTokenFromTheServer", "action": "listSessions" }
{ "requestId": "2", "authToken": "anAuthorizationTokenFromTheServer", "api": "admin", "action": "listSessions", "params": { "usernameFilter": [ "jim" ] }, "responseOptions": { "binaryFormat": "hex", "dataFormat": "objects", "numberFormat": "string" }, "apiVersion": "1.0", "debug": "max" }
{ "result": { "sessions": [ { "authToken": "anAuthorizationTokenFromTheServer", "username": "ADMIN", "description": "optional user description of session for troubleshooting" } ] }, "requestId": "00000045", "errorCode": 0, "errorMessage": "" }
{ "authToken": "invalidAuthtoken", "requestId": "2", "debugInfo": { "request": { "authToken": "invalidAuthtoken", "api": "admin", "action": "listSessions", "requestId": "2" } }, "errorCode": 12031, "errorMessage": "'authToken' does not match any existing session. Use a valid 'authToken' or use 'createSession' to create a valid 'authToken'." }
Use the listSessions API action to return a list of active sessions that the logged-in account is authorized to see
The "params"
property is an object that contains an action's parameters. Each action defines its own required and optional properties.
Properties summary
"params"
properties summaryProperty | Description | Default | Type | Limits (inclusive) |
---|---|---|---|---|
usernameFilter | contains strings of usernames of accounts in order to filter a list of sessions |
| array | 1 to 64 bytes |
The "result"
property is a required object set by the server that contains the result of an action.
It is a required part of the jsonAction specification standard.
Its properties vary with each action.
Properties summary
"result"
properties summaryProperty | Description | Type | Limits (inclusive) | |||||
---|---|---|---|---|---|---|---|---|
contains session objects where each session minimally describes a session | array of objects | |||||||
| signifies that the client is authenticated and authorized | string | 0 to 225 bytes | |||||
| specifies the default value for the | string |
| |||||
| specifies the default value of the | string | 1 to 64 bytes | |||||
| specifies a default value for | object | ||||||
| specifies the initial value of the | string | 0 to 256 bytes | |||||
| specifies an object for later identification | string | 0 to 65,500 bytes | |||||
| specifies the name of the host device | string | ||||||
| specifies the universal identifier of the server instance | string | ||||||
| specifies the IP addresses of the host | array of strings | ||||||
| specifies the server's ISAM port or server name | string | ||||||
| contains the server's SQL port | string | ||||||
| specifies the number of seconds that a session with no activity will stay open | integer |
| |||||
| specifies the number of seconds to keep a cursor open | integer |
| |||||
| specifies the UTC date and time (in ISO 8601 format) when the session was created | string | ||||||
| specifies the UTC date and time (in ISO 8601 format) when the session last received a JSON Action message, including the last time the session was pinged | string | ||||||
| specifies the account name of a user or application | string | 1 to 64 bytes |
The "sessions"
property is an array of session objects where each session object minimally describes a session.