DELETE /openapi/memorylake/admin/v1/access/{resource_type}/{resource_id}/scope-grants/{subject_type}/{subject_id}
resource_type | resource_id 取值 | 所需权限 |
|---|---|---|
workspaces | workspace_id | workspace:assign(作用于 workspace_id)或 member:set_scope(subject_type 为 members 时)或 access_group:manage(subject_type 为 access-groups 时)同时需要: workspace:assign(作用于 workspace_id)或 access_group:view同时需要: workspace:read(作用于 workspace_id) |
projects | project_id | project:assign(作用于 project_id)或 member:set_scope(subject_type 为 members 时)或 access_group:manage(subject_type 为 access-groups 时)同时需要: project:assign(作用于 project_id)或 access_group:view同时需要: project:read(作用于 project_id) |
actors | actor_id | actor:assign(作用于 actor_id)或 member:set_scope(subject_type 为 members 时)或 access_group:manage(subject_type 为 access-groups 时)同时需要: actor:assign(作用于 actor_id)或 access_group:view同时需要: actor:read(作用于 actor_id) |
agents | agent_id | agent:assign(作用于 agent_id)或 member:set_scope(subject_type 为 members 时)或 access_group:manage(subject_type 为 access-groups 时)同时需要: agent:assign(作用于 agent_id)或 access_group:view同时需要: agent:read(作用于 agent_id) |
skills | skill_id | skill:assign(作用于 skill_id)或 member:set_scope(subject_type 为 members 时)或 access_group:manage(subject_type 为 access-groups 时)同时需要: skill:assign(作用于 skill_id)或 access_group:view同时需要: skill:read(作用于 skill_id) |
boundaries | boundary_id | boundary:assign(作用于 boundary_id)或 member:set_scope(subject_type 为 members 时)或 access_group:manage(subject_type 为 access-groups 时)同时需要: boundary:assign(作用于 boundary_id)或 access_group:view同时需要: boundary:read(作用于 boundary_id) |
workspaces/{workspace_id}/actors | actor_id | workspace_actor:assign(作用于 workspace_id}/{actor_id)或 member:set_scope(subject_type 为 members 时)或 access_group:manage(subject_type 为 access-groups 时)同时需要: workspace_actor:assign(作用于 workspace_id}/{actor_id)或 access_group:view同时需要: workspace_actor:read(作用于 workspace_id}/{actor_id) |
workspaces/{workspace_id}/agents | agent_id | workspace_agent:assign(作用于 workspace_id}/{agent_id)或 member:set_scope(subject_type 为 members 时)或 access_group:manage(subject_type 为 access-groups 时)同时需要: workspace_agent:assign(作用于 workspace_id}/{agent_id)或 access_group:view同时需要: workspace_agent:read(作用于 workspace_id}/{agent_id) |
- 如果改动会让某人获得管理员角色,或会缩小管理员能访问的范围,还需要由团队所有者或管理员操作。
路径参数
查询参数
请求头
curl -X DELETE 'https://app.memorylake.ai/openapi/memorylake/admin/v1/access/workspaces/69e585312c30a734cd7727316b1918bd/scope-grants/members/89914667f74821b220f374d323f0f4b0' \
-H 'Authorization: Bearer sk_xxxxxx' \
-H 'Idempotency-Key: 7c1d2e3f-0a9b-4c8d-b7e6-f5a4d3c2b1a0'
响应
显示 Resource Access View 对象
显示 Resource Access View 对象
可访问该实例的成员和用户组
显示 Resource Access Entry 对象
显示 Resource Access Entry 对象
主体访问该实例的途径
无法访问的成员
显示 Resource Access Entry 对象
显示 Resource Access Entry 对象
主体访问该实例的途径
{
"success": true,
"message": "Operation completed successfully",
"data": {
"allowed": [
{
"name": "Example name",
"subject_id": "e9225468996bae25743a2b64eeb19cc7",
"subject_type": "member",
"actions": [
"example"
],
"blocked_by": "scope",
"level_options": {
"can_set_none": true,
"settable_levels": [
"example"
],
"blocked_reason": "outranked",
"current_level": "read"
},
"member_count": 1,
"permission_level": "read",
"role": "tenant_member",
"scope_grant_count": 1,
"scope_mode": "all",
"sources": [
{
"type": "role",
"access_group_id": "21b69c2e4fc3734ad8c25bf8b5224366",
"access_group_name": "Example access group",
"actions": [],
"parent_id": "ba8581988563142580f3237fbf400514",
"permission_levels": []
}
]
}
],
"allowed_count": 1,
"blocked": [
{
"name": "Example name",
"subject_id": "e9225468996bae25743a2b64eeb19cc7",
"subject_type": "member",
"actions": [
"example"
],
"blocked_by": "scope",
"level_options": {
"can_set_none": true,
"settable_levels": [
"example"
],
"blocked_reason": "outranked",
"current_level": "read"
},
"member_count": 1,
"permission_level": "read",
"role": "tenant_member",
"scope_grant_count": 1,
"scope_mode": "all",
"sources": [
{
"type": "role",
"access_group_id": "21b69c2e4fc3734ad8c25bf8b5224366",
"access_group_name": "Example access group",
"actions": [],
"parent_id": "ba8581988563142580f3237fbf400514",
"permission_levels": []
}
]
}
],
"grantable_levels": [
"example"
],
"instance_id": "a88bb6c846106e751d8cf36bdeb592fe",
"resource_type": "example"
}
}
错误
出错时返回success: false、message 和 error_code。全部错误码见错误码。
| 状态码 | 含义 |
|---|---|
400 | 参数或请求体无效 |
401 | API Key 缺失、无效、已停用或已过期 |
403 | 该 Key 无权执行此操作 |
404 | 资源不存在 |
409 | 请求与当前状态冲突,例如重复或已达上限 |
422 | 请求体或参数未通过校验 |
429 | 请求过多,请按 Retry-After 等待后重试 |
500 | 服务端错误 |
503 | 暂时不可用,请稍后重试 |