Queries the details of users.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListUsers

The operation that you want to perform. Set the value to ListUsers.

Tid Long Yes 3***

The ID of the tenant. You can call the GetUserActiveTenant operation to query the ID of the tenant.

Role String No DBA

The role that is assigned to the user. Valid values:

  • USER: a regular user role.
  • DBA: a database administrator (DBA) role.
  • ADMIN: a Data Management (DMS) administrator role.
  • SECURITY_ADMIN: a security administrator role.
  • STRUCT_READ_ONLY: a schema read-only user role.
Note To check your role, move the pointer over the profile picture in the upper-right corner of the DMS console.
UserState String No NORMAL

The status of the user. Valid values:

  • NORMAL: The user is normal.
  • DISABLE: The user is disabled.
  • DELETE: The user is deleted.
SearchKey String No test

The search keyword. Fuzzy match is supported.

PageNumber Integer No 1

The number of the page to return.

PageSize Integer No 10

The number of entries to return on each page.

Note Valid values: 10, 20, 50, and 100. Default value: 10.
RegionId String No cn-hangzhou

The ID of the region where DMS is activated. Set this parameter to the ID of the region that is close to your services. For more information about the valid values of the parameter, see RegionID parameter.

Response parameters

Parameter Type Example Description
TotalCount Long 3

The total number of entries returned.

RequestId String 67E910F2-4B62-5B0C-ACA3-7547695C****

The ID of the request.

ErrorCode String InvalidTid

The error code returned.

ErrorMessage String Specified parameter Tid is not valid.

The error message returned.

UserList Array of User

The details of users.

User
State String NORMAL

The status of the user. Valid values:

  • NORMAL: The user is normal.
  • DISABLE: The user is disabled.
  • DELETE: The user is deleted.
CurResultCount Long 0

The number of rows that are queried on the current day.

UserId String 8****

The ID of the user.

LastLoginTime String 2021-11-08 13:43:43

The last time when the user logged on to the console.

MaxResultCount Long 50000

The maximum number of rows that can be queried on the current day.

ParentUid String 140692647406****

The UID of the Alibaba Cloud account of the user.

RoleIdList Array of Integer 3

The ID of the role that is assigned to the user. Valid values:

  • 1: a regular user role.
  • 2: a DBA role.
  • 3: a DMS administrator role.
  • 4: a security administrator role.
  • 6: a schema read-only user role.
RoleNameList Array of String ADMIN

The name of the role that is assigned to the user. Valid values:

  • USER: a regular user.
  • DBA: a DBA.
  • ADMIN: a DMS administrator.
  • SECURITY_ADMIN: a security administrator.
  • STRUCT_READ_ONLY: a schema read-only user.
NickName String test_NickName

The nickname of the user.

MaxExecuteCount Long 2000

The maximum number of queries that can be performed on the current day.

CurExecuteCount Long 0

The number of queries that are performed on the current day.

Mobile String 1389999****

The mobile phone number that is used to receive notifications.

Note
  • The system returns this parameter if the user has set a mobile phone number in the console. To set a mobile phone number in the console, move the pointer over the profile picture in the upper-right corner and click the Edit icon next to Notice.
  • The system does not return this parameter if the user has not set a mobile phone number.
Uid String 167382665015****

The UID of the user.

Email String username@example.com

The email address that is used to receive notifications.

Note
  • The system returns this parameter if the user has set an email address in the console. To set an email address in the console, move the pointer over the profile picture in the upper-right corner and click the Edit icon next to Notice.
  • The system does not return this parameter if the user has not set an email address.
DingRobot String https://XXX.dingtalk.com/robot/send?access_token=9b7a4a562cbe7fcdea9962afac7b9d7b4504d564948083419750f9cafa78e4ef

The DingTalk chatbot URL that is used to receive notifications.

Note
  • The system returns this parameter if the user has set a DingTalk chatbot URL in the console. To set a DingTalk chatbot URL in the console, move the pointer over the profile picture in the upper-right corner and click the Edit icon next to Notice.
  • The system does not return this parameter if the user has not set a DingTalk chatbot URL.
Webhook String http://dms-XXX.aliyun.com:8***

The webhook URL that is used to receive notifications.

Note
  • If the user has set a webhook URL, DMS sends notifications to the specified URL.
  • The system does not return this parameter if the user has not set a webhook URL.
SignatureMethod String HMAC_SHA1

The signature method that is used to secure connections when a webhook URL is used. Valid values:

  • NONE: no signature.
  • HMAC_SHA1: HMAC-SHA1.
NotificationMode String DINGROBOT

The notification method. The system returns one or more values. Valid values:

  • SMS: text message.
  • EMAIL: email.
  • DingTalk: DingTalk.
  • DINGROBOT: DingTalk chatbot.
  • WEBHOOK: webhook.
Success Boolean true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.

Examples

Sample requests

http(s)://dms-enterprise.aliyuncs.com/?Action=ListUsers
&Tid=3***
&Role=DBA
&UserState=NORMAL
&SearchKey=test
&PageNumber=1
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListUsersResponse>
    <TotalCount>3</TotalCount>
    <RequestId>67E910F2-4B62-5B0C-ACA3-7547695C****</RequestId>
    <UserList>
        <User>
            <Email>test1_email</Email>
            <RoleNameList>
                <RoleNames>DBA</RoleNames>
            </RoleNameList>
            <NickName>Ms. Wang</NickName>
            <MaxExecuteCount>2000</MaxExecuteCount>
            <CurResultCount>0</CurResultCount>
            <LastLoginTime>2021-10-22 17:02:19</LastLoginTime>
            <Uid>23236106758310****</Uid>
            <RoleIdList>
                <RoleIds>2</RoleIds>
            </RoleIdList>
            <MaxResultCount>10000</MaxResultCount>
            <State>NORMAL</State>
            <UserId>13****</UserId>
            <CurExecuteCount>1</CurExecuteCount>
            <ParentUid>140692647406****</ParentUid>
        </User>
        <User>
            <Email>test2_email</Email>
            <RoleNameList>
                <RoleNames>ADMIN</RoleNames>
                <RoleNames>USER</RoleNames>
                <RoleNames>SECURITY_ADMIN</RoleNames>
                <RoleNames>DBA</RoleNames>
                <RoleNames>SUPPORT</RoleNames>
            </RoleNameList>
            <NickName>Mr. Wang</NickName>
            <MaxExecuteCount>2000</MaxExecuteCount>
            <CurResultCount>400</CurResultCount>
            <LastLoginTime>2021-09-16 10:19:58</LastLoginTime>
            <Uid>26984203785603****</Uid>
            <RoleIdList>
                <RoleIds>3</RoleIds>
                <RoleIds>1</RoleIds>
                <RoleIds>4</RoleIds>
                <RoleIds>2</RoleIds>
                <RoleIds>5</RoleIds>
            </RoleIdList>
            <MaxResultCount>10000</MaxResultCount>
            <State>NORMAL</State>
            <UserId>12****</UserId>
            <CurExecuteCount>5</CurExecuteCount>
            <ParentUid>140692647406****</ParentUid>
        </User>
        <User>
            <NotificationMode>DINGROBOT</NotificationMode>
            <Email>username@example.com</Email>
            <RoleNameList>
                <RoleNames>ADMIN</RoleNames>
                <RoleNames>USER</RoleNames>
                <RoleNames>SECURITY_ADMIN</RoleNames>
                <RoleNames>DBA</RoleNames>
                <RoleNames>STRUCT_READ_ONLY</RoleNames>
            </RoleNameList>
            <NickName>test_NickName</NickName>
            <MaxExecuteCount>2000</MaxExecuteCount>
            <CurResultCount>0</CurResultCount>
            <LastLoginTime>2021-11-08 13:43:43</LastLoginTime>
            <Uid>167382665015****</Uid>
            <RoleIdList>
                <RoleIds>3</RoleIds>
                <RoleIds>1</RoleIds>
                <RoleIds>4</RoleIds>
                <RoleIds>2</RoleIds>
                <RoleIds>6</RoleIds>
            </RoleIdList>
            <MaxResultCount>50000</MaxResultCount>
            <State>NORMAL</State>
            <UserId>8****</UserId>
            <CurExecuteCount>0</CurExecuteCount>
            <Webhook>http://****.aliyun.com:8080</Webhook>
            <SignatureMethod>HMAC_SHA1</SignatureMethod>
            <DingRobot>https://****.dingtalk.com/robot/send?access_token=9b7a4a562cbe7fcdea9962afac7b9d7b4504d564948083419750f9cafa78****</DingRobot>
        </User>
    </UserList>
    <Success>true</Success>
</ListUsersResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalCount" : 3,
  "RequestId" : "67E910F2-4B62-5B0C-ACA3-7547695C****",
  "UserList" : {
    "User" : [ {
      "Email" : "test1_email",
      "RoleNameList" : {
        "RoleNames" : [ "DBA" ]
      },
      "NickName" : "Ms. Wang",
      "MaxExecuteCount" : 2000,
      "CurResultCount" : 0,
      "LastLoginTime" : "2021-10-22 17:02:19",
      "Uid" : "23236106758310****",
      "RoleIdList" : {
        "RoleIds" : [ 2 ]
      },
      "MaxResultCount" : 10000,
      "State" : "NORMAL",
      "UserId" : "13****",
      "CurExecuteCount" : 1,
      "ParentUid" : "140692647406****"
    }, {
      "Email" : "test2_email",
      "RoleNameList" : {
        "RoleNames" : [ "ADMIN", "USER", "SECURITY_ADMIN", "DBA", "SUPPORT" ]
      },
      "NickName" : "Mr. Wang",
      "MaxExecuteCount" : 2000,
      "CurResultCount" : 400,
      "LastLoginTime" : "2021-09-16 10:19:58",
      "Uid" : "26984203785603****",
      "RoleIdList" : {
        "RoleIds" : [ 3, 1, 4, 2, 5 ]
      },
      "MaxResultCount" : 10000,
      "State" : "NORMAL",
      "UserId" : "12****",
      "CurExecuteCount" : 5,
      "ParentUid" : "140692647406****"
    }, {
      "NotificationMode" : "DINGROBOT",
      "Email" : "username@example.com",
      "RoleNameList" : {
        "RoleNames" : [ "ADMIN", "USER", "SECURITY_ADMIN", "DBA", "STRUCT_READ_ONLY" ]
      },
      "NickName" : "test_NickName",
      "MaxExecuteCount" : 2000,
      "CurResultCount" : 0,
      "LastLoginTime" : "2021-11-08 13:43:43",
      "Uid" : "167382665015****",
      "RoleIdList" : {
        "RoleIds" : [ 3, 1, 4, 2, 6 ]
      },
      "MaxResultCount" : 50000,
      "State" : "NORMAL",
      "UserId" : "8****",
      "CurExecuteCount" : 0,
      "Webhook" : "http://****.aliyun.com:8080",
      "SignatureMethod" : "HMAC_SHA1",
      "DingRobot" : "https://****.dingtalk.com/robot/send?access_token=9b7a4a562cbe7fcdea9962afac7b9d7b4504d564948083419750f9cafa78****"
    } ]
  },
  "Success" : true
}

Error codes

For a list of error codes, visit the API Error Center.