查询插件账号连接详情

读取插件账号连接的非敏感配置与当前版本。

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

调用前准备

准备目标工作区 ID 和可访问相应资源、具有当前动作权限的个人访问令牌。路径中 workspace_id、connection_id 使用相应资源的实际标识。工作区 ID 同时填入 X-Workspace-ID。环境变量的来源见公共对象与输入。

路径参数

curl -X GET "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/plugin-connections/$CONNECTION_ID" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

设置 $CONNECTION_ID 为同一工作区连接列表或创建响应返回的 ID。version 是元数据版本,不能用授权 generation 替代。

此动作不接收请求体。

成功响应

{
  "code": 0,
  "data": {
    "id": "connection_example",
    "workspace_id": "workspace_example",
    "name": "provider · connection_example",
    "description": "我的插件账号",
    "status": "active",
    "kind": "plugin",
    "endpoint_uri": "https://service.example.invalid",
    "auth_type": "oauth2",
    "visibility": "private",
    "version": 1,
    "created_at": "2026-11-11T00:00:00Z",
    "updated_at": "2026-11-11T00:00:00Z"
  }
}

字段

类型

说明

code

integer

成功时为 0。

data

object

当前动作返回的数据。

data.id

string

资源字段,详见公共对象与状态。

data.workspace_id

string

资源字段,详见公共对象与状态。

data.name

string

资源字段,详见公共对象与状态。

data.description

string

资源字段,详见公共对象与状态。

data.status

string

当前状态;按本页条件及公共对象判断。

data.kind

string

资源字段,详见公共对象与状态。

data.endpoint_uri

string

资源字段,详见公共对象与状态。

data.auth_type

string

资源字段,详见公共对象与状态。

data.visibility

string

资源字段,详见公共对象与状态。

data.version

integer

当前资源版本,写入时作为 expected_version。

data.created_at

string

资源字段,详见公共对象与状态。

data.updated_at

string

资源字段,详见公共对象与状态。

错误响应

业务错误的数字 code、message 和 details.reason 以及授权层错误的字符串代码分别处理,见错误与状态。遇到状态或版本冲突时先读取当前资源,不自动更换标识或重试写入。

最后更新于