GET /openapi/memorylake/admin/v1/access/{resource_type}/{resource_id}
resource_type | resource_id 取值 | 所需权限 |
|---|---|---|
workspaces | workspace_id | workspace:assign(作用于 workspace_id)或 access_group:view同时需要: workspace:read(作用于 workspace_id) |
projects | project_id | project:assign(作用于 project_id)或 access_group:view同时需要: project:read(作用于 project_id) |
actors | actor_id | actor:assign(作用于 actor_id)或 access_group:view同时需要: actor:read(作用于 actor_id) |
agents | agent_id | agent:assign(作用于 agent_id)或 access_group:view同时需要: agent:read(作用于 agent_id) |
skills | skill_id | skill:assign(作用于 skill_id)或 access_group:view同时需要: skill:read(作用于 skill_id) |
boundaries | boundary_id | boundary:assign(作用于 boundary_id)或 access_group:view同时需要: boundary:read(作用于 boundary_id) |
workspaces/{workspace_id}/actors | actor_id | 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)或 access_group:view同时需要: workspace_agent:read(作用于 workspace_id}/{agent_id) |
路径参数
curl -X GET 'https://app.memorylake.ai/openapi/memorylake/admin/v1/access/workspaces/69e585312c30a734cd7727316b1918bd' \
-H 'Authorization: Bearer sk_xxxxxx'
响应
显示 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。全部错误码见错误码。
| 状态码 | 含义 |
|---|---|
401 | API Key 缺失、无效、已停用或已过期 |
403 | 该 Key 无权执行此操作 |
404 | 资源不存在 |
429 | 请求过多,请按 Retry-After 等待后重试 |
500 | 服务端错误 |
503 | 暂时不可用,请稍后重试 |