POST /admin/cells

创建一个新的 Cell(隔离域)。

POST /admin/cells

请求参数

{
  "id": "dept-legal",
  "timezone": "Asia/Shanghai",
  "locale": "zh-CN",
  "provider_strategy": "shared_only",
  "compliance": "financial"
}
字段类型必填说明
idstring✅Cell ID,创建后不可变
timezonestring否时区,创建后不可变。默认 UTC。示例:Asia/Shanghai
localestring否语言区域。示例:zh-CN
provider_strategystring否Provider 策略:own_only / shared_only / own_first / shared_first
compliancestring否合规预设:standard(默认)/ financial / pii-strict / healthcare
governanceobject否治理配置(GovernMode + DenyPaths + NetworkPolicy)
quotasobject否配额配置(MaxConcurrentRuns / TokensPerMinute 等)

Compliance 预设效果:

预设GovernModeNetworkPolicy适用场景
standardopenallow通用场景
financiallockedinternal_only金融合规
pii-strictlockedinternal_only个人信息保护
healthcarelockedinternal_only医疗健康

curl 示例

创建一个法务部门 Cell:

curl -s -X POST "http://localhost:9091/admin/cells" \
  -H "Authorization: Bearer $ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "dept-legal",
    "timezone": "Asia/Shanghai",
    "locale": "zh-CN",
    "provider_strategy": "shared_only",
    "compliance": "financial"
  }' | jq .

响应

201 Created

{
  "id": "dept-legal",
  "state": "Cool",
  "created_at": "2026-09-21T14:00:00Z"
}

注意事项


错误码

HTTP错误说明
400—请求体格式错误或字段值无效
401—未认证或 Token 无效
403—非 Admin Token
409—Cell ID 已存在

相关端点