Skip to main content

"listIntegrationTables"

Abstract

listIntegrationTables lists the tables for a given database.

The "listIntegrationTables" action lists the tables for a given database.

Things to know

  • 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 request example

{
  "api":        "hub",
  "apiVersion": "1.0",
  "requestId":  "1",
  "authToken":  "anAuthorizationTokenFromTheServer",
  "action":     "listIntegrationTables",
  "params":     {}
}
{
  "api":        "hub",
  "apiVersion": "1.0",
  "authToken":  "anAuthorizationTokenFromTheServer",
  "requestId":  "2",
  "action":     "listIntegrationTables",
  "params":     {
    "databaseNameFilter": "faircom",
    "ownerName": "admin"
  }
}
{
  "api":        "hub",
  "apiVersion": "1.0",
  "authToken":  "anAuthorizationTokenFromTheServer",
  "requestId":  "3",
  "action":     "listIntegrationTables",
  "params":     {
    "databaseNameFilter": "faircom",
    "ownerName": "admin",
    "partialName": "mqtt_msg_faircomadmin_t"
  }
}

Response examples

Successful response example

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

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

"databaseNameFilter"

causes the server to include tables that match the value of the specified database name or, when an empty string, returns all tables

""

string

Minimum length: 1
Maximum length: 64

"ownerName"

contains the unique name of a schema in a database

""

string

Minimum length: 1
Maximum length: 64

"partialName"

filters the returned topics by applying partial matches to their names

""

string

Minimum length: 0
Maximum length: 64


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.

Things to know:
  • 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 specifies the account that owns an object.

Things to know:
  • The "ownerName" property is optional and has a dynamic default value.

  • If the "ownerName" property is omitted or set to null, the server uses the value of the "defaultOwnerName" property supplied during the "createSession" action.

  • If the "defaultOwnerName" property is not defined, the server uses the "admin" as the owner name.

  • The owner of an object has administrative rights over that object.

  • The "ownerName" property is a namespace for an object. You can think of it as a container of objects.

    The "ownerName" allows users to use any name for the objects they create — for example, a QA engineer may copy tables into their owner space to run a set of tests.

    It is common for a user to create their own copies of objects from other accounts for testing, troubleshooting, and fixing data. The copied objects can retain the same name because the "ownerName" distinguishes between them.

  • The fully qualified name of an object is the "databaseName", "ownerName", and the object's name, such as "tableName" meaning a FairCom server may contain many tables with the name "mytable" as long as each one is in a different database or in a different owner space.

    For example, an organization often creates different databases for different phases of the development lifecycle, such as dev, test, stage, ua, and prod. Each of these databases contains the same set of objects with the same names. Applications leave the "databaseName" out of their JSON actions and use the "defaultDatabaseName" property to specify the target database.

  • Queries and scripts are often written without specifying "databaseName" and/or "ownerName", allowing queries and scripts to work properly when run in different databases or in different schemas.

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.

Things to know:
  • A zero-length string matches all names.

  • The "partialName" property is used to filter results in several actions used to return lists.

"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