Querying the Corporate Directory
Description
This API is used by an enterprise user or administrator to query the corporate directory.
Debugging
You can debug this API in API Explorer.
Prototype
Request Method |
GET |
---|---|
Request Address |
/v1/usg/abs/users |
Transport Protocol |
HTTPS |
Request Parameters
Parameter |
Mandatory |
Type |
Location |
Description |
---|---|---|---|---|
offset |
No |
Integer |
Query |
Query offset. If the value exceeds the maximum number of records available, records on the last page are returned. Default value: 0. |
limit |
No |
Integer |
Query |
Number of records to query. Default value: 100 |
searchKey |
No |
String |
Query |
Search criteria. Fuzzy search by account, SIP number, name, mobile number, and email address is supported. |
deptCode |
No |
String |
Query |
Department code. maxLength: 32 minLength: 0 |
querySubDept |
No |
Boolean |
Query |
Whether to query users in lower-level departments. Default value: true. |
searchScope |
No |
String |
Query |
Search scope.
|
X-Access-Token |
Yes |
String |
Header |
Authorization token. Use the value of accessToken in the response to the request for Authenticating an App ID. |
X-Request-Id |
No |
String |
Header |
Request ID, which is used for fault tracing and locating. You are advised to use a UUID. If this parameter is not carried, a request ID is automatically generated. |
Accept-Language |
No |
String |
Header |
Language. Values: zh-CN for Chinese (default) and en-US for English. |
Status Codes
HTTP Status Code |
Description |
---|---|
200 |
Operation successful. |
400 |
Invalid parameters. |
401 |
Authentication is not performed or fails. |
403 |
Insufficient permissions. |
500 |
Server exception. |
Response Parameters
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Total number of records. |
limit |
Integer |
Number of records displayed per page. Default value: 10. |
offset |
Integer |
Number of the query start page. The value starts from 0. |
data |
Array of UserDTO objects |
Enterprise user details. |
Parameter |
Type |
Description |
---|---|---|
account |
String |
User account. |
deptName |
String |
Department that the user belongs to. |
description |
String |
User description. |
|
String |
Email address. |
englishName |
String |
English name of the user. |
hidePhone |
Boolean |
Whether to hide the user's mobile number. If the value is true, the mobile number of the user is not returned when other users query the user. |
id |
String |
User ID. |
isHardTerminal |
Boolean |
Whether the account is a hard terminal account.
NOTE:
This parameter will be discarded. Do not use it. |
name |
String |
Name of the user. |
number |
String |
SIP number. |
phone |
String |
Mobile number. |
signature |
String |
User signature. |
statusCode |
Integer |
When user details are queried, the response varies depending on the scenario.
|
title |
String |
Job title. |
type |
String |
User type.
|
updateTime |
Long |
Time when the user information was last updated, in timestamp format. |
vmrId |
String |
Personal meeting ID of the user. |
deptCodes |
Array of strings |
Department code list. |
Example Request
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)
Example Response
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" ] } ] }
Error Codes
If an error code starting with MMC or USG is returned when you use this API, rectify the fault by following the instructions provided in Huawei Cloud API Error Center.
Example cURL Command
curl -k -i -X GET -H 'X-Access-Token: stbiQWNk96PwWeKsA32h81u9YSiK3xZhpNEU' https://api.meeting.huaweicloud.com/v1/usg/abs/users
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot