Update a workspace

Modify the name of the existing workspace.

HTTP
PATCH $CLOUDSIGMA_API_BASE/workspaces/{id}

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 workspace list to confirm the workspace to be modified. Prepare personal access token and workspace ID.

Path parameters and request body

Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID and $WORKSPACE_NAME with actual values.

Shell
curl -X PATCH "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "'"$WORKSPACE_NAME"'"
  }'

Parameter

Type

Required

Description

id

string

Yes

The workspace ID to be updated.

name

string

Yes

New workspace name. Cannot be empty.

Successful response

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

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

data

null

The error response is null.

Last updated on