Skip to main content

"alterTransform"

The "alterTransform" action renames and/or edits the properties of an existing transform process.

Request examples

Minimal request example

{
    "api": "hub",
    "apiVersion": "1.0",
    "requestId": "00000022",
    "authToken": "anAuthorizationTokenFromTheServer ",
    "action": "alterTransform",
    "params": {
        "transformName": "opc_transform2",
        "newTransformName": "opc_transform8",
        "transformActions": []
    }
}
{
    "api": "hub",
    "apiVersion": "1.0",
    "requestId": "00000016",
    "authToken": "anAuthorizationTokenFromTheServer ",
    "action": "alterTransform",
    "params": {
        "transformName": "transform_opc2",
        "newTransformName": "transform_opc5",
        "transformActions": [
        {
                "inputFields": [
                    "source_payload"
                ],
                "transformActionName": "jsonToTableFields",
                "transformParams": {
                    "targetDatabaseName": "ctreeSQL",
                    "targetTableName": "opc_sensor2",
                    "mapOfPropertiesToFields": [
                        {
                            "propertyPath": "temperature",
                            "name": "temperature",
                            "type": "REAL"
                        },
                        {
                            "propertyPath": "humidity",
                            "name": "humidity",
                            "type": "REAL"
                        },
                        {
                            "propertyPath": "pressure",
                            "name": "pressure",
                            "type": "REAL"
                        },
                        {
                            "propertyPath": "quality",
                            "name": "quality",
                            "type": "REAL"
                        }
                    ]
                }
            }
        ]
    }
}

Response examples

{
    "result": {},
    "requestId": "00000022",
    "errorCode": 0,
    "errorMessage": ""
}
{
    "result": {},
    "requestId": "00000016",
    "errorCode": 0,
    "errorMessage": ""
}

"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)

"metadata"

exists primarily for the user interface to find integration information

{}

object

May contain any number and type of user-defined properties

"newTransformName"

contains the name of a transform

Note

Cannot be one of the FairCom-provided transform names.

""

string

Minimum length: 0
Maximum length: 256

"transformActions"

contains "transformAction" objects

[]

array

"transformName"

contains the name of a transform process

Note

Cannot be one of the FairCom-provided transform names.

""

string

Minimum length: 0
Maximum length: 256


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 "transformActions" property is an optional array of "transformAction" objects. It defaults to an empty array.

Table 2. "transformAction" property summaries

Property

Description

Default

Type

Limits (inclusive)

"inputFields"

contains one or more of the fields in the integration table where the value of each of these fields is sent to the transform action as its primary input

Required - No default value

array

"outputFields"

contains one element which is the name of the field that will receive the JSON generated by the transform

Required - No default value

array

"transformActionName"

Contains the name of the transform action.  For example — "siemensUdtPayloadToJSON", "jsonPropertiesToTableFields", "tableFieldsToJson", "jsonToDifferentTableFields"

Required - No default value

string

Minimum length: 1
Maximum length: 64

"transformParams"

contains a unique set of parameters that configure its transformation process

Note

It may be an empty object or contain one or more properties needed by the "transformAction".

Required - No default value

object

Minimum length: 0
Maximum length: 65500

"transformService"

specifies the service that contains the transform

""

string

Any previously defined name of a transform service.