Delete SQL workbook¶
Delete a SQL workbook and all its versions.
POST $CLOUDSIGMA_API_BASE/workbook/delete
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region.
Prepare personal access token and target workspace ID that can access the target workspace. The token must have delete workbook permissions.
Query the SQL workbook list, select and record the workbook ID to be deleted.
Confirm that the workbook and its version are no longer needed.
Request body¶
Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, $WORKBOOK_ID in the example with actual values.
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\"
}"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The ID of the SQL workbook. |
Successful response¶
{
"code": 200,
"data": null
}
Field |
Type |
Description |
|---|---|---|
code |
integer |
200 on success. |
data |
null |
Fixed to null when deletion is successful. |
Error response¶
{
"code": 404,
"message": "SQL 工作簿不存在"
}
Field |
Type |
Description |
|---|---|---|
|
integer or string |
Error code or status code. |
|
string |
error message. |