Request examples
Minimal
{
"api": "hub",
"apiVersion": "1.0",
"action": "createIntegrationTable",
"params": {
"tableName": "test1",
"fields": [
{
"name": "In1",
"type": "varchar"
},
{
"name": "Out1",
"type": "json"
}
],
"transformSteps": [
{
"transformStepMethod": "tableFieldsToJson",
"mapOfPropertiesToFields": [
{
"fieldName": "in1",
"recordPath": "out1.in1"
}
]
}
]
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}Maximal
The following example is not the maximal example for creating an integration table; rather, it is the maximal example for creating a table to JSON API transform.
{
"api": "hub",
"apiVersion": "1.0",
"action": "createIntegrationTable",
"params": {
"tableName": "test1",
"ownerName": "admin",
"databaseName": "faircom",
"fields": [
{
"name": "In1",
"type": "varchar"
},
{
"name": "In2",
"type": "float"
},
{
"name": "In3",
"type": "integer"
},
{
"name": "In4",
"type": "varchar"
},
{
"name": "Out1",
"type": "json"
},
{
"name": "Out2",
"type": "json"
}
],
"transformSteps": [
{
"transformStepMethod": "tableFieldsToJson",
"mapOfPropertiesToFields": [
{
"fieldName": "in1",
"recordPath": "out1.in1"
},
{
"fieldName": "in2",
"recordPath": "out1.in2"
}
]
},
{
"transformStepMethod": "tableFieldsToJson",
"mapOfPropertiesToFields": [
{
"fieldName": "in3",
"recordPath": "out2.in3"
},
{
"fieldName": "in4",
"recordPath": "out2.in4"
}
]
}
]
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
databaseName |
The You specify this property when you want to use a different database instead of the default. This property is useful because objects, such as tables and code packages, can have the same name in multiple databases. This feature allows you to create multiple environments in the same server and reuse the same JSON actions in each environment. For example, you can create It is an error to set If no default database is specified during |
Defaults to the session's "defaultDatabaseName" property |
string | 1 to 64 bytes |
fields |
The
"fields":
[
{
"name": "name",
"caseInsensitive": true,
"sortDescending": true,
"reverseCompare": false
}
] |
Required - No default value |
array of objects |
|
|
fields .name |
The The The
|
Required - No default value | string | 1 to 64 bytes |
|
fields .type |
The
Request example "fields": [
{
"name": "j",
"type": "number"
}
] |
Required - No default value | string |
|
ownerName |
The You specify this property when you want to use a different account instead of the default. Your session's account must have the appropriate privileges to access the code package. This property is useful because objects, such as tables and code packages, can have the same name in the same database as long as different accounts own each object. This feature allows you to create duplicate objects for different users on the same server and reuse the same JSON actions on those objects. For example, an administrator can copy objects from a production environment to her account so she can troubleshoot an issue using the same JSON actions, JavaScript, and SQL code. It is an error to set If no default owner is specified during |
Optional with default of the session's "defaultOwnerName" property |
string | 1 to 64 bytes |
tableName |
The See table name in System specifications for the table naming requirements and limitations.
"params": {
"tableName": "ctreeTable"
} |
Required - No default value | string | 1 to 64 bytes |
transformSteps |
The "transformSteps" property specifies an array of transform objects. |
Required - No default value | array of objects |
0 or more objects containing 1 or more of the following properties:
|
|
transformSteps .mapOfPropertiesToFields |
The
|
Optional with default of []
|
array |
|
|
transformSteps mapOfPropertiesToFields .fieldName |
The "fieldName" property specifies the name of a field in a table. |
Required - No default value | string | 1 to 64 bytes |
|
transformSteps mapOfPropertiesToFields .recordPath |
The
|
Required - No default value | string | 0 to 256 bytes |
|
transformSteps .transformStepMethod |
The "transformStepMethod" property specifies the type of transform, such as the "javascript" transform method that runs JavaScript to change the table's data, or the "jsonToTableFields" transform method that extracts values from properties in a JSON field and stores them in other fields. For more details, see "transformStepMethod". |
Required - No default value | string enum |
|
Response examples
Success
{
"result": {},
"requestId": "00000003",
"errorCode": 0,
"errorMessage": "",
"authToken": "replaceWithAuthTokenFromCreateSession"
}