Update Catalog¶
Update the Catalog’s name and description.
POST $CLOUDSIGMA_API_BASE/catalog/update
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First query the catalog list to obtain the target catalog ID.
Set the operation-specific values used in the request:
$CATALOG_ID: Catalog ID to update.
Request¶
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/update" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"id": '"$CATALOG_ID"',
"name": "<CATALOG_NAME>",
"description": "<CATALOG_DESCRIPTION>"
}'
Request body
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
Catalog ID. |
|
string |
Yes |
New name, must be a valid identifier. |
|
string |
No |
Updated description. |
Successful response¶
Returns 200 on success, data is null. Then read the details to confirm the change.
{
"code": "OK",
"msg": "OK",
"data": null
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
Fixed to |
Error response¶
{
"code": "ErrReadonlySystemCatalog",
"msg": "系统 Catalog 为只读",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The request body is invalid, the ID is invalid, or the name is not a valid identifier. |
Check |
|
|
The current identity does not have update permissions. |
Requesting permission to |
|
|
The new name is already used by other catalogs. |
Change the name and try again. |
|
|
Targets a read-only system catalog. |
Do not modify this Catalog. |
|
|
The server failed to update the Catalog. |
Try again later. |
Follow-up operations¶
Query Catalog details to confirm the change.