Basic Operations
The following
...
basic operations are available for the MQTT Distributor Module and can be executed within any of the available Ignition scopes
...
APIs
...
using the format system.cirruslink.distributor.operation
...
ParametersString typeMap propsDictionary of properties making up the configuration with the following keys and datatypes:UsersId (long)(cannot be null)Username (str)Password (str)ACLs (str)
Return ValueA map representing the newly created configuration after it has been written to the database. (added 4.0.16)
...
ParametersReturn ValueA List of Dictionaries of properties making up the configurations with the following keys and datatypes:
General
Id (long)Enabled (bool)EnableTCP (bool)Port (int)EnableWebsocket (bool)WebsocketPort (int)EnableTLS (bool)SecurePort (int)EnableSecureWebsocket (bool)SecureWebsocketPort (int)AllowAnonymousConnections (bool)
Users
Id (long)Username (str)Password (str)ACLs (str)
...
...
The ID of the record to update
...
- name, config, enabled, description)
- enabled (boolean) and description (string) are optional calls
- returns a dictionary that represents the config.json of the specified resource
- deleteConfig(type, name)
- getConfigNames(type, enabled)
- enabled is an optional call
- returns a list strings
- isConfigEnabled(type, name)
- readConfig(type, name)
- returns a dictionary that represents the config.json of the specified resource
- setConfigEnabled(type, name, enabled)
- updateConfig(type, name, collisionPolicy, config)
- returns a dictionary that represents the config.json of the specified resource
where:
- type
- string denoting the type of configuration to operate on
- name
- string denoting the unique name for the configuration resource to operate on
- config
- dictionary of properties making up the configuration resource to operate on
- enabled
- collisionPolicy
- string with options "MergeOverwrite" or "Overwrite"
- "MergeOverwrite" will replace the existing properties in the
...
- resource name with only those included in the call
- "Overwrite" will replace all properties in the
...
- resource name with those in the call
...
Dictionary of properties making up the configuration with the following keys and datatypes:General
Id (long)Enabled (bool)EnableTCP (bool)Port (int)EnableWebsocket (bool)WebsocketPort (int)EnableTLS (bool)SecurePort (int)EnableSecureWebsocket (bool)SecureWebsocketPort (int)AllowAnonymousConnections (bool)
Users
Id (long)Username (str)Password (str)ACLs (str)
| Note |
|---|
Configuration changes made through scripting do not have the same validation as when made through the UI. For example, deleting a Sets configuring that is being referenced by a Servers configuration will result in the UI showing an Internal Error |
Distributor 'type' keys
Distributor 'general' keys| enabled | boolean | Whether or not the configuration resource is enabled |
| name | string | The unique name for the configuration resource |
| enableDistributor | boolean | Whether to enable MQTT Distributor |
| enableTcp | boolean | Whether to enable plain TCP connections |
| port | integer | The standard (non-secure) MQTT port |
| enableWebsocket | boolean | Whether to enable Websocket connections |
| websocketPort | integer | The standard (non-secure) Websockets port |
| enableTls | boolean | Whether to enable TLS connections |
| securePort | integer | The secure MQTT port |
| allowAnonymousConnections | boolean | Whether or not to allow anonymous connections |
| customProperties | string | Custom/internal properties |
| enforceUniqueLwtTopic | boolean | Whether or not to enforce unique Will Message topics across MQTT clients |
| uniqueLwtTopicFilter | string | A comma separated list of topic filters to use to enforce unique Will Message topics |
Distributor 'user' keys
| enabled | boolean | Whether or not the configuration resource is enabled |
| name | string | The unique name for the configuration resource |
| password | string | The user password |
| ACLs | string | A comma separated list of ACL's |
...
A map representing the updated configuration after it has been written to the database. (added 4.0.16)
...
String typeLong idThe ID of the record to delete
...