Skip to main content

"listMqSessions" (jsonAction)

Use the "listMqSessions" action to view a list of sessions that match the "partialClientName"

The "listMqSessions" action returns a list of all MQ sessions that match the "partialClientName". If "partialClientName" is omitted or set to null, it returns all MQ sessions, including those created by MQTT and the MQ API.

Request examples

Minimal

{
  "api": "mq",
  "action": "listMqSessions",
  "params": {},
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
{
  "api": "mq",
  "action": "listMqSessions",
  "params":
  {
    "partialClientName": "",
    "connectionStatusFilter": [ 
      "disconnected", 
      "connected", 
      "connectedTemporarily" 
    ],
    "sessionStatusFilter": [ 
      "normal", 
      "banned", 
      "hidden",
      "inactive" 
    ],
    "sessionTypeFilter": [ "mqtt", "mqApi" ],
    "healthFilter": [ "healthy", "unhealthy", "offline" ],
    "unsetHealthMeasures": true,
    "sortDescending": "lastConnect|lastDisconnect|clientName|ipAddress",
    "sortAscending": "lastConnect|lastDisconnect|clientName|ipAddress",

    "labelId": 423,

    "label": {
      "group": "group name",
      "name": "label name"
    }
  },
  "apiVersion": "1.0",
  "debug": "max",
  "requestId": "optionalUniqueRequestIdFromTheClient",
  "authToken": "replaceWithAuthTokenFromCreateSession"
}

Use the "listMqSessions" action to view a list of sessions that match the "partialClientName"

listMqSessionslist Mq SessionjsonActionMQ API
Table 1. "params" property summaries

Property

Description

Default

Type

Limits (inclusive)

connectionStatusFilter

(optional) filters the returned sessions by connection status

[]

array

"disconnected"
"connected"
"connectedTemporarily"

healthFilter

(optional) filters the returned sessions by health status

[]

array

"healthy"
"unhealthy"
"offline"

partialClientName

(optional) specifies which sessions to return from the "listMqSessions" action

""

string

sessionStatusFilter

(optional) filters the returned sessions by session status

[]

array

"normal"
"banned"
"hidden"

sessionTypeFilter

(optional) filters the returned sessions by session type

[]

array

"mqtt"
"mqApi"

sortAscending

(optional) sorts the returned sessions in ascending order based on the last time the sessions connected or disconnected, the sessions' "clientName" properties, or the sessions' IP addresses

""

string

"lastConnect"
"lastDisconnect"
"clientName"
"ipAddress"

sortDescending

(optional) sorts the returned sessions in descending order based on the last time the sessions connected or disconnected, the sessions' "clientName" properties, or the sessions' IP addresses

""

string

"lastConnect"
"lastDisconnect"
"clientName"
"ipAddress"

unsetHealthMeasures

(optional) specifies whether or not to include sessions without health measures in the response

true

Boolean

true
false


The "connectionStatusFilter" property is an optional array that filters the returned sessions by the selected connection statuses.

The "healthFilter" property is an optional array that filters the returned sessions by the selected health statuses.

The "partialClientName" property is a string that is used to specify which sessions to return from the "listMqSessions" action. This property behaves as a "begins with" search.

The "sessionStatusFilter" property is an optional array that filters the returned sessions by the selected session statuses.

The "sessionTypeFilter" property is an optional array that filters the returned sessions by the selected session types.

The "sortAscending" property is an optional string that sorts the returned sessions in ascending order based on the last time the sessions connected or disconnected, the sessions' "clientName" properties, or the sessions' IP addresses.

The "sortDescending" property is an optional string that sorts the returned sessions in descending order based on the last time the sessions connected or disconnected, the sessions' "clientName" properties, or the sessions' IP addresses.

The "unsetHealthMeasures" property is an optional Boolean that specifies whether or not to include sessions without health measures in the response.