智慧服务,成就美好体验 项目咨询

主页 > 服务与支持 > 开发平台 > 服务端API参考 > 用户管理 分页查询用户

入门使用

分页查询用户

更新时间:2019-11-20

描述

企业管理员通过该接口分页查询企业用户。

接口原型

表1 接口原型

请求方法

POST

请求地址

/rest/usg/datacenter/v1/corp/member/search

传输协议

HTTPS

请求参数

表2 参数说明

参数

是否必须

类型

位置

描述

Authorization

String

Header

授权令牌。将执行鉴权响应的accessToken

进行Base64转码操作

样例:Basic Base64(accessToken)

condition

String

Body

查询条件。

长度:0-255。

pageIndex

Integer

Body

页面起始页。

最小值:1

默认值:1

pageSize

Integer

Body

页面大小。

范围:1-1000

默认值:10

deptCode

String

Body

部门编码,不带则查询所有。

长度:0-32。

enableSubDept

Boolean

Body

是否查询子部门。

默认值:true

adminType

Integer

Body

支持搜索管理员,和非管理员(默认管理员在搜索用户时不显示)。

管理员类型。

  • 1:普通管理员
  • 2:非管理员(即为普通企业成员,UserType是2时有效)

范围:1-2

status

Integer

Body

用户状态

  • 0:正常
  • 1:停用,不带则查询所有

响应参数

表3 参数说明

参数

类型

描述

returnCode

String

业务返回码。

returnMessage

String

返回描述。

achievementTime

String

响应产生时间。

requestId

String

请求唯一标识。

data

SearchUserPage

分页查询企业用户信息。

表4 SearchUserPage 数据结构

参数

类型

描述

pageIndex

Integer

页面起始页。

pageSize

Integer

页面大小。

totalCount

Integer

总数量。

data

SearchUserResultDTO[0..*]

分页查询企业用户信息。

表5 SearchUserResultDTO 数据结构

参数

类型

描述

id

String

用户ID。

userAccount

String

帐号。

name

String

姓名。

phone

String

联系电话。

country

String

联系电话所属的国家。

email

String

邮箱。

vmrId

String

个人会议室Id

deptCode

String

部门编码。

deptNamePath

String

部门完整名称。

userType

Integer

用户类型。

  • 0:系统管理员帐户
  • 1:SP管理员帐户
  • 2:企业成员帐户
  • 10:硬终端用户

adminType

Integer

管理员类型。

  • 0:默认(超级)管理员
  • 1:普通管理员
  • 2:非管理员(即为普通企业成员,UserType是2时有效)

signature

String

备注。

status

Integer

用户状态。

  • 0:正常
  • 1:停用

请求消息示例

POST /rest/usg/datacenter/v1/corp/member/search
Connection: keep-alive
Authorization: Basic RWVSNU5KSjlyS2w5M0p4M2pIZ21OcWhKemVkTzM2aU50
Content-Type: application/json
Content-Length: 125
Host: api.meeting.huaweicloud.com 
User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_191)

{
    "condition": "",
    "deptCode": "1",
    "pageIndex": 1,
    "pageSize": 10,
    "enableSubDept":true,
    "adminType":2,
    "status":0
}
 

响应消息示例

HTTP/1.1 200 
Date: Fri, 12 Apr 2019 10:07:08 GMT
Content-Type: application/json;charset=UTF-8
Content-Length: 1329
Connection: keep-alive
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Server: api-gateway
X-Request-Id: 63facce44898efa03629afd189da7f0f

{
    "returnCode": "000000000",
    "returnMessage": "Success",
    "achievementTime": "2019-04-12 10:05:57.051",
    "requestId": "63facce44898efa03629afd189da7f0f",
    "data": {
        "pageIndex": 1,
        "totalCount": 4,
        "pageSize": 10,
        "data": [{
            "id": "ff80808169e79714016a10e0002c00b6",
            "userAccount": "a68070c57c8246ec95569b26c81d9168",
            "name": "test004",
            "phone": "+86136********",
            "country": "chinaPR",
            "email": null,
            "vmrId": "911857962",
            "deptCode": "1",
            "deptNamePath": "user002",
            "userType": 2,
            "adminType": 2,
            "signature": null,
            "status": 0
        },
        {
            "id": "ff80808169e79714016a10dcdb2b00b3",
            "userAccount": "ceb06a378bc349f2903dc01f688c3674",
            "name": "test003",
            "phone": "+86133********",
            "country": "chinaPR",
            "email": null,
            "vmrId": "912406161",
            "deptCode": "1",
            "deptNamePath": "user002",
            "userType": 2,
            "adminType": 2,
            "signature": null,
            "status": 0
        },
        {
            "id": "ff80808169e794dc016a10d0ff470094",
            "userAccount": "acaf01bac6eb48778697a52d4feb63de",
            "name": "test002",
            "phone": "+86136********",
            "country": "chinaPR",
            "email": null,
            "vmrId": "911461810",
            "deptCode": "1",
            "deptNamePath": "user002",
            "userType": 2,
            "adminType": 2,
            "signature": null,
            "status": 0
        },
        {
            "id": "ff80808169570fea0169b3151d290107",
            "userAccount": "user003",
            "name": "user003",
            "phone": null,
            "country": "chinaPR",
            "email": "user003@huawei.com",
            "vmrId": "911194747",
            "deptCode": "1",
            "deptNamePath": "user002",
            "userType": 2,
            "adminType": 2,
            "signature": null,
            "status": 0
        }]
    }
}
 

CURL命令示例

curl -k -i -H 'content-type: application/json' -X POST -H 'Authorization: Basic VUVwVU82SWFISU0ySWlKaEdoRllRUXk0MUZnbk00Mkpk' -d '{"condition": "","deptCode": "1","pageIndex": 1,"pageSize": 10,"enableSubDept":true,"adminType":2,"status":0}' https://api.meeting.huaweicloud.com/rest/usg/datacenter/v1/corp/member/search