Help Center/ Meeting/ Server API Reference/ User Management/ APIs/ Querying User Details in Batches
Updated on 2023-12-22 GMT+08:00

Querying User Details in Batches

Description

This API is used to query details about users or third-party accounts in a batch.

Debugging

You can debug this API in API Explorer.

Prototype

Table 1 Prototype

Request Method

POST

Request Address

/v1/usg/abs/users/list

Transport Protocol

HTTPS

Request Parameters

Table 2 Parameters

Parameter

Mandatory

Type

Location

Description

idType

Yes

String

Query

Query type. The default value is USER_ID.

  • USER_ID: Query user details using Huawei Cloud Meeting user IDs.
  • THIRD_ACCOUNT: Query user details using third-party accounts.

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.

[Array element]

No

Array of ShowUserRequestDTO objects

Body

List of user IDs or third-party accounts.

minLength: 1

maxLength: 200

Table 3 ShowUserRequestDTO data structure

Parameter

Mandatory

Type

Location

Description

id

No

String

Body

User ID or third-party account.

Status Codes

Table 4 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

Table 5 Response Parameters

Parameter

Type

Description

[Array element]

Array of UserDTO objects

User information list.

Table 6 UserDTO data structure

Parameter

Type

Description

id

String

User ID.

statusCode

Integer

When user details are queried, the response varies depending on the scenario.

  • 0: If the query is successful and the user information has changed, the new user information is returned in the response.
  • 1: If the query is successful and the user information has not changed, only the user ID is returned in the response.
  • 2: The user does not exist.
  • 3: No permissions to query the user.

account

String

User account.

name

String

Username.

englishName

String

English name of the user.

email

String

Email address.

phone

String

Mobile number.

deptName

String

Department that the user belongs to.

number

String

SIP number of the user.

updateTime

Long

Time when the user information was last updated.

isHardTerminal

Boolean

Whether the account is a hard terminal account.

NOTE:

This parameter will be discarded. Do not use it.

vmrId

String

Personal meeting ID of the user.

signature

String

User signature.

title

String

Job title.

description

String

Description.

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.

type

String

User type.

  • NORMAL_USER: common user.
  • HARD_TERMINAL: hard terminal user.
  • WHITE_BOARD: third-party whiteboard.
  • HW_VISION_MEMBER: smart TV.
  • IDEA_HUB_MEMBER: IdeaHub user.

deptCodes

Array of strings

Department code list.

Example Request

POST https://{endpoint}/v1/usg/abs/users/list?idType=USER_ID
Connection: keep-alive
X-Access-Token: stb7PzruAmA6d3JJD578jlAHczGfN4SIaup9
Host: api.meeting.huaweicloud.com 
User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_191)

[
    {
        "id": "ff8080816993bac00169bdf14e0800ad"
    },
    {
        "id": "718b8be14f09432caf66f3076505207b"
    }
]

Example Response

HTTP/1.1 200 
Date: Wed, 18 Dec 2019 06:20:40 GMT
Content-Type: application/json;charset=UTF-8
Content-Length: 646
Connection: keep-alive
Pragma: No-cache
Cache-Control: no-cache
Server: api-gateway
X-Request-Id: 551aeb8cafbbaa7bbbdc7b1c76bba8ac

[
    {
        "account": "Zhangsan@example.com",
        "name": "Zhang San",
        "englishName": "Sam",
        "email": "zhangshan@example.com",
        "phone": "177****0476",
        "deptName": "cloudcore",
        "number": "+99111283523475338",
        "updateTime": 1554268817303,
        "isHardTerminal": false,
        "vmrId": "912992631",
        "signature": "Tom's signature",
        "title": "Project Manager",
        "description": "Remarks",
        "type": "NORMAL_USER",
        "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: stb7PzruAmA6d3JJD578jlAHczGfN4SIaup9' -d '[{"id": "ff8080816993bac00169bdf14e0800ad"},{"id": "718b8be14f09432caf66f3076505207b"}]' https://api.meeting.huaweicloud.com/v1/usg/abs/users/list?idType=USER_ID