Drop Table

Drops a specified table. Company (tenant) or higher privileges are required to call this API.

HTTP Request

DELETE /api/sonar/tables/:table
Request using cURL
curl -H "Authorization: Bearer <API_KEY>" \
     -X DELETE https://HOSTNAME/api/sonar/tables/demo
Request Parameter
KeyRequiredTypeDescriptionNote
tableOStringTable nameCase-sensitive. Minimum 1 to maximum 50 characters
Note
Table names can only contain numbers, upper and lower case alphabets, and underscores.

Success Response

{}

Error Responses

Required argument is missing

HTTP status code 400

{
    "error_code": "null-argument",
    "error_msg": "table should be not null"
}
Invalid argument length

HTTP status code 400

{
    "error_code": "invalid-argument",
    "error_msg": "'table' must be shorter than or equal to 50 characters."
}
Invalid table name

HTTP status code 400

{
    "error_code": "invalid-argument",
    "error_msg": "'table' must begin with a letter and may contain alphanumeric and underscore characters: 0123"
}
No privilege to delete a table

HTTP status code 500

{
    "error_code": "illegal-state",
    "error_msg": "no-permission"
}
Table is not found

HTTP status code 500

{
    "error_code": "illegal-state",
    "error_msg": "table not found: test"
}