Skip to main content

"describeTransforms"

Abstract

describeTransforms returns all available information about each specified transform.

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

Request examples

Minimal request example

{
    "api": "hub",
    "apiVersion": "1.0",
    "authToken":  "anAuthorizationTokenFromTheServer",
    "requestId": "00000014",
    "action": "describeTransforms",
    "params": {
        "transformNames": [
            "SensorsTransform1"
        ]
    }
}

Response examples

Minimal response example

{
    "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": ""
}

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

"transformNames"

contains "transformName" strings

[]

array



"result"

Property summary

Table 2. "result" property summaries

Property

Description

Type

Limits (inclusive)

"data"

contains an array or object that the server returns, such as records returned by a query

Note

It is an empty array when there are no results available.

array

Its contents are determined by the action