Update folder¶
Update folder information. When name is provided it is checked to see if it is a valid identifier.
POST $CLOUDSIGMA_API_BASE/catalog/folder/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 file list to obtain the target folder ID. Prepare the personal access token, target workspace ID, and folder ID that can access the target workspace. The caller needs write access to the root volume.
Request body¶
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/folder/update" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"id": '"$FOLDER_ID"',
"name": "<FOLDER_NAME>",
"description": "<FOLDER_DESCRIPTION>"
}'
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
Folder ID. |
|
string |
No |
Update name when non-empty, must be a valid identifier. Omitting or empty string retains the original name. |
|
string |
No |
Update instructions when not empty. Omitting or empty string retains the original description and cannot be cleared by null value. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
When the update is successful, it is fixed to |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "name 无效"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
error message. |