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 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 |
tableNames |
The
|
Required - No default value |
array | 1 to 64 bytes |
Response properties ("result")
| Property | Description | Type | Limits (inclusive) |
|---|---|---|---|
data |
The |
array of objects | The action determines its contents. |