Integration API
由
scripts/generate-api-docs.ts自动生成 —— 请勿手改 共 8 个端点
GET /integration/connections
我的 ERP/CRM 连接
响应
| 状态码 | 说明 |
|---|---|
| 200 |
POST /integration/connections
新建连接(地址与凭据校验通过才入库)
请求体
json
{
"$ref": "#/components/schemas/CreateIntegrationConnectionDto"
}响应
| 状态码 | 说明 |
|---|---|
| 201 |
DELETE /integration/connections/{connectionId}
删除连接(同时撤销已发布能力)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
connectionId | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 200 |
GET /integration/connections/{connectionId}
连接详情
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
connectionId | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 200 |
PATCH /integration/connections/{connectionId}
更新连接(改地址会撤销已发布能力并回到未自检)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
connectionId | path | string | ✅ |
请求体
json
{
"$ref": "#/components/schemas/UpdateIntegrationConnectionDto"
}响应
| 状态码 | 说明 |
|---|---|
| 200 |
POST /integration/connections/{connectionId}/publish
发布为 agent 可调用的能力(必须自检通过)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
connectionId | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 201 |
POST /integration/connections/{connectionId}/verify
连通性自检(服务端发起一次 GET;拒内网地址与重定向)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
connectionId | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 201 |
GET /integration/connectors
预置连接器目录(ERP / CRM)
响应
| 状态码 | 说明 |
|---|---|
| 200 |