GET /openapi/memorylake/admin/v1/members/{principal_id}/effective-permissions
所需权限:
access_group:view路径参数
string
必填
成员的标识符(
principal_id)curl -X GET 'https://app.memorylake.ai/openapi/memorylake/admin/v1/members/dbcf9a3aabee5042775269c9d137a2f8/effective-permissions' \
-H 'Authorization: Bearer sk_xxxxxx'
响应
object
显示 Effective Permissions 对象
显示 Effective Permissions 对象
string
成员的显示名称
array
string
成员
string
成员的主角色
array
array
按来源的明细
显示 Effective Permission Source 对象
显示 Effective Permission Source 对象
string
角色键或用户组 ID
string
显示名称
array
此来源授予的操作
string
这些权限的来源。可选值:
role、access_group。array
此来源授予、但被其他位置的拒绝规则从有效集合中移除的操作
array
此来源附带的实例限制
显示 Access Scope Entry 对象
显示 Access Scope Entry 对象
string
all 表示所有实例;instances 表示仅列出的实例string
资源类型,例如
memorylake:project(参见 GET /permission-catalog)array
只读。成员角色对该类型授予的实例级操作——即范围条目最多可允许的操作。
array
mode 为 instances 时的实例列表{
"success": true,
"message": "Operation completed successfully",
"data": {
"display_name": "Alice",
"permissions": [
{
"permission": "example",
"sources": [
{
"type": "role",
"id": "7ea9bf65e6937c3c168bc7a2a0f6fbf2",
"name": "Example name"
}
]
}
],
"principal_id": "a4f0086eca294846b3bb8b9086c30e2a",
"role": "tenant_member",
"scopes": [
{
"resource_type": "example",
"restricted": false,
"instances": [
{
"id": "66a8e03ad707a50641b92fac99929037",
"sources": []
}
]
}
],
"sources": [
{
"id": "eb619252391dd05caf4e338bf6fc7872",
"name": "Example name",
"permissions": [
"example"
],
"type": "role",
"overridden_permissions": [
"example"
],
"scopes": [
{
"mode": "all",
"resource_type": "example",
"available_actions": [],
"instances": []
}
]
}
]
}
}
错误
出错时返回success: false、message 和 error_code。全部错误码见错误码。
| 状态码 | 含义 |
|---|---|
401 | API Key 缺失、无效、已停用或已过期 |
403 | 该 Key 无权执行此操作 |
404 | 资源不存在 |
422 | 请求体或参数未通过校验 |
429 | 请求过多,请按 Retry-After 等待后重试 |
500 | 服务端错误 |