查询用户信息
功能介绍
查询租户下用户信息。
URI
GET /basic/mgmt/public/api/v1/users
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
Authorization |
是 |
String |
JWTToken |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
tenantId |
否 |
String |
租户ID。
说明:
关于租户ID的取值问题,首先从此参数进行取值;如果此参数值为空,则取Authorization头token中的tenantId;如果未传Authorization头,则取x-ms-jwt头token中的tenantId;如果未传x-ms-jwt头且是物理多租,则取配置中的默认tenantId,如果是逻辑多租则报错。 建议将tenantId放在Authorization鉴权头中token中的Issuer(请参见中的快速开发章节),token的Issuer格式为“username:userId:tenantId”。 |
|
userId |
否 |
String |
用户id |
|
username |
否 |
String |
账户名称(模糊) |
|
nickname |
否 |
String |
用户昵称(模糊) |
|
roleName |
否 |
String |
全局角色中文名称(精确),表示查询拥有此全局角色的用户 |
|
pageIndex |
否 |
Integer |
分页参数,当前页数,默认1 |
|
pageSize |
否 |
Integer |
分页参数,分页大小,默认100 |
请求示例
GET /basic/mgmt/public/api/v1/users?username=test&roleName=系统管理员
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
code |
String |
返回码 |
|
message |
String |
返回码描述 |
|
datas |
Array of BasicUserInfo |
返回数据 |
|
totalCount |
Long |
返回数据总条数 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
tenantId |
String |
租户ID |
|
userId |
String |
用户ID |
|
username |
String |
用户名称 |
|
nickname |
String |
用户昵称 |
|
orgCode |
String |
部门编码 |
|
|
String |
邮件 |
|
userLevel |
Integer |
用户级别 |
|
effectTime |
String |
生效时间 |
|
expiredTime |
String |
失效时间 |
|
password |
String |
密码,返回始终为null |
|
status |
Integer |
状态,1有效,0无效 |
|
modifyPwdFlag |
Integer |
是否需要修改密码,1需要,0不需要 |
|
employeeNumber |
String |
工号 |
|
salt |
String |
盐值,返回始终为null |
|
reserve1 |
String |
扩展字段 |
|
reserve2 |
String |
扩展字段 |
|
reserve3 |
String |
扩展字段 |
|
reserve4 |
String |
扩展字段 |
|
reserve5 |
String |
扩展字段 |
|
userRoleLists |
Array of UserRoleEntity |
用户角色列表 |
|
userGroups |
Array of UserGroups |
用户群组列表 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
roleId |
String |
角色ID |
|
roleName |
String |
角色名称 |
|
roleType |
String |
角色类型 |
|
description |
String |
描述 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
groupId |
String |
群组ID |
|
name |
String |
群组名称 |
|
description |
String |
描述 |
响应示例
{
"code": "PUB-000000",
"message": "success",
"datas": [
{
"tenantId": "9190086000001150600",
"userId": "1008600000009092025",
"username": "zhangjie@ipdcenter203.huaweiapaas.com",
"nickname": "zhangjie",
"orgCode": null,
"email": "",
"userLevel": 5,
"effectTime": "2024-11-25 14:55:39",
"expiredTime": "2099-12-31 23:59:59",
"reserve1": "42db32e1-721d-4964-83bd-58539b3c8c9d",
"reserve2": "IPDCenter",
"reserve3": null,
"reserve4": null,
"reserve5": null,
"password": null,
"status": 1,
"modifyPwdFlag": 0,
"salt": null,
"userRoleLists": [
{
"roleId": "715298436940845056",
"roleName": "角色桌面",
"description": null,
"roleType": "XDMRole"
},
{
"roleId": "-2",
"roleName": "安全保密员",
"description": "负责权限审批、应用授权普通用户和安全审计员操作行为审查",
"roleType": "XDMRole"
},
{
"roleId": "-1",
"roleName": "系统管理员",
"description": "负责系统运行维护",
"roleType": "XDMRole"
},
{
"roleId": "-5",
"roleName": "通用角色",
"description": "通用角色,所有用户默认拥有",
"roleType": "XDMRole"
}
],
"userGroups": [
{
"groupId": 702479311914934272,
"name": "ddcpypbbml",
"description": "ddcpypbbml"
},
{
"groupId": 703929132727148544,
"name": "test1128",
"description": "test1128"
},
{
"groupId": 703989358998339584,
"name": "test1128test_副本1",
"description": "test1128"
},
{
"groupId": 713045648651325440,
"name": "t123",
"description": "t123"
}
],
"isLoginLimited": 0
}
],
"totalCount": 1
}
错误码
请参见错误码。