key 即成员和邀请写入操作中角色字段接受的值。所有者角色永远无法通过此 API 分配;标记为 admin_grant_only 的角色只能由所有者或持有管理员基线(通过其角色或用户组)的成员授予。这两个标志描述的是角色本身而非您:对所有调用方都相同。任何成员都可读取。
所需权限: 无——团队任一成员的 Key 都可以调用
响应
object
错误
出错时返回success: false、message 和 error_code。全部错误码见错误码。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl -X GET 'https://app.memorylake.ai/openapi/memorylake/admin/v1/roles' \
-H 'Authorization: Bearer sk_xxxxxx'
{
"success": true,
"message": "Operation completed successfully",
"data": {
"roles": [
{
"admin_grant_only": false,
"assignable": false,
"built_in": false,
"key": "sk-f6e5d4c3...redacted...b2a1",
"label": "example",
"base_role_key": "tenant_member",
"description": "Example description",
"parent_role_key": "example"
}
]
}
}
列出您团队的角色:三个内置角色以及本团队的自定义角色
curl -X GET 'https://app.memorylake.ai/openapi/memorylake/admin/v1/roles' \
-H 'Authorization: Bearer sk_xxxxxx'
{
"success": true,
"message": "Operation completed successfully",
"data": {
"roles": [
{
"admin_grant_only": false,
"assignable": false,
"built_in": false,
"key": "sk-f6e5d4c3...redacted...b2a1",
"label": "example",
"base_role_key": "tenant_member",
"description": "Example description",
"parent_role_key": "example"
}
]
}
}
GET /openapi/memorylake/admin/v1/roles
key 即成员和邀请写入操作中角色字段接受的值。所有者角色永远无法通过此 API 分配;标记为 admin_grant_only 的角色只能由所有者或持有管理员基线(通过其角色或用户组)的成员授予。这两个标志描述的是角色本身而非您:对所有调用方都相同。任何成员都可读取。
curl -X GET 'https://app.memorylake.ai/openapi/memorylake/admin/v1/roles' \
-H 'Authorization: Bearer sk_xxxxxx'
显示 Roles 对象
owner、admin、member),再按创建时间从早到晚列出本团队的自定义角色显示 Role 对象
admin_grant_only 与您自己的角色。base_role_key 的值相同;为兼容现有客户端而保留。{
"success": true,
"message": "Operation completed successfully",
"data": {
"roles": [
{
"admin_grant_only": false,
"assignable": false,
"built_in": false,
"key": "sk-f6e5d4c3...redacted...b2a1",
"label": "example",
"base_role_key": "tenant_member",
"description": "Example description",
"parent_role_key": "example"
}
]
}
}
success: false、message 和 error_code。全部错误码见错误码。
| 状态码 | 含义 |
|---|---|
401 | API Key 缺失、无效、已停用或已过期 |
403 | 该 Key 无权执行此操作 |
429 | 请求过多,请按 Retry-After 等待后重试 |
500 | 服务端错误 |