Test the created channel instance

Verify the current credentials and connection configuration of the saved channel instance.

HTTP
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

Shell
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

workspace_id

string

Yes

workspace ID.

provider

string

Yes

Channel provider ID.

instance_id

string

Yes

Channel instance ID.

Successful response

JSON
{
  "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

code

integer

0 when the request is processed successfully.

data

object

response data.

data.instance

object

Public information about the instance being tested. Can be omitted if not set.

data.instance.id

string

Object ID.

data.instance.workspace_id

string

The workspace ID to which it belongs.

data.instance.provider

string

Provider ID. Values: wecom, github, feishu, slack, grafana, kubernetes, qq_mail, codex, bocha, tavily, brave.

data.instance.channel_type

string

Channel type. Values: wecom_app, wecom_group_robot, wecom_mail, github_app, feishu_app, slack_app, grafana, kubernetes, qq_mail, codex_api, bocha_web_search, tavily_web_search, brave_web_search.

data.instance.name

string

Name.

data.instance.description

string

Description. Can be omitted if not set.

data.instance.status

string

Current status. Values: draft, active, disabled, archived.

data.instance.credential_ref

string

A reference to a saved credential, not a clear-text key.

data.instance.callback_path

string

Callback request path. Can be omitted if not set.

data.instance.capabilities

array of string

List of available capabilities. Can be omitted if not set.

data.instance.tool_ids

array of string

List of associated tool IDs. Can be omitted if not set.

data.instance.config

object

Non-sensitive configuration, fields vary with connection or channel type. Can be omitted if not set.

data.instance.last_test_status

string

The most recent test status, either succeeded or failed. Can be omitted if not set. Value: succeeded, failed.

data.instance.last_tested_at

string

The most recent test time, in RFC 3339 format. Can be omitted if not set.

data.instance.last_test_error

string

Error description for recent tests. Can be omitted if not set.

data.instance.last_test_error_code

string

Error codes from recent tests. Can be omitted if not set.

data.instance.labels

object

Tag key-value pairs. Can be omitted if not set.

data.instance.created_at

string

Creation time, in RFC 3339 format.

data.instance.updated_at

string

Last updated in RFC 3339 format.

data.instance.version

integer

Current version number.

data.ok

boolean

Whether the connection test passed.

data.status

string

Current and most recent test status.

data.worker_id

string

The actor and request IDs returned when available. Can be omitted if not set.

data.request_id

string

The actor and request IDs returned when available. Can be omitted if not set.

data.last_test_status

string

Current and most recent test status. Value: succeeded, failed.

data.last_test_error

string

Error message when the test fails. Can be omitted if not set.

data.error_code

string

The error code, stage, and category by which the service is categorized. Can be omitted if not set.

data.error_stage

string

The error code, stage, and category by which the service is categorized. Can be omitted if not set.

data.provider_error_code

string

The error message returned by the Provider. Return when available. Can be omitted if not set.

data.provider_error_message

string

The error message returned by the Provider. Return when available. Can be omitted if not set.

data.error_category

string

The error code, stage, and category by which the service is categorized. Can be omitted if not set.

data.suggestion

string

Actionable fix recommendations. Return when available. Can be omitted if not set.

data.last_tested_at

string

Test time, using RFC 3339 format.

Error response

JSON
{
  "code": 2,
  "message": "<错误信息>"
}

Field

Type

Description

code

integer

error code.

message

string

Error message for the caller.

Last updated on