应用管理
应用是 OpenAPI 资源的容器。Client ID 永远不变;Secret 和 Key 可以轮换。
数据模型
interface App {
clientId: string; // eacli_xxx — 公开
name: string;
description: string | null;
scopes: string[]; // 允许的最大 scope 集合
status: "ACTIVE" | "DISABLED";
createdAt: string; // ISO 8601
}
Endpoints
创建应用
POST /openapi/v1/apps
X-Client-ID: eacli_xxx ← 创建者本身的 sid
Cookie: sid=xxx
Body:
{
"workspaceId": "cms5brzy30003zp1395fqiok2",
"name": "My Agent",
"description": "飞书机器人集成",
"scopes": ["projects:read", "tasks:read"]
}
成功响应(仅此一次包含 Secret):
{
"success": true,
"data": {
"clientId": "eacli_ADRP8CP9R3RVWF07A2YHPF",
"secret": "eapk_live_A127BHJ44SM2E6M7QSDZVD",
"secretPrefix": "eapk_live_A12",
"name": "My Agent",
"scopes": ["projects:read", "tasks:read"],
"createdAt": "2026-08-07T14:38:44.099Z"
}
}
列出我的应用
GET /openapi/v1/apps
应用详情
GET /openapi/v1/apps/:clientId
修改 scopes
PATCH /openapi/v1/apps/:clientId/scopes
Body:
{ "scopes": ["projects:read", "tasks:read", "risks:read"] }
只能把已声明 scopes 的子集赋给 Key;不能声明新的 scope。
删除应用
DELETE /openapi/v1/apps/:clientId
如果还有活跃 Key / Webhook / OAuth Grant,会标记 DISABLED 而不是真正删除。