Delete table

Delete the specified table. This operation is irreversible; please confirm that the data in the table is no longer needed before executing it.

POST https://moi.matrixorigin.cn/newmoi/meta/table/drop

Preparation before calling

Prepare your personal access token, workspace ID, database name, and table name with delete permissions on the target table. You can first query the table in the database to confirm the name.

The examples below use $AI_STUDIO_API_KEY, $WORKSPACE_ID, $DATABASE, and $TABLE.

Request body

Replace caller-specific values in the example with actual values.

db_namestringRequired
The name of the database where the table is located.
table_namestringRequired
The name of the table to delete.

Request example

curl -X POST "https://moi.matrixorigin.cn/newmoi/meta/table/drop" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d "{\"db_name\":\"$DATABASE\",\"table_name\":\"$TABLE\"}"

Successful response

{"code":200,"data":null}

The response fields are as follows.

Field

Type

Description

code

integer

200 on success.

data

null

This operation does not return a result object.

A successful response does not return an object. Then query the table in the database to confirm that the table no longer appears.

Error response

codeinteger or string
Error code or status.
messagestring
Error message.

Error response example

{
  "code": 400,
  "message": "db_name 不能为空"
}

Follow-up operations

View table field, confirm that the target no longer appears.

Last updated on