设置成员模型权限
PUT
/enterprise/v1/sub-accounts/{subAccountId}/model-accessrestriction 必填。INHERIT 继承企业模型目录,忽略 modelNames。ALLOWLIST 使用公开模型名称替换名单,不接受内部 ID;空名单不允许任何模型。
身份验证
MANAGEMENT Key;tenant:policies:write
Authorization: Bearer <CONTROL_KEY>
路径中的 subAccountId 必须属于当前企业;hash 是 Key 元数据标识,不能传明文密钥。
审批与重试
启用审批的企业需传 Idempotency-Key,可能返回 HTTP 409 / APPROVAL_REQUIRED,data.operation.executed=false;此时尚未执行,不应当作成功。未启用审批时直接执行;不要假设任意 POST 都支持幂等重试。
路径参数
subAccountIdstringrequired10-digit public member ID / 10 位成员编号
请求体
restrictionstringrequiredINHERIT | ALLOWLIST
modelNamesstring[]Public model names; replaces allowlist / 公开模型名称,替换白名单
字段使用 camelCase。必填项及可选字段见上文。
JSON
1{
2 "restriction": "INHERIT",
3 "modelNames": []
4}响应
HTTP 200; code: 200. 以下为示例值,字段使用 camelCase。
codeinteger200
dataobject | nulldata.restrictionstringdata.modelsarray错误处理
检查 HTTP 状态和 code,失败时读取 serviceCode、msg、traceId。无效凭证无法读取数据;缺少 scope 返回 API_KEY_SCOPE_DENIED。跨企业资源不可访问。不要把 202 接受或审批待处理当作业务完成。
此页面对您有帮助吗?