Skip to main content

Table to JSON API reference

API reference for the table to JSON transform method

Request examples

Minimal request

{
    "api": "hub",
    "authToken": "AuthorizedToken",
    "action": "createTransform",
    "params": {
        "transformName": "TestTransform1",
        "transformActions": [
            {
                "inputFields": [
                    "In1"
                ],
                "outputFields": [
                    "Out1"
                ],
                "transformActionName": "tableFieldsToJson",
                "transformParams": {
                    "mapOfFieldsToProperties": [
                        {
                            "propertyPath": "In1",
                            "fieldName": "In1"
                        }
                    ]
                }
            }
        ]
    }
}
{
    "api": "hub",
    "apiVersion": "1.0",
    "requestId": "00000006",
    "authToken": "AuthorizedToken",
    "action": "createTransform",
    "params": {
        "transformName": "TestTransform1",
        "transformActions": [
            {
                "inputFields": [
                    "In1",
                    "In2",
                    "In3",
                    "In4",
                    "In5"
                ],
                "outputFields": [
                    "Out1"
                ],
                "transformActionName": "tableFieldsToJson",
                "transformParams": {
                    "metadata": {
                       "myTag": "my data"
                   }
               }
            }
        ]
    },
    "responseOptions": {
        "binaryFormat": "base64",
        "dataFormat": "arrays",
        "numberFormat": "number"
    }
}
{
    "authToken": "AuthorizedToken",
    "result": {},
    "requestId": "00000003",
    "errorCode": 0,
    "errorMessage": ""
}

API reference for the table to JSON transform method

API referenceJSON hub APItable API referencetable to JSONJSON transform

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"

specifies "transformAction" objects

Required - No default value

array of objects

"transformName"

specifies the name of a transform process. The name cannot be one of the FairCom-provided transform names

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.