The following API calls are available for the MQTT Distributor Module and can be executed within any of the available Ignition scopes.
APIs
system.cirruslink.distributor.createConfig(type, props) → void
Parameters
String type
Map props
Dictionary of properties making up the configuration with the following keys and datatypes:
Users
Id (long)
Username (str)
Password (str)
ACLs (str)
Return Value
A map representing the newly created configuration after it has been written to the database. (added 4.0.16)
system.cirruslink.distributor.readConfig(type) → List
Parameters
Return Value
A 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)
system.cirruslink.distributor.updateConfig(type, id, collisionPolicy, props) → void
Parameters
String type
Long id
The ID of the record to update
String collisionPolicy
"MergeOverwrite" or "Overwrite"
"MergeOverwrite" will replace the existing properties in the record ID with only those included in the call
"Overwrite" will replace all properties in the record ID with those in the call
Map props
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)
Return Value
A map representing the updated configuration after it has been written to the database. (added 4.0.16)
system.cirruslink.distributor.deleteConfig(type, id) → void
Parameters
String type
Long id
The ID of the record to delete
Return Value
True if the record was successfully deleted otherwise False is returned (added 4.0.16)