Update Catalog

Update the Catalog’s name and description.

HTTP
POST $CLOUDSIGMA_API_BASE/catalog/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. First query the catalog list to obtain the target catalog ID. Prepare the personal access token, target workspace ID, and Catalog ID that can access the target workspace.

Request body

Shell
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>"
  }'

Field

Type

Required

Description

id

integer

Yes

Catalog ID。

name

string

No

Update name when non-empty, must be a valid identifier. Omitting or empty string retains the original name.

description

string

No

Update instructions when not empty. Omitting or empty string retains the original description and cannot be cleared by null value.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": null
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

null

When the update is successful, it is fixed to null.

Error response

JSON
{
  "code": "ErrReadonlySystemCatalog",
  "msg": "系统 Catalog 为只读"
}

Field

Type

Description

code

string

error code.

msg

string

error message.

Last updated on