Skip to main content

"describeTransforms"

JSON transform "describeTransform" action returns all available information about each specified transform in FairCom MQ and FairCom Edge

The "describeTransforms" action returns all available information about each specified transform.

Request examples

Minimal request

{
    "api": "transform",
    "apiVersion": "1.0",
    "authToken":  "anAuthorizationTokenFromTheServer",
    "requestId": "00000014",
    "action": "describeTransforms",
    "params": {
        "transformNames": [
            "SensorsTransform1"
        ]
    }
}
{
    "result": {
        "data": [
            {
                "transformName": "SensorsTransform1",
                "apiVersion": 1,
                "transformActions": [
                    {
                        "transformActionName": "jsonToTableFields",
                        "transformParams": {
                            "targetTableName": "sensors",
                            "targetDatabaseName": "ctreeSQL",
                            "targetOwnerName": "admin",
                            "defaultDateFormat": "iso8601",
                            "defaultTimeFormat": "iso8601",
                            "defaultJsonBinaryFormat": "BASE64",
                            "mapOfPropertiesToFields": [
                                {
                                    "propertyPath": "gas_resistance_Ohms",
                                    "name": "quality",
                                    "type": "DOUBLE",
                                    "length": 8,
                                    "nullable": true
                                },
                                {
                                    "propertyPath": "humidity",
                                    "name": "humidity",
                                    "type": "DOUBLE",
                                    "length": 8,
                                    "nullable": true
                                },
                                {
                                    "propertyPath": "pressure_hPa",
                                    "name": "pressure",
                                    "type": "DOUBLE",
                                    "length": 8,
                                    "nullable": true
                                },
                                {
                                    "propertyPath": "sensor",
                                    "name": "sensor",
                                    "type": "VARCHAR",
                                    "length": 300,
                                    "nullable": true
                                },
                                {
                                    "propertyPath": "temperature_F",
                                    "name": "temperature",
                                    "type": "DOUBLE",
                                    "length": 8,
                                    "nullable": true
                                }
                            ],
                            "extractorLibraryName": "ctmqttjson",
                            "retentionPolicy": "autoPurge",
                            "retentionUnit": "day",
                            "retentionPeriod": 30
                        },
                        "inputFields": [
                            "source_payload"
                        ]
                    }
                ]
            }
        ]
    },
    "requestId": "00000014",
    "errorCode": 0,
    "errorMessage": ""
}

Use the describeTransforms JSON API action to return all available information about each specified transform

JSON transform APIAPI actionsjsonActiontransform actionsdescribe transformdescribeTransforms

The "params" property is an object that contains an action's parameters. Each action defines its own required and optional properties.

Properties summary

Table 1. "params" properties summary

Property

Description

Default

Type

Limits (inclusive)

transformNames

specifies "transformName" strings

[]

array



Properties summary

Table 2. "result" properties summary

Property

Description

Type

Limits (inclusive)

data

specifies an array or object that the server returns, such as records returned by a query. It is an empty array when no results are available.

array

Its contents are determined by the action