Skip to main content

"listBrokerConnections"

JSON MQ and Hub "listBrokerConnections" action returns and filters a list of broker connections

The "listBrokerConnections" action lists all available broker connections that have been created.

  • You can return a filtered list by specifying a partial name in the "partialName" property.

  • You can include additional items in the list by searching for words contained in the item’s metadata.

Request examples

Minimal request

{
  "api":        "mq",
  "action":     "listBrokerConnections",
  "authToken":  "replaceWithAuthTokenFromCreateSession"
}
{
  "api": "mq",
  "action": "listBrokerConnections",
  "authToken": "replaceWithAuthTokenFromCreateSession",
  "apiVersion": "1.0",
  "requestId": "2",
  "params": {
    "partialName": "M",
    "search": ""
  }
}
{
    "result": {
        "brokerConnectionNames": [
            "MqttBroker1"
        ]
    },
    "requestId": "1",
    "errorCode": 0,
    "errorMessage": ""
}

The listBrokerConnections action lists all available broker connections that have been created

API actionsJSON MQ APIjsonActionlist broker connectionlistBrokerConnection

The "params" property is an object that contains an action's parameters. Each action defines its own required and optional properties.

Properties summary

Table 1. "params" properties summary

Property

Description

Default

Type

Limits (inclusive)

partialName

filters the returned topics by applying partial matches to their names

""

string

0 to 64 bytes

search

searches the content of the "metadata" property that is part of each topic and integration table

""

string

0 to 64 bytes



The "search" property is an optional string that searches the content of the "metadata" property that is part of each topic and integration table.

  • If there is nothing in the "metadata" property for a topic or an integration table, there is nothing to search for, resulting in an empty array in the "data" property in the response.

  • The "metadata" property is a JSON field, meaning you can put a valid JSON in it — for example, a string or object.

Properties summary

Table 2. "result" properties summary

Property

Description

Type

Limits (inclusive)

brokerConnectionNames

contains a list of "brokerConnectionName" strings

array



The "brokerConnectionNames" property is a required array that contains a list of "brokerConnectionName" strings. It defaults to an empty array.

  • Must contain at least one string.

  • Each string is the name of a table.

  • A zero-length string is invalid.

  • A client should force uniqueness of the items in the array because the server ignores duplicate items.