Updated on 2025-10-16 GMT+08:00

Obtaining User Details

Function

This API is used to query user details based on the user ID.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

GET /v1/csms/users/{user_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

user_id

Yes

String

User ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API. The token is the value of X-Subject-Token in the response header.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

user_id

String

User ID.

org_id

String

Organization to which the user belongs.

user_name

String

Username.

name

String

Name.

mobile

String

Mobile number.

email

String

Email address.

pwd_must_modify

Boolean

Whether the password must be changed upon first login.

pwd_change_at

String

Password change time.

created_at

String

Creation time.

updated_at

String

Last modification time.

disabled

Boolean

Disabled or not.

grade

Integer

Trust level.

locked

String

Locked or not.

extension

Object

Custom extended attribute.

user_org_relation_list

Array of UserOrgRelationListResult objects

Relationships between users and organizations.

domain_id

String

Tenant ID.

Table 4 UserOrgRelationListResult

Parameter

Type

Description

org_id

String

Organization ID.

relation_type

String

Relationship type.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error details.

Example Requests

Query user details based on the imported user ID.

/v1/csms/users/{user_id}

Example Responses

Status code: 200

Request succeeded.

{
  "user_id" : "20220413165737132-3BA0-91FCA2CB7",
  "org_id" : "20220117125622909-9346-35755733F",
  "domain_id" : "d4e559b49b3b403da5279723299ed4a6",
  "user_name" : "zhangsan",
  "name" : "zhangsan",
  "mobile" : "12345678901",
  "email" : "zhangsan@example.com",
  "pwd_must_modify" : true,
  "pwd_change_at" : "2022-04-14 10:14:01.988",
  "created_at" : "2022-04-13 16:57:36.532",
  "updated_at" : "2022-04-14 10:14:01.979",
  "disabled" : false,
  "grade" : 1,
  "locked" : false,
  "extension" : { },
  "user_org_relation_list" : [ {
    "org_id" : "20220117125622909-9346-35755733F",
    "relation_type" : 1
  }, {
    "org_id" : "20220415103506608-AF59-5CC9081B9",
    "relation_type" : 0
  } ]
}

Status Codes

Status Code

Description

200

Request succeeded.

400

Request failed.

Error Codes

See Error Codes.