Skip to main content

API reference

Request examples

Minimal request example

{
    "api": "hub",
    "action": "createTransform",
    "authToken": "AuthorizedToken",
    "params": {
        "transformName": "TestTransform2",
        "transformActions": [
            {
                "inputFields": [
                    "In1"
                ],
                "outputFields": [
                    "Out1"
                ],
                "transformActionName": "jsonToDifferentTableFields",
                "transformParams": {
                    "targetDatabaseName": "faircom",
                    "targetTableName": "test_out2",
                    "mapOfPropertiesToFields": [
                        {
                            "propertyPath": "out1",
                            "name": "out1",
                            "type": "VARCHAR",
                            "length": 200
                        }
                    ]
                }
            }
        ]
    }
}
{
    "api": "hub",
    "apiVersion": "1.0",
    "requestId": "00000006",
    "action": "createTransform",
    "authToken": "AuthorizedToken",
    "params": {
        "transformName": "TestTransform2",
        "transformActions": [
            {
                "inputFields": [
                    "In1"
                ],
                "outputFields": [
                    "Out1",
                    "Out2"
                ],
                "transformActionName": "jsonToDifferentTableFields",
                "transformParams": {
                    "targetDatabaseName": "faircom",
                    "targetTableName": "test_out2",
                    "mapOfPropertiesToFields": [
                        {
                            "propertyPath": "out1",
                            "name": "out1",
                            "type": "VARCHAR",
                            "length": 200
                        },
                        {
                            "propertyPath": "out2",
                            "name": "out2",
                            "type": "DOUBLE"
                        }
                    ]
                },
                "metadata": {
                    "myTag": "my data"
                }
            }
        ]
    },
    "responseOptions": {
        "binaryFormat": "base64",
        "dataFormat": "arrays",
        "numberFormat": "number"
    }

}

Response example

{
    "authToken": "AuthorizedToken",
    "result": {},
    "requestId": "00000007",
    "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

"transformActions"

contains "transformAction" objects

Required - No default value

array of objects

"transformName"

contains the name of a transform process

Required - No default value

string

Minimum length: 1
Maximum length: 64


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.