• Identity and Access Management

iam
  1. Help Center
  2. Identity and Access Management
  3. API Reference
  4. User Management
  5. Modifying the Extended Information of a User

Modifying the Extended Information of a User

Function Description

This interface is used to modify the extended information of a user, including mobile phone number, email address, and description.

URI

  • URI format

    POST /v3.0/OS-BASE/users/{user_id}/privacy

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    user_id

    Yes

    String

    ID of the user whose extended information needs to be modified.

Request

  • Request header parameter description

    Parameter

    Mandatory

    Type

    Description

    Content-Type

    Yes

    String

    Fill application/json;charset=utf8 in this field.

    X-Auth-Token

    Yes

    String

    An authenticated token with the Security Administrator permission or the token of the user.

  • Request body parameter description

    Parameter

    Mandatory

    Type

    Description

    mfaCode

    No

    String

    MFA verification code. This parameter is required if a virtual MFA device has been bound to the user.

    areacode

    No

    String

    Country code, for example, 0049.

    phone

    No

    String

    New mobile phone number.

    email

    No

    String

    New email address.

    description

    No

    String

    Description about the user with not more than 255 characters.

  • Sample request
    1. Create the temporary file ${filename}.json based on the following template. ${filename} indicates the temporary file name, which is user-defined.
    {
        "user": {
            "mfaCode":"123456",
            "areacode": "0049",
            "phone":"12345678",
            "email": "jdoe@example.com",
             "description":"**********"
    
        }
    }
    
    2. Run the following command under the directory of the ${filename}.json file.
    curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -H "X-Auth-Token:$token" -X POST -d @${filename}.json https://172.30.48.86:31943/v3.0/OS-BASE/users/2c1c6c54e59141b889c99e6fada5f19f/privacy
    3. Run the following command under the directory of the ${filename}.json file to delete the ${filename}.json file.
    rm ${filename}.json

Response

No response body.

Status Codes

Status Code

Description

204

The request is successful.

400

The server failed to process the request.

401

You must enter a username and password to access the requested page.

403

You are forbidden to access the requested page.

406

You are not allowed to use the method specified in the request.