获取用户列表
GET
/user/getUserList
请求参数
Authorization
在 header 添加参数
Authorization
示例:
Authorization: ********************
Query 参数
page
string
默认为1
示例值:
1
pageSize
string
默认为10
示例值:
10
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET '/user/getUserList?page=1&pageSize=10' \
--header 'Authorization;'
返回响应
🟢200成功
application/json
Body
msg
string
必需
data
object
必需
current_page_data
array [object {5}]
必需
pagination
object
必需
示例
{
"msg": "第1页请求成功",
"data": {
"current_page_data": [
{
"user_id": 1,
"username": "admin",
"email": "admin@qq.com",
"password": "e10adc3949ba59abbe56e057f20f883e",
"role": 1
},
{
"user_id": 3,
"username": "yaxotest1",
"email": "3310118198@qq.com",
"password": "81dc9bdb52d04dc20036dbd8313ed055",
"role": 0
},
{
"user_id": 4,
"username": "yaxotest2",
"email": "yuan1995309@163.com",
"password": "81dc9bdb52d04dc20036dbd8313ed055",
"role": 0
}
],
"pagination": {
"total_pages": 1,
"current_page": 1,
"has_next": false,
"has_previous": false
}
}
}
🟠404记录不存在
🟢206操作无权限
🟢203请求方式错误
修改于 2024-03-17 14:05:56