Update SQL workbook name

Updating the SQL workbook name does not modify the content or version of SQL saved in it.

HTTP
POST $CLOUDSIGMA_API_BASE/workbook/update

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 Update Workbook permission.

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

  3. Prepare a new workbook name.

Request body

Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, $WORKBOOK_ID, $WORKBOOK_NAME in the example with actual values.

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

The caller needs to have update permissions on the workbook, but does not have to be the owner. SQL data permissions are checked separately.

The name will be stripped of leading and trailing spaces. When the same owner already has a workbook with the same name, HTTP 409 is returned. This interface does not check for old versions, and repeated updates will also update the modification time.

Parameter

Type

Required

Description

workbook_id

string

Yes

The ID of the SQL workbook.

name

string

Yes

New name.

Successful response

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

Field

Type

Description

code

integer

200 on success.

data

null

Fixed to null when update 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.

Common HTTP errors

HTTP status

Error code

Common cause

Recommended action

400

400

Invalid request field, workspace, or operation precondition.

Fix the request parameters and submit again.

401

Unauthorized, ErrServiceUnavailable, ErrIAMExplicitRoleInvalid

Missing or invalid authentication credentials.

Check the credential type, expiration, and authentication header.

403

403

The current identity or active role does not have permission for this operation.

Use an authorized identity or contact an administrator to grant access.

404

404

The target object or required reference was not found.

Verify the object identifier, workspace, and current status.

409

409

Conflict in resource state, request payload, or concurrent modification.

Re-read the current state and version, then handle according to the latest result.

500

500

Internal processing failed; write operations may have been partially applied.

Retain request and trace details, and verify the current state before retrying.

503

503

A business, runtime, or authorization dependency is temporarily unavailable.

After the dependency recovers, check existing results first instead of blindly repeating writes.

Last updated on