Querying Accounts (a V3 API)
Function
This API is used to query accounts.
Constraints
None
API Calling
For details, see Calling APIs.
Authorization Information
Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions Policies and Supported Actions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
URI
GET /v3/{project_id}/instances/{instance_id}/users
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. Constraints N/A Range The value contains 32 characters. Only letters and digits are allowed. Default Value N/A |
| instance_id | Yes | String | Definition Instance ID, which uniquely identifies an instance. Constraints N/A Range The value contains 36 characters with a suffix of in09. Only letters and digits are allowed. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | No | Integer | Definition Which page the server starts returning items Constraints N/A Range The value is greater than or equal to 0. Default Value 0 |
| limit | No | Integer | Definition Number of records on each page Constraints N/A Range The value is greater than 0 and less than or equal to 128. Default Value 10 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. Constraints N/A Range N/A Default Value N/A |
Example Request
Querying accounts
get https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/61a4ea66210545909d74a05c27a7179ein09/users
{
"total" : 3,
"offset" : 0,
"limit" : 1,
"users" : [ {
"databases" : [ ],
"created" : "2025-12-12T04:03:46+0000",
"name" : "testwuli61",
"password_lifetime" : null,
"expiration_time" : null,
"description" : "",
"base_authority" : [ "ALTER", "CREATE", "DELETE", "DROP", "INDEX", "INSERT", "SELECT", "UPDATE" ],
"password_last_changed" : "2025-12-12T04:03:46+0000",
"status" : "RUNNING"
} ]
} Response Parameters
- Normal response
| Parameter | Type | Description |
|---|---|---|
| users | Array of GetUsersListDetailResponses objects | Definition DDM account information Range N/A |
| offset | Integer | Definition Which page the server starts returning items Range The value is greater than or equal to 0. |
| limit | Integer | Definition Number of records on each page Range The value is greater than 0 and less than or equal to 128. |
| total | Integer | Definition Total number of records Range N/A |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition Name of a DDM account Range N/A |
| status | String | Definition Status of the DDM account Range N/A |
| base_authority | Array of strings | Definition Basic permissions of the DDM account Range The value can be CREATE, DROP, ALTER, INDEX, INSERT, DELETE, UPDATE, or SELECT. |
| password_lifetime | Long | Definition Password validity period of a DDM account Range The value is an integer ranging from 0 to 65535, in days. The value 0 or null indicates that the password never expires. |
| password_last_changed | String | Definition Time when the password of the DDM account was last changed The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is +0800. Range N/A |
| description | String | Definition Account description Range N/A |
| created | String | Definition Time when the DDM account was created The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is +0800. Range N/A |
| databases | Array of GetUsersListdatabase objects | Definition Associated schemas. The account can access only the associated schemas. Range N/A |
| expiration_time | String | Definition Time when the password of the DDM account expires The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is +0800. Range N/A |
Example Response
- Normal response example
{
"users" : [ {
"name" : "testuser",
"status" : "RUNNING",
"base_authority" : [ "SELECT" ],
"description" : "for project a",
"created" : "2025-12-12T04:03:46+0000",
"password_last_changed" : "2025-12-12T04:03:46+0000",
"password_lifetime" : null,
"expiration_time" : null,
"databases" : [ {
"name" : "logicdb1"
} ]
} ],
"offset" : 0,
"limit" : 1,
"total" : 3
} - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot