Delete SQL workbook

Delete a SQL save record and all its versions. It cannot be restored after deletion.

HTTP
POST $CLOUDSIGMA_API_BASE/workbook/delete

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

Deleting a saved SQL record cannot be undone.

$WORKBOOK_ID in the example below is the SQL saved record ID to be deleted, which can be obtained from the View Saved SQL response.

Request

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

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/workbook/delete" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d "{
    \"workbook_id\": \"$WORKBOOK_ID\"
  }"

Request body

ParameterTypeRequiredDescription
workbook_idstringRequiredThe ID of the SQL saved record.

Successful response

data is empty on success. You can then View saved SQL to confirm that the record will no longer appear.

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

The response fields are as follows.

Field

Type

Description

data

null

Fixed to null when deleted successfully.

Error response

JSON
{
  "code": 404,
  "message": "SQL 工作簿不存在"
}
FieldTypeDescription
codeinteger or stringError code or status.
messagestringError message.

Follow-up operations

View saved SQL, confirm target no longer appears.

Last updated on