删除消息接收关联

删除消息接收关联。

DELETE https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/ingress-connections/{connection_id}

调用前准备

准备可访问目标工作区并有相应动作权限的个人访问令牌。路径工作区与 X-Workspace-ID 一致。示例使用 jq;变量、对象与状态见公共说明。

查询参数

curl -X DELETE "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/ingress-connections/$CONNECTION_ID" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  --get \
  --data-urlencode "expected_association_version=$ASSOCIATION_VERSION" \
  --data-urlencode "expected_config_version=$CONFIG_VERSION"

两项版本是查询参数,不是 JSON 请求体。返回被删除关联的配置快照,不表示关联仍存在;之后回查目标列表。托管凭据按所属资源清理,回调/邮件引用的独立通道实例保留。

字段

类型

是否必填

说明

expected_association_version

integer

是

最新连接详情的 association_version,须大于 0。

expected_config_version

integer

是

最新连接详情的 config_version,须大于 0。

成功响应

{
  "code": 0,
  "data": {
    "id": "ingress_example",
    "workspace_id": "workspace_example",
    "target": {
      "kind": "agent",
      "workspace_id": "workspace_example",
      "id": "agent_example"
    },
    "provider": "slack",
    "channel_type": "slack_app",
    "receive_mode": "managed_stream",
    "agent_model": "model_example",
    "association_version": 1,
    "connected_by_user_id": "user_example",
    "enabled": true,
    "account_identity": "slack:app:app_example",
    "config_version": 1,
    "desired_state": "enabled",
    "observed_state": "starting",
    "created_at": "2026-11-11T00:00:00Z",
    "updated_at": "2026-11-11T00:00:00Z"
  }
}

字段

类型

说明

code

integer

成功时为 0。

data

object

结果对象,字段见公共对象说明。

错误响应

按 HTTP 状态、业务结果和错误字段处理,见错误与环境。来源与版本冲突时读取当前状态,不替换身份、资源或请求 ID 自动重试。

最后更新于