Test the created channel instance¶
Verify the current credentials and connection configuration of the saved channel instance.
POST $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/channels/{provider}/instances/{instance_id}/test
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 tested. Prepare the personal access token, target workspace ID, channel provider ID, and instance ID that can access the target workspace.
The test will actually access the external service. The WeCom group bot will send visible test messages. The mailbox will verify IMAP/SMTP, the search will initiate a query and may consume credit, and other channels will call corresponding services. Please confirm the goals and permissions first to avoid automatic repeated testing.
Request parameters¶
curl -X POST "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/channels/$PROVIDER/instances/$INSTANCE_ID/test" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
workspace ID. |
|
string |
Yes |
Channel provider ID. |
|
string |
Yes |
Channel instance ID. |
Successful response¶
{
"code": 0,
"data": {
"instance": {
"id": "inst_01",
"workspace_id": "ws_01",
"provider": "wecom",
"channel_type": "wecom_mail",
"name": "告警通道",
"status": "active",
"credential_ref": "cred_01",
"created_at": "2026-08-18T01:00:00Z",
"updated_at": "2026-08-18T01:00:00Z",
"version": 1
},
"ok": true,
"status": "COMPLETED",
"last_test_status": "succeeded",
"last_tested_at": "2026-08-18T01:00:00Z"
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
object |
response data. |
|
object |
Public information about the instance being tested. Can be omitted if not set. |
|
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 |
A reference to a saved credential, not a 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 in RFC 3339 format. |
|
integer |
Current version number. |
|
boolean |
Whether the connection test passed. |
|
string |
Current and most recent test status. |
|
string |
The actor and request IDs returned when available. Can be omitted if not set. |
|
string |
The actor and request IDs returned when available. Can be omitted if not set. |
|
string |
Current and most recent test status. Value: |
|
string |
Error message when the test fails. Can be omitted if not set. |
|
string |
The error code, stage, and category by which the service is categorized. Can be omitted if not set. |
|
string |
The error code, stage, and category by which the service is categorized. Can be omitted if not set. |
|
string |
The error message returned by the Provider. Return when available. Can be omitted if not set. |
|
string |
The error message returned by the Provider. Return when available. Can be omitted if not set. |
|
string |
The error code, stage, and category by which the service is categorized. Can be omitted if not set. |
|
string |
Actionable fix recommendations. Return when available. Can be omitted if not set. |
|
string |
Test time, using RFC 3339 format. |
Error response¶
{
"code": 2,
"message": "<错误信息>"
}
Field |
Type |
Description |
|---|---|---|
|
integer |
error code. |
|
string |
Error message for the caller. |