deleteIntegrationTables

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

{
  "requestId": "1",
  "action": "deleteIntegrationTables",
  "params": {
    "databaseName": "faircom",
    "tableNames": 
    [
      "test1"
    ]
  }
}
 
 

Delete multiple integration tables

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

 

Response examples

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.

Success

{
    "result": {},
    "requestId": "1",
    "errorCode": 0,
    "errorMessage": "",
    "authToken": "replaceWithAuthTokenFromCreateSession"
}
 
 

Delete a nonexistent table failure

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

 

Properties

Request properties ("params")

Property Description Default Type Limits (inclusive)

databaseName

The "databaseName" property specifies the database that contains an object, such as a table or code package. If it is set to null or is omitted, it defaults to the default database of the JSON Action session, see "createSession" and the "defaultDatabaseName" property. 

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 "dev", "test", "stage", and "prod" databases on the same server and use the "defaultDatabaseName" or "databaseName" properties to specify the desired environment.

It is an error to set "databaseName" to the empty string "".

If no default database is specified during "createSession", the server sets the "defaultDatabaseName" to the "defaultDatabaseName" value specified in the services.json file.

Defaults to the session's "defaultDatabaseName" property string 1 to 64 bytes

tableNames

The "tableNames" property specifies multiple table names.

Note See table name in System limits for table naming requirements and limitations.

  • Contains at least one string.
  • A zero-length "tableName" is invalid.
  • A client should force the uniqueness of items in the array because the server ignores duplicate items.
  • Including table names that do not exist will not result in an error. However, the "warnings" array in the reply will contain an object for each missing table.

Required - No default value

array 1 to 64 bytes

 

Response properties ("result")

Property Description Type Limits (inclusive)

data

The "data" property contains a response message. Its contents are defined by the action. It is an empty array when no results are available. The following is an example of the data property from a code package action.

  "result": {
    "data": [
      {
        "codeId": 6,
        "databaseName": "faircom",
        "ownerName": "admin",
        "codeName": "convertAndCategorizeTemperature",
        "codeVersion": 1,
        "clonedCodeId": 1,
        "codeStatus": "active",
        "codeLanguage": "javascript",
        "serviceName": "javascript",
        "codeType": "module",
        "description": "optional new description",
        "metadata": {},
        "createdBy": "ADMIN",
        "createdOn": "2025-08-25T21:48:38.109",
        "updatedBy": "ADMIN",
        "updatedOn": "2025-08-25T21:48:38.109",
        "comment": "Cloned from convertTemperature",
        "codeFormat": "utf8"
      },
    ]
array of objects The action determines its contents.