- 快速开始
- 身份源(Connection)
- 应用(Client)
- 资源服务器(ResourceServer)
- 用户(User)
- 角色(Role)
- 分组(Group)
- 租户(Tenant)
- 组织(Organization)
- 动作(Action)
- 授权(Grant)
- 应用授权(ClientGrant)
- 日志(Log)
- 自定义域名(CusomDomain)
- 密钥(Key)
- 任务(Job)
- 多因素认证(MFA)
- 安全防护(AttackProtection)
- 品牌化(Branding)
获取用户的角色列表
GET
/api/v1/users/{user_id}/roles
用户
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Path 参数
user_id
string
用户ID
示例值:
authok|fjeiowejfj322fj
Query 参数
page
integer
页码
示例值:
1
page_size
string
可选
示例值:
10
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://..authok.cn/api/v1/users/authok|fjeiowejfj322fj/roles'
返回响应
🟢200成功
application/json
Body
meta
object (PageMeta)
必需
page
integer
页码
page_size
integer
每页显示数量
total
integer
记录总数
items
array[object (Role) {3}]
必需
id
string
角色ID
name
string
角色名
description
string
描述
示例
{
"meta": {
"page": 1,
"page_size": 20,
"total": 100
},
"items": [
{
"id": "97",
"name": "委员土统要",
"description": "eiusmod sint velit"
},
{
"id": "70",
"name": "非进群线必定",
"description": "ullamco anim"
},
{
"id": "18",
"name": "增去便论结目",
"description": "sint esse"
},
{
"id": "43",
"name": "亲约决象验先",
"description": "pariatur fugiat sint"
},
{
"id": "89",
"name": "看米图",
"description": "cillum Lorem dolor"
}
]
}
修改于 2022-03-13 20:53:08