获取用户权限
GET
/permission/getUserPermission
请求参数
Authorization
在 header 添加参数
Authorization
示例:
Authorization: ********************
Query 参数
user_id
string
必需
示例值:
12
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET '/permission/getUserPermission?user_id=12' \
--header 'Authorization;'
返回响应
🟢200成功
application/json
Body
msg
string
必需
data
array [object {4}]
必需
user_permission_id
integer
必需
user_id
integer
必需
permission_id
integer
必需
is_allowed
boolean
必需
示例
{
"msg": "权限查询成功",
"data": [
{
"user_permission_id": 5,
"user_id": 3,
"permission_id": 1,
"is_allowed": false
},
{
"user_permission_id": 6,
"user_id": 3,
"permission_id": 2,
"is_allowed": false
},
{
"user_permission_id": 7,
"user_id": 3,
"permission_id": 3,
"is_allowed": false
},
{
"user_permission_id": 8,
"user_id": 3,
"permission_id": 4,
"is_allowed": false
}
]
}
🟢204用户不存在
🟢203请求方式错误
修改于 2024-05-18 07:47:46