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
| Parameter | Type | Required | Description |
|---|---|---|---|
workbook_id | string | Required | The 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 |
|---|---|---|
|
null |
Fixed to |
Error response¶
JSON
{
"code": 404,
"message": "SQL 工作簿不存在"
}
| Field | Type | Description |
|---|---|---|
code | integer or string | Error code or status. |
message | string | Error message. |
Follow-up operations¶
View saved SQL, confirm target no longer appears.
Last updated on