Update channel instance¶
Partially updates an already created channel instance. Fields not provided remain unchanged.
PATCH $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/channels/{provider}/instances/{instance_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 channel instance details and confirm the instance to be updated. Prepare the personal access token, target workspace ID, channel provider ID, and instance ID that can access the target workspace.
Request body¶
curl -X PATCH "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/channels/$PROVIDER/instances/$INSTANCE_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"name": "生产告警通道"
}'
When channel_type is provided, it must be consistent with the saved channel type.
Path parameters
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
workspace ID. |
|
string |
Yes |
Channel provider ID. |
|
string |
Yes |
Channel instance ID. |
|
integer |
No |
Check the current version when it is greater than 0. 0 or omitted does not enable this caller version condition. |
Query parameters
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
The channel type within the Provider. Must be provided consistent with the saved type. |
|
string |
No |
Instance name. |
|
string |
No |
Example description. |
|
object |
No |
Non-sensitive configuration. |
|
object |
No |
Keys and other sensitive configuration. |
|
string |
No |
Visible range. |
|
object |
No |
Tag key-value pairs. |
channel_type cannot be modified after creation. config Key merging, when the value is an empty string, the key is deleted, but the required configuration cannot be cleared. Keep the original value when filling in null.
Saved credentials are retained when secrets is blank. labels is replaced as a whole, cleared when {} is filled in, and retained when null is filled in.
An empty PATCH request also increments the version. When updating the search channel, a non-empty API Key will rotate credentials and clear the test information. Only changing other configurations will retain the test information. After other channels are updated, the recent test information will be cleared. If the version does not match, HTTP 409 will be returned.
Successful response¶
{
"code": 0,
"data": {
"id": "inst_01",
"workspace_id": "ws_01",
"provider": "wecom",
"channel_type": "wecom_mail",
"name": "生产告警通道",
"status": "active",
"credential_ref": "cred_01",
"created_at": "2026-10-14T00:00:00Z",
"updated_at": "2026-08-18T01:00:00Z",
"version": 1,
"config": {
"provider": "wecom",
"channel_type": "wecom_mail",
"email": "alerts@example.com",
"timeout_seconds": "30"
}
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
object |
response data. |
|
string |
Object ID. |
|
string |
The workspace ID to which it belongs. |
|
string |
Provider ID. Values: |
|
string |
Channel type. Values: |
|
string |
Name. |
|
string |
Description. Can be omitted if not set. |
|
string |
Current status. Values: |
|
string |
Credential reference, not clear text key. |
|
string |
Callback request path. Can be omitted if not set. |
|
array of string |
List of available capabilities. Can be omitted if not set. |
|
array of string |
List of associated tool IDs. Can be omitted if not set. |
|
object |
Non-sensitive configuration, fields vary with connection or channel type. Can be omitted if not set. |
|
string |
The most recent test status, either succeeded or failed. Can be omitted if not set. Value: |
|
string |
The most recent test time, in RFC 3339 format. Can be omitted if not set. |
|
string |
Error description for recent tests. Can be omitted if not set. |
|
string |
Error codes from recent tests. Can be omitted if not set. |
|
object |
Tag key-value pairs. Can be omitted if not set. |
|
string |
Creation time, in RFC 3339 format. |
|
string |
Last updated, using RFC 3339 format. |
|
integer |
Current version number. |
Error response¶
{
"code": 2,
"message": "<错误信息>"
}
Field |
Type |
Description |
|---|---|---|
|
integer |
error code. |
|
string |
Error message for the caller. |