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 |
|---|---|---|---|
|
string |
Yes |
The workspace ID to be updated. |
|
string |
Yes |
New workspace name. Cannot be empty. |
Successful response¶
JSON
{
"code": "OK",
"msg": "OK"
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
Error response¶
JSON
{
"code": "ErrParamInvalid",
"msg": "请求参数无效",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |
|
null |
The error response is |
Last updated on