Updated on 2024-01-19 GMT+08:00

Modifying a User

Description

This API is used by an enterprise administrator to modify a user.

Debugging

You can debug this API in API Explorer.

Prototype

Table 1 Prototype

Request Method

PUT

Request Address

/v1/usg/dcs/corp/member/{account}

Transport Protocol

HTTPS

Request Parameters

Table 2 Parameters

Parameter

Mandatory

Type

Location

Description

account

Yes

String

Path

Account.

  • If the account and password authentication mode is used, the value is a Huawei Cloud Meeting account.
  • If the app ID authentication mode is used, the value is a third-party user ID.

accountType

No

Integer

Query

Account type. Default value: 0.

  • 0: Huawei Cloud Meeting account, which is used for account and password authentication.
  • 1: third-party user ID, which is used for app ID authentication.

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.

country

No

String

Body

Country or region that the mobile number belongs to.

Default value: chinaPR.

maxLength: 255

minLength: 0

deptCode

No

String

Body

Department code. If this parameter is not carried, the root department is used by default.

Default value: 1.

desc

No

String

Body

Remarks.

maxLength: 128

minLength: 0

email

No

String

Body

Email address.

englishName

No

String

Body

English name of the enterprise user.

maxLength: 64

minLength: 0

hidePhone

No

Boolean

Body

Whether to hide the mobile number.

Default value: false.

name

No

String

Body

Name of the enterprise user.

maxLength: 64

minLength: 1

phone

No

String

Body

Mobile number, which must contain the country code.

For example, a mobile number in Chinese mainland is +86xxxxxxxxxxx. This parameter is combined with the country parameter.

The mobile number can contain only numbers.

The mobile number or email address must be specified.

signature

No

String

Body

Signature.

maxLength: 512

minLength: 0

sortLevel

No

Integer

Body

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

Default value: 10000.

maximum: 10000

minimum: 1

status

No

Integer

Body

User status.

  • 0: normal.
  • 1: disabled.

Default value: 0.

title

No

String

Body

Job title.

maxLength: 32

minLength: 0

vmrId

No

String

Body

Cloud meeting room ID. If this parameter is not carried, the cloud meeting room ID will be automatically generated.

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

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.)

corp

CorpBasicInfoDTO object

Enterprise registration details, which are returned only when users query the personal details of themselves.

country

String

Country or region that the mobile number of the user belongs to.

deptCode

String

Department code.

deptName

String

Department name.

deptNamePath

String

Department name path.

desc

String

Remarks.

devType

QueryDeviceInfoResultDTO object

Type of the associated device.

email

String

Email address.

englishName

String

English name.

function

UserFunctionDTO object

User function flag.

hidePhone

Boolean

Whether to hide the mobile number.

id

String

User ID.

license

Integer

License.

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

name

String

Name.

phone

String

Mobile number.

signature

String

Signature.

sipNum

String

SIP number.

sortLevel

Integer

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

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: enterprise member.

visionAccount

String

Unique smart TV account.

vmrList

Array of UserVmrDTO objects

Cloud meeting room list.

Example Request

PUT /v1/usg/dcs/corp/member/3e48b79b660e403cb5e0208f7be83961?accountType=0
Connection: keep-alive
Content-Type: application/json
X-Access-Token: stb7PzruAmA6d3JJD578jlAHczGfN4SIaup9
Content-Length: 173
Host: api.meeting.huaweicloud.com 
User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_191)

{
    "country": "chinaPR",
    "deptCode": "1",
    "desc": "modDesc",
    "email": "******",
    "englishName": "modEnglishName",
    "hidePhone": true,
    "name": "modName",
    "phone": "+86173****9807",
    "signature": "modSignature",
    "sortLevel": 1,
    "status": 1,
    "title": "modTitle",
    "vmrId": ""
}

Example Response

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

{
    "activeTime": 1601221696783,
    "adminType": 2,
    "corp": null,
    "country": "chinaPR",
    "deptCode": "1",
    "deptName": "Root Department",
    "deptNamePath": "Root Department",
    "desc": "modDesc",
    "devType": {
        "deviceSize": null,
        "model": null,
        "purchaseChannel": null
    },
    "email": "******",
    "englishName": "modEnglishName",
    "function": {
        "enableRoom": true
    },
    "hidePhone": true,
    "id": "f521bebcbb27422cb3241c4cb19942c5",
    "license": 0,
    "name": "modName",
    "phone": "+86173****9807",
    "signature": "modSignature",
    "sipNum": "+8657198480",
    "sortLevel": 1,
    "status": 1,
    "thirdAccount": "thirdAccount",
    "title": "modTitle",
    "userAccount": "3e48b79b660e403cb5e0208f7be83961",
    "userType": 2,
    "visionAccount": null,
    "vmrList": [
        {
            "id": "2c908bc76f61a5f2016f61bbfdf5039b",
            "status": "0",
            "vmrId": "912992631",
            "vmrName": "name's cloud meeting room",
            "vmrPkgId": null,
            "vmrPkgLength": null,
            "vmrPkgName": null,
            "vmrPkgParties": null
        }
    ]
}

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 -H 'content-type: application/json' -X PUT -H 'X-Access-Token: stb7PzruAmA6d3JJD578jlAHczGfN4SIaup9' -d '{"country": "chinaPR","deptCode": "1","desc": "modDesc","email": "******","englishName": "modEnglishName","hidePhone": true,"name": "modName","phone": "+86173****9807","signature": "modSignature","sortLevel": 1,"status": 1,"title": "modTitle","vmrId": ""}' https://api.meeting.huaweicloud.com/v1/usg/dcs/corp/member/3e48b79b660e403cb5e0208f7be83961?accountType=0