"alterOutput"
The JSON Hub API "alterOutput"
action modifies a FairCom Edge output
"alterOutput"
alters, changes, modifies, updates, or configures an existing output connector in FairCom Edge. An output connector delivers data automatically to a device or software system.
The "alterOutput"
action alters an existing output connector in FairCom Edge to deliver data automatically to a device or software system. Before you can change an output, you must use "createOutput"
to create it.
You can change the source field of the integration table that supplies the data for the plugin.
You can change the data format of the source field.
You can change the settings of an integration.
You can change metadata to make the integration easier to locate.
You cannot change the plugin or the integration table.
You will need to create a new integration.
An integration connects data in the server to a plugin that delivers data from the server to external systems, such as connecting the integration table populated by OPC UA to the ThingWorx connector.
Note
Use
"configureTopic"
to connect MQTT to an existing integration table.
Request examples
Minimal request example
{ "api": "hub", "apiVersion": "1.0", "requestId": "00000001", "authToken": "anAuthorizationTokenFromTheServer", "action": "alterOutput", "params": { "outputName": "AcmefactoryLine1Station1AcidbathTelemetryOutput", "serviceName": "THINGWORX", "databaseName": "ctreeSQL", "tableName": "acmefactory_line1_station1_acidbath_telemetry", "sourceDataField": "t2" } }
{ "api": "hub", "apiVersion": "1.0", "requestId": "00000001", "authToken": "anAuthorizationTokenFromTheServer", "action": "alterOutput", "params": { "outputName": "AcmefactoryLine1Station1AcidbathTelemetryOutput", "serviceName": "THINGWORX", "databaseName": "ctreeSQL", "tableName": "acmefactory_line1_station1_acidbath_telemetry", "sourceDataField": "t2", "sourceDataFormat": "JSON", "metadata": { }, "settings": { } } }
Response examples
Minimal response example
Response example to the minimal request example goes here.
Failed response can go here if listed.
Maximal response example goes here.
"params"
The "params"
property is an object that contains an action's parameters. Each action defines its own required and optional properties.
Property summary
"params"
property summariesProperty | Description | Default | Type | Limits (inclusive) | |||||
---|---|---|---|---|---|---|---|---|---|
specifies the name of a database | Defaults to the | string |
| ||||||
exists primarily for the user interface to find integration information |
| object | May contain any number and type of user-defined properties | ||||||
| contains a unique name for mapping of an integration table to an output plugin to an external system | A FairCom generated name that follows the pattern | string |
| |||||
contains the name of a service that collects data from an external source and inserts it into an integration table | Required - No default value | string |
| ||||||
contains properties needed to configure the data source of the specified plugin |
| object | |||||||
| specifies the field that the MQTT Subscription engine should use as the payload when it sends the payload to subscribers | Required - No default value | string |
| |||||
| defines the format of the |
| string | One of the following:
| |||||
specifies the name of a table | Required - No default value | string |
|
The "databaseName"
property is an optional string that specifies the database that contains the tables. It defaults to the database name supplied at login.
Note
In the API Explorer, "defaultDatabaseName"
is set to "ctreeSQL"
in the "createSession"
action that happens at login.
A zero-length
"databaseName"
is invalid.Its limits are from 0 to 64 bytes.
If the
"databaseName"
property is omitted or set tonull
, the server will use the default database name specified at login.If no default database is specified during
"createSession"
,"defaultDatabaseName"
will be set to the"defaultDatabaseName"
value that is specified in theservices.json
file.
The "metadata"
property is an optional JSON object. It exists primarily for the user interface to find integration information. By default, it is an empty JSON object.
It contains a flexible set of properties.
It typically contains tags and description properties.
Example
{ "description": "", "tags": [""], "yourOwnProperties": "usage, purpose, notes, location, etc.", }
The "serviceName"
property contains the name of a FairCom input or output service. This property is required.
See the "params" topic of each specific service for the requirements of this property.
"MODBUS"
"SIEMENSUDT2JSON"
"OPCUA"
Note
The SQL, JSON RPC, and REST services can automatically query any integration table in FairCom's servers without requiring configuration.
Note
MQTT always represents both input and output services. This is because once a topic is created and assigned to an integration table, any MQTT client can publish messages to it and subscribe to those messages.
The "tableName"
property is an optional string that contains the name of an integration table or MQTT topic that holds the topic's messages. It defaults to an empty string.
You can use a topic name for an MQTT table because FairCom automatically generates a table name for each topic.
A
"tableName"
cannot begin with a number.It refers to the name of the integration table that stores a topic’s messages and is used to rename that table or assign a new topic to an existing integration table.
MQTT automatically creates an integration table for each new topic it receives. Thus, when a message is sent to a topic, FairCom Edge automatically creates a table to hold it.
As you refine your integration processes, you may want to rename an integration table to better label the data it holds. You can use the
"tableName"
property of the"configureTopic"
action to rename an integration table.The
"alterIntegrationTable"
action can also be used to rename an integration table, but it is less convenient because you must know the original name of the integration table.