"alterOutput"
The JSON Edge 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 tags automatically to a device or software system. Before you can change an output, you must use "createOutput"
to create it.
Note
A tag is a piece of named data with an associated value. For example, the tag temperature 70
includes both the named data temperature
and the value 70
. In JSON, a tag is a JSON property, such as "temperature": 70
. In a SQL table, a tag is a data field, such as a field named temperature
with a value of 70
.
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 | 1 to 64 bytes | ||||||
exists primarily for the user interface to find integration information |
| object | May contain any number and type of user-defined properties | ||||||
outputName | specifies 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 | 1 to 64 bytes | |||||
specifies the name of a service that collects data from an external source and inserts it into an integration table | Required - No default value | string | 1 to 64 bytes | ||||||
contains properties needed to configure the data source of the specified plugin |
| object | |||||||
sourceDataField | 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 | 1 to 256 bytes | |||||
sourceDataFormat | specifies the format of the |
| string | One of the following:
| |||||
specifies the name of a table | Optional - No default value | string | 1 to 64 bytes |
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.
Property summary
Property | Description | Default | Type | Limits |
---|---|---|---|---|
"host" | contains the IP or hostname of the Rest resource, including the port | Required - No default | string | |
"uri" | contains the identifier name of the REST resource | Required - No default | string | |
"headers" | contains additional information about the request. It is a list of elements with the key-value format | Optional | List of strings with the format | |
"body" | contains information to send to a REST server. | Optional | array of objects | |
"body"."propertyPath" | specifies the name of data to be defined by "propertyValue". | [Required] No default | string | |
contains an array of properties that define the data of a named "propertyPath". | [Required] No default. | object | ||
"threshold" | contains properties that define the threshold for sending a REST command |
The "tableName"
property is a string containing the name of an integration table. In FairCom Edge, you can use "createInput"
to collect data from a device, and FairCom Edge will store the data in the specified integration table. You can also use "createOutput"
to connect an integration table to an output so FairCom Edge will push inserted data to external systems, such as REST endpoints and ThingWorx.
A table name may contain up to 64 ASCII characters and must not start with a number.
You must specify a non-empty string for an integration table name.
When creating an integration table, specify a non-empty string for a table name.
FairCom Edge and FairCom MQ automatically create an integration table for each new MQTT topic they process. The first characters in the table name are
"mqtt_msg_"
followed by the topic name. Because an MQTT topic can be 65500 bytes and a table name can be 64 bytes, the server may abbreviate the topic name.To better identify the data it holds, rename an integration using the
"tableName"
and"newTableName"
properties of the"alterIntegrationTable"
action.