查询企业通讯录 - SearchCorpDir
描述
企业用户(含管理员)通过该接口查询该企业的通讯录。
调试
您可以在API Explorer中调试该接口。
URI
GET /v1/usg/abs/users
请求参数
参数 | 是否必须 | 类型 | 位置 | 描述 |
|---|---|---|---|---|
offset | 否 | Integer | Query | 查询偏移量,若超过最大数量,则返回最后一页的数据。 默认值:0 |
limit | 否 | Integer | Query | 查询数量。 默认值:100 |
searchKey | 否 | String | Query | 搜索条件。支持账号、SIP号码、名称、手机、邮箱模糊搜索 |
deptCode | 否 | String | Query | 部门编码。 maxLength:32 minLength:0 |
querySubDept | 否 | Boolean | Query | 是否查询子部门下的用户。 默认值:true |
searchScope | 否 | String | Query | 搜索范围。 |
X-Access-Token | 是 | String | Header | 授权令牌。获取“执行App ID鉴权”响应的accessToken。 |
X-Request-Id | 否 | String | Header | 请求requestId,用来标识一路请求,用于问题跟踪定位,建议使用UUID,若不携带,则后台自动生成。 |
Accept-Language | 否 | String | Header | 语言参数,默认为中文zh-CN,英文为en-US。 |
状态码
HTTP状态码 | 描述 |
|---|---|
200 | 操作成功。 |
400 | 参数异常。 |
401 | 未鉴权或鉴权失败。 |
403 | 权限受限。 |
500 | 服务端异常 |
响应参数
参数 | 类型 | 描述 |
|---|---|---|
count | Integer | 总数量。 |
limit | Integer | 每页显示的条目数量。 默认值:10。 |
offset | Integer | 页面起始页,从0开始 |
data | Array of UserDTO objects | 分页查询企业用户信息。 |
参数 | 类型 | 描述 |
|---|---|---|
account | String | 用户账号。 |
deptName | String | 用户部门。 |
description | String | 描述信息。 |
String | 邮箱。 | |
englishName | String | 英文名。 |
hidePhone | Boolean | 是否隐藏手机号(如果为true,其他人查询该用户时,不会返回该用户的手机号。自己查自己是可见的) |
id | String | 用户ID。 |
isHardTerminal | Boolean | 是否为硬终端。 说明: 该参数将废弃,请勿使用。 |
name | String | 用户名。 |
number | String | 用户SIP号码。 |
phone | String | 用户手机。 |
signature | String | 用户签名。 |
statusCode | Integer | 查询用户详情时, 根据不同情况,响应不同。
|
title | String | 职位。 |
type | String | 类型:
|
updateTime | Long | 用户信息最后更新时间,更新时间按照时间戳格式返回。 |
vmrId | String | 用户个人会议ID。 |
deptCodes | Array of strings | 部门编码列表。 |
请求消息示例
GET /v1/usg/abs/users Connection: keep-alive X-Access-Token: stbiQWNk96PwWeKsA32h81u9YSiK3xZhpNEU Content-Type: application/json Content-Length: 102 Host: api.meeting.huaweicloud.com User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_191)
响应消息示例
HTTP/1.1 200
Date: Wed, 18 Dec 2019 06:20:40 GMT
Content-Type: application/json;charset=UTF-8
Connection: keep-alive
http_proxy_id: 1fd3a76bc862c7bc7f7c9b09bea87647
Server: api-gateway
X-Request-Id: 7f3dc39fd1af5f1f274641d46ed720ba
{
"offset": 0,
"limit": 100,
"count": 1,
"data": [
{
"id": "067f692ed2ce492182a44579f6bc82aa",
"statusCode": 0,
"account": "067f692ed2ce492182a44579f6bc82aa",
"name": "TE30",
"englishName": null,
"email": null,
"phone": null,
"deptName": "wangyue",
"number": "+99111283523475338",
"signature": null,
"title": null,
"description": null,
"vmrId": null,
"updateTime": 1567405876353,
"isHardTerminal": true,
"hidePhone": false,
"type": "HARD_TERMINAL",
"deptCodes": [
"1"
]
}
]
} 错误码
当您使用华为云会议服务端API时,如果遇到“MMC”或者“USG”开头的错误码,请参考华为云API错误中心。
CURL命令示例
curl -k -i -X GET -H 'X-Access-Token: stbiQWNk96PwWeKsA32h81u9YSiK3xZhpNEU' https://api.meeting.huaweicloud.com/v1/usg/abs/users

