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
{
"action": "listMqSessions",
"params": {},
"authToken": "replaceWithAuthTokenFromCreateSession"
}Maximal
{
"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"
}
Response example
Maximal
{
"authToken": "3Am1nttU8tj5j17SLy3RKexcaxuVN9YW8szWLpQdsy9yChXtKw3g2xKbcqbtJkr6",
"result": {
"data": [
{
"clientName": "client1",
"sessionType": "mqApi"
}
]
},
"requestId": "00000003",
}
Properties
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
connectionStatusFilter |
The |
Optional with default of []
|
array |
|
healthFilter |
The |
Optional with default of []
|
array |
|
label |
The A label is a tag that you can add to some objects, such as an MQTT topic or session. You can use list actions such as The |
Optional with default of null
|
object | "label": {
"group": "group name",
"name": "label name"
} |
|
label .group |
The The When you assign a group name to a label, the server automatically checks if the group name exists in the list of groups that the
|
Optional with default of ""
|
string | 1 to 64 bytes of UTF-8 encoded characters |
|
label .name |
The The The
|
Required - No default value | string | 1 to 64 bytes |
labelId |
The A label is a tag that you can add to some objects, such as an MQTT topic or session. You can use list actions such as The |
Optional with default of null
|
integer |
0 to 4294967296
|
partialClientName |
The |
Optional with default of ""
|
string | |
sessionStatusFilter |
The |
Optional with default of []
|
array |
|
sessionTypeFilter |
The |
Optional with default of []
|
array |
|
sortAscending |
The |
Optional with default of ""
|
string |
|
sortDescending |
The "fields": [
{
"sortDescending": true
}
] |
Optional with default of false
|
Boolean |
|
unsetHealthMeasures |
The |
Optional with default of true
|
Boolean |
|
Response properties ("result")
| Property | Description | Type | Limits (inclusive) |
|---|---|---|---|
data |
The |
array of objects | The action determines its contents. |
|
data .clientName |
The "Clientname" property uniquely identifies an MQ session. |
string | 0 to 65,550 bytes |
|
data .sessionType |
The "sessionType" property specifies which type of session the requested client is currently running. |
string |
|