Update SQL workbook name¶
Modifying the name of the SQL saved record will not modify the SQL content or version saved therein.
HTTP
POST $CLOUDSIGMA_API_BASE/workbook/update
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First list saved SQL records to obtain the workbook_id.
$WORKBOOK_ID in the example below is the ID of the SQL saved record and $WORKBOOK_NAME is the new name.
Request¶
Replace caller-specific values 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\"
}"
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
workbook_id | string | Required | The ID of the SQL saved record. |
name | string | Required | New name. |
Successful response¶
data is empty on success. You can then View saved SQL confirm the new name.
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¶
Use the same resource identifier View saved SQL version content to confirm the update result.
Last updated on