Delete SQL workbook

Delete a SQL workbook and all its versions.

HTTP
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.

  1. Prepare personal access token and target workspace ID that can access the target workspace. The token must have delete workbook permissions.

  2. Query the SQL workbook list, select and record the workbook ID to be deleted.

  3. 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.

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\"
  }"

Parameter

Type

Required

Description

workbook_id

string

Yes

The ID of the SQL workbook.

Successful response

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

Field

Type

Description

code

integer

200 on success.

data

null

Fixed to null when deletion is successful.

Error response

JSON
{
  "code": 404,
  "message": "SQL 工作簿不存在"
}

Field

Type

Description

code

integer or string

Error code or status code.

message

string

error message.

Last updated on