Updated on 2023-12-22 GMT+08:00

Querying Users in Pages

Description

This API is used by an enterprise administrator to query enterprise users in pages.

Debugging

You can debug this API in API Explorer.

Prototype

Table 1 Prototype

Request Method

GET

Request Address

/v1/usg/dcs/corp/member

Transport Protocol

HTTPS

Request Parameters

Table 2 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.

limit

No

Integer

Query

Number of records to query.

Default value: 10.

searchKey

No

String

Query

Search criteria. Fuzzy search by name, mobile number, email address, account, and third-party user ID is supported.

sortField

No

String

Query

Sort field.

Options:

  • userType
  • adminType
  • ldapAccount
  • deptCode
  • status
  • sortLevel

isAsc

No

Boolean

Query

Whether to sort records in ascending order.

deptCode

No

String

Query

Department code. If this parameter is not specified, all departments are queried.

enableSubDept

No

Boolean

Query

Whether to query sub-departments.

Default value: true.

adminType

No

Integer

Query

Query by administrator type.

  • 1: common administrator.
  • 2: non-administrator.

enableRoom

No

Boolean

Query

Whether to query SmartRooms users.

NOTE:

This parameter will be discarded. Do not use it.

userType

No

Array of integers

Query

User type. If the request does not contain this parameter, common users are queried by default.

  • 2: common user.
  • 12: smart TV user.
  • 13 IdeaHub user.
  • 14: SmartRooms user.

status

No

Integer

Query

User status. If this parameter is not specified, all records are queried.

  • 0: normal.
  • 1: disabled.

containsUnActive

No

Boolean

Query

Whether to query inactive terminals.

Default value: false.

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

Table 3 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 4 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 SearchUserResultDTO objects

Enterprise user details.

Table 5 SearchUserResultDTO data structure

Parameter

Type

Description

activeCode

String

Activation code.

activeCodeExpireTime

Long

Expiration time of the activation code, which is a UTC timestamp.

activeTime

Long

Activation time (UTC timestamp).

adminType

Integer

Administrator type.

  • 0: default (super) administrator.
  • 1: common administrator.
  • 2: common enterprise member (This value is valid only when UserType is set to 2.)

country

String

Country or region that the mobile number belongs to.

deptCode

String

Department code.

deptNamePath

String

Department name path.

desc

String

Remarks.

email

String

Email address.

englishName

String

English name.

expireTime

Long

Expiration time of an activated terminal, which is a UTC timestamp.

hidePhone

Boolean

Whether to hide the mobile number.

id

String

User UUID.

license

Integer

License.

  • 0: commercial use.
  • 1: free trial.

name

String

Name.

phone

String

Mobile number.

signature

String

Signature.

sortLevel

Integer

Sequence number in the corporate directory. A smaller value indicates a higher position in the corporate directory.

maximum: 10000

minimum: 1

status

Integer

User status.

  • 0: normal.
  • 1: disabled.

thirdAccount

String

Third-party user ID.

title

String

Job title.

userAccount

String

Huawei Cloud Meeting account.

userType

Integer

User type.

  • 2: common user.
  • 12: smart TV user.
  • 13 IdeaHub user.
  • 14: SmartRooms user.

visionAccount

String

Smart TV account.

vmrId

String

Personal cloud meeting room ID.

Example Request

GET /v1/usg/dcs/corp/member
Connection: keep-alive
X-Access-Token: stb7PzruAmA6d3JJD578jlAHczGfN4SIaup9
Content-Type: application/json
Content-Length: 125
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
Content-Length: 1329
Connection: keep-alive
Pragma: No-cache
Cache-Control: no-cache
Server: api-gateway
X-Request-Id: 63facce44898efa03629afd189da7f0f

{
    "count": 1,
    "data": [
        {
            "activeCode": null,
            "activeCodeExpireTime": null,
            "activeTime": 1601221696783,
            "adminType": 2,
            "country": "chinaPR",
            "deptCode": "1",
            "deptNamePath": "Root Department",
            "desc": "desc",
            "email": "email@huawei.com",
            "englishName": "englishName",
            "expireTime": null,
            "hidePhone": false,
            "id": "a7f78791553d4ec6b3a4b721f0946286",
            "license": 0,
            "name": "name",
            "phone": "+86123456789",
            "signature": "signature",
            "sortLevel": 10000,
            "status": 0,
            "thirdAccount": "thirdAccount",
            "title": "manager",
            "userAccount": "4036ca5e54d144d9b9e3ed25b9368d3a",
            "userType": 2,
            "visionAccount": null,
            "vmrId": "911150978"
        }
    ],
    "limit": 10,
    "offset": 0
}

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' https://api.meeting.huaweicloud.com/v1/usg/dcs/corp/member