Skip to main content

"listBrokerConnections" (JSON Action)

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

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

The "listBrokerConnections" JSON action retrieves and filters a list of broker connections by partial name or metadata content.

API actionsJSON MQ APIJSON Actionlist broker connectionlistBrokerConnectionJSON actionMQHubbroker connectionsfilter broker connectionsfilter connectionspartial name filtermetadata filtersearch broker connectionsfilter connections by namefilter connections by metadata

The "params" property is an object that contains an action's parameters. Each action defines its own required and optional properties. See System limits for a comprehensive look at property requirements and limitations.

Table 1. "params" property summaries

Property

Description

Default

Type

Limits (inclusive)

partialName

(optional) filters the returned topics by applying partial matches to their names

""

string

0 to 64 bytes

search

(optional) 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.