Updated on 2025-12-29 GMT+08:00

Listing ACL Accounts

Function

This API is used to query the ACL account list.

URI

GET /v2/{project_id}/instances/{instance_id}/accounts

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details, see Obtaining a Project ID.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

instance_id

Yes

String

Definition:

Instance ID. It can be viewed on the instance details page on the DCS console.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

accounts

Array of AclAccountResp objects

Definition:

ACL user list.

Table 3 AclAccountResp

Parameter

Type

Description

account_id

String

Definition:

ACL user ID.

Range:

N/A

account_name

String

Definition:

ACL username.

Range:

N/A

account_type

String

Definition:

ACL user type.

Range:

normal: normal user

default: default user

instance_id

String

Definition:

ID of the instance to which the account belongs.

Range:

N/A

status

String

Definition:

ACL user status.

Range:

  • CREATING: The account is being created.

  • AVAILABLE: The account is available.

  • DELETEFAILED: The account fails to be deleted.

  • DELETING: The account is being deleted.

  • UPDATING: The account is being updated.

  • ERROR: The account is abnormal.

account_role

String

Definition:

User permissions.

Range:

read: read-only

write: read and write

description

String

Definition:

User description.

Range:

N/A

error_code

String

Definition:

Error code. This parameter is not used currently and is set to null.

Range:

N/A

account_read_policy

String

Definition:

Read requests are routed to master or replica nodes.

Range:

  • master: Read requests are routed to the master node.

  • replica: Read requests are routed to the replica node.

  • master-replica: Read requests are routed to the master and replica nodes.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

Definition:

Error message.

Range:

N/A

error_code

String

Definition:

Error code.

Range:

For details, see Error Codes.

error_ext_msg

String

Definition:

Extended error information. This parameter is not used currently and is set to null.

Range:

N/A

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Definition:

Error message.

Range:

N/A

error_code

String

Definition:

Error code.

Range:

For details, see Error Codes.

error_ext_msg

String

Definition:

Extended error information. This parameter is not used currently and is set to null.

Range:

N/A

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Definition:

Error message.

Range:

N/A

error_code

String

Definition:

Error code.

Range:

For details, see Error Codes.

error_ext_msg

String

Definition:

Extended error information. This parameter is not used currently and is set to null.

Range:

N/A

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Definition:

Error message.

Range:

N/A

error_code

String

Definition:

Error code.

Range:

For details, see Error Codes.

error_ext_msg

String

Definition:

Extended error information. This parameter is not used currently and is set to null.

Range:

N/A

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_msg

String

Definition:

Error message.

Range:

N/A

error_code

String

Definition:

Error code.

Range:

For details, see Error Codes.

error_ext_msg

String

Definition:

Extended error information. This parameter is not used currently and is set to null.

Range:

N/A

Example Requests

GET https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/accounts

Example Responses

Status code: 200

ACL accounts listed successfully.

{
  "accounts" : [ {
    "account_id" : "cb067c67-f08b-4024-af14-f78b58b76a44",
    "account_name" : "roUser",
    "account_type" : "normal",
    "instance_id" : "10fda556-51c3-4cfa-ab6f-37667428da6e",
    "status" : "available",
    "account_role" : "read",
    "description" : "This is a read-only account.",
    "error_code" : null
  } ]
}

Status code: 400

Invalid request.

{
  "error_code" : "DCS.4964",
  "error_msg" : "Failed to query acl list."
}

Status Codes

Status Code

Description

200

ACL accounts listed successfully.

400

Invalid request.

401

Authentication failed.

403

Request rejected.

404

Incorrect path.

500

Internal error.

Error Codes

See Error Codes.