"listIntegrationTables" (JSON Action)
JSON hub "listIntegrationTable action lists all existing tables for a given database
The "listIntegrationTables" action lists the tables for a given database.
This action lists only integration tables. To list other tables, use the
"listTables"action in the JSON DB API.You can do the following:
You can return all integration tables by omitting all properties from the
"params"object.You can return tables that match a specific database and owner by specifying the optional
"databaseNameFilter"and"ownerName"properties. These two properties must be used together.You can return tables that match the partial table name specified in the optional
"partialName"property. Using"partialName"also requires specifying the database and owner in the"databaseNameFilter"and"ownerName"properties. These three properties must be used together.
Request examples
List all integration tables
{
"api": "hub",
"apiVersion": "1.0",
"requestId": "1",
"action": "listIntegrationTables",
"params": {},
"authToken": "replaceWithAuthTokenFromCreateSession"
}{
"api": "hub",
"apiVersion": "1.0", "requestId": "2",
"action": "listIntegrationTables",
"params": {
"databaseNameFilter": "faircom",
"ownerName": "admin"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}{
"api": "hub",
"apiVersion": "1.0",
"requestId": "3",
"action": "listIntegrationTables",
"params": {
"databaseNameFilter": "faircom",
"ownerName": "admin",
"partialName": "mqtt_msg_faircomadmin_t",
"transformNameFilter": "myIntegrationTableTransform"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}{
"result": {
"data": [
{
"databaseName": "faircom",
"ownerName": "admin",
"tableName": "mqtt_msg_faircomadmin_connections"
},
{
"databaseName": "faircom",
"ownerName": "admin",
"tableName": "mqtt_msg_faircomadmin_subscribers"
},
{
"databaseName": "faircom",
"ownerName": "admin",
"tableName": "mqtt_msg_faircomadmin_topics"
}
]
},
"requestId": "1",
"errorCode": 0,
"errorMessage": "",
"authToken": "replaceWithAuthTokenFromCreateSession"
}Use the listIntegrationTables JSON API action to list all existing tables for a given database
The "params" property is an object that contains an action's request parameters as defined by a set of properties. Each action defines its own required and optional properties. See System limits for a comprehensive overview of property requirements and limitations.
"params" property summariesProperty | Description | Default | Type | Limits (inclusive) | ||
|---|---|---|---|---|---|---|
(optional) filters the returned topics based on the presence of transform steps. |
| Boolean |
| |||
(optional) causes the server to include tables that match the value of the specified database name or, when an empty string, returns all tables. |
| string | 1 to 64 bytes | |||
(optional) specifies the unique name of a schema in a database. |
| string | 1 to 64 bytes | |||
(optional) filters the returned topics by applying partial matches to their names. |
| string | 0 to 64 bytes | |||
(optional) filters the list to return integration tables assigned to the transform. |
| string | 1 to 64 bytes |
The "containsTransformSteps" property is an optional Boolean that filters the response based on the presence of transform steps. When set to true, the response will include any tables with at least one transform step. When set to null, the response includes tables regardless of the presence of transform steps.
The "databaseNameFilter" property is an optional string that, when set to a non-empty string, causes the server to include tables that match the entire value of the specified database name, such as "faircom". It defaults to an empty string.
When
"databaseNameFilter"is set to an empty string, an action will return tables from all databases.When the value of
"databaseNameFilter"is a non-empty string, it must be set to a valid database name."databaseNameFilter"is case-insensitive.When the
"partialName"property is present, the"databaseNameFilter"and"partialName"properties must be set to valid database and owner names.
The "ownerName" property is an optional string from 1 to 64 bytes that identifies the user who owns an object (see Object owner). If it is omitted or set to "" or null, the server uses the default owner name supplied during the "createSession" action or uses the account's "username" as the owner name.
"params": {
"ownerName": "SuperUser"
}
The "partialName" property is an optional string that causes the server to include items in the result when the beginning of their names match the "partialName" value. It defaults to an empty string.
A zero-length string matches all names.
The
"partialName"property is used to filter results in several actions used to return lists.
The "transformNameFilter" property is an optional string that specifies which assigned transform the response will be filtered by. If no integration tables are assigned to the transform, the action returns no tables. If omitted or set to null, the "listIntegrationTables" action will not filter by transform name.
"result" property summariesProperty | Description | Type | Limits (inclusive) | ||
|---|---|---|---|---|---|
is an array of objects or arrays. Each item in the array describes a record. The array is empty if no results are available. | array | The action determines its contents. | |||
| specifies the name of a database. | string | 1 to 64 bytes | ||
| specifies the name of the account that owns the integration table. | string | 1 to 64 bytes | ||
| specifies the name of a table. | string | 1 to 64 bytes |
The "data" property is an array of objects or arrays that contain information about the database. The "dataFormat" property specifies whether the content is arrays or objects. The initiating action defines the data contents. In results messages, when no results are available, it is empty. For path formats, see "path".
Examples
arrays
"data": [ ["test1", ".\\test1.dbs\\SQL_SYS", 1003] ]
objects
"data":
[
{
"databaseName": "test7",
"path": ".\\test7.dbs\\SQL_SYS",
"uid": 1015
}
]
The "databaseName" property is an optional string that specifies the database that contains the tables. It defaults to the database name supplied at login.
Note
In the API Explorer, "defaultDatabaseName" is set to "ctreeSQL" in the "createSession" action that happens at login.
A zero-length
"databaseName"is invalid.Its length limit is from 0 to 64 bytes.
If the
"databaseName"property is omitted or set tonull, the server will use the default database name specified at login.If no default database is specified during
"createSession","databaseName"will be set to the"defaultDatabaseName"value that is specified in theservices.jsonfile.
"params": {
"databaseName": "mainDatabase"
}
The "ownerName" property is an optional string from 1 to 64 bytes that specifies the account that owns an object, such as a table or code package. If it is set to null or is omitted, it defaults to the account that created the JSON Action session, see "createSession" and the "defaultOwnerName" property.
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 "ownerName" to the empty string "".
If no default owner is specified during "createSession", the server sets the "defaultOwnerName" to the "defaultOwnerName" value specified in the services.json file.
The "tableName" property contains the name of the table in the database where the event occurred. It is a non-zero-length string.
See table name in System limits for table naming requirements and limitations.
A table in DBnotify is defined by "databaseName", "ownerName" and "tableName" or by "dataFilePath".