Skip to main content

"deleteIntegrationTable"

JSON hub "deleteIntegrationTable action deletes an existing FairCom Edge integration table as long as there are no dependencies on it

The "deleteIntegrationTables" action deletes an integration table as long as there are no dependencies on it.

  • A dependency occurs when an input plugin, output plugin, or a transform process uses the table.

  • If the table does not exist, it logs the error: "deleteIntegrationTables cannot delete table xxx because it does not exist."

  • If the table cannot be deleted, it logs the error: "deleteIntegrationTables cannot delete table xxx because yyy."

  • This action removes a table and all its data and connections/integrations.

  • This action cannot be used to delete MQTT integration tables because they are used by MQTT topics. Instead, use "deleteTopic".

Request examples

Delete one integration table request

{
  "api":  "hub",
  "requestId": "1",
  "action": "deleteIntegrationTables",
  "params": {
    "databaseName": "faircom",
    "tableNames": 
    [
      "test1"
    ]
  }
}
{
  "authToken": "anAuthorizationTokenFromTheServer",
  "requestId": "2",
  "api": "hub",
  "action": "deleteIntegrationTables",
  "params": {
    "databaseName": "faircom",
    "tableNames": [
      "test2",
      "test3"
    ]
  },
  "apiVersion": "1.0",
  "debug": "max"
}

Note

If the target object does not exist, the response returns success and the debug property contains a warning that the object was not found.

{
    "authToken": "anAuthorizationTokenFromTheServer",
    "result": {},
    "requestId": "1",
    "errorCode": 0,
    "errorMessage": ""
}
{
  "authToken": "anAuthorizationTokenFromTheServer",
  "result": {
    "data": [
    ]
  },
  "requestId": "1",
  "debugInfo": {
    "request": {
      "authToken": "anAuthorizationTokenFromTheServer",
      "api": "hub",
      "action": "deleteIntegrationTables",
      "params": {
        "databaseName": "faircom",
        "tableNames": [
          "test1"
        ]
      },
      "requestId": "1",
      "debug": "max"
    },
    "warnings": [
      {
        "code": 100,
        "message": "Integration table test1 not found."
      }
    ]
  },
  "errorCode": 0,
  "errorMessage": ""
}

Use the deleteIntegrationTables JSON API action to delete an existing FairCom Edge integration table as long as there are no dependencies on it

JSON hub APIAPI actionsjsonActionintegration tables actionsdelete integration tabledeleteIntegrationTables

The "params" property is an object that contains an action's parameters. Each action defines its own required and optional properties.

Properties summary

Table 1. "params" properties summary

Property

Description

Default

Type

Limits (inclusive)

databaseName

specifies the name of a database

Defaults to the "defaultDatabaseName" value that is set during "createSession". If no default is set during "createSession", then "faircom" is used.

string

1 to 64 bytes

ownerName

specifies the unique name of a schema in a database

""

string

1 to 64 bytes

tableNames

lists table names to return in the response message

Required - No default value

array



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 limits are from 0 to 64 bytes.

  • If the "databaseName" property is omitted or set to null, the server will use the default database name specified at login.

  • If no default database is specified during "createSession", "defaultDatabaseName" will be set to the "defaultDatabaseName" value that is specified in the services.json file.

The "ownerName" property is an optional string from 1 to 64 bytes that specifies the account that owns an object.

The "tableNames" property is a required array of strings. Each string is from 1 to 64 bytes.

  • Contains at least one string.

  • Each string is the name of a table.

  • A zero-length "tableName" is invalid.

  • A client should force the uniqueness of items in the array because the server ignores duplicate items.