Skip to main content

"alterOutput"

Abstract

alterOutput configures an existing integration.

The "alterOutput" action configures an existing integration.

Things to know

  • 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

Table 1. "params" property summaries

Property

Description

Default

Type

Limits (inclusive)

"databaseName"

contains the name of a database

Defaults to the "defaultDatabaseName" value that is set during "createSession"

string

Minimum length: 1
Maximum length: 64

"metadata"

exists primarily for the user interface to find integration information

{}

object

May contain any number and type of user-defined properties

"outputName"

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 "Output #n from <databaseName>.<schemaName>.<tableName> to <pluginName>"

string

Minimum length: 1
Maximum length: 64

"serviceName"

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

Minimum length: 1
Maximum length: 64

"settings"

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

Minimum length: 1
Maximum length: 256

"sourceDataFormat"

defines the format of the "source_payload" field

"json"

string

One of the following:

"binary"
"jpeg"
"json"
"siemensUdt"
"xml"

"tableName"

contains the name of a table

Required - No default value

string

Minimum length: 1
Maximum length 64


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.

Things to know:
  • A zero-length "databaseName" is invalid.

  • Its limits are from 0 to 64 bytes.

  • If the "databaseName" property is omitted or set to null, 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 the services.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.

Things to know:
  • 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's servers input or output service. This property is required.

The following services are available as of the V5 release:
  • "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.

Things to know:
  • 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.