Management APIs 使用 JWT
已登入使用者在管理工作空間資源時,應使用 JWT。POST /workspaces/:workspaceId/api-keysGET /workspaces/:workspaceId/api-keysDELETE /workspaces/:workspaceId/api-keys/:apiKeyId
Public Agent API 使用 API key
外部整合與 AI agent 存取 Public Agent API 時,應使用 API key。 建議 header:給 agents 的建議規則
先呼叫GET /public/v1/workspace,確認:
- workspace context
- 可用 scopes
- 有效 role
- 方案限制
操作建議
- JWT 只用在已登入的管理流程。
- API key 用在 server-to-server integration 與 AI agent。
- 明文 API key 只會在建立當下顯示一次,必須當作 secret 保存。