Help Center/ Data Admin Service/ API Reference/ APIs (in OBT)/ Development Tool/ Querying the Instance Connection List
Updated on 2025-11-26 GMT+08:00

Querying the Instance Connection List

Function

This API is used to querying the instance connection list.

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.

    Action

    Access Level

    Resource Type (*: Required)

    Condition Key

    Alias

    Dependency

    das::showCloudDBAInfo

    read

    -

    -

    -

    -

URI

GET /v3/{project_id}/list-connections

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Explanation:

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

Constraints:

N/A

Values:

The value can contain 32 characters, including only letters and digits.

Default value:

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

condition

No

String

Explanation:

Keywords such as the DB instance address, instance name, and remarks

Constraints:

N/A

Values:

N/A

Default value:

N/A

offset

No

Integer

Explanation:

Index offset. The query starts from the next piece of data indexed by this parameter. If this parameter is set to 1 and limit is set to 10, only the second to eleventh records are displayed.

Constraints:

N/A

Values:

[0, 2^31-1]

Default value:

0: The query starts from the first data record.

limit

No

Integer

Explanation:

Number of records to be queried. If this parameter is set to 10, a maximum of 10 records can be displayed.

Constraints:

N/A

Values:

[1, 200]

Default value:

100

network_type

No

String

Explanation:

Source database type

Constraints:

N/A

Values:

  • rds
  • gaussdb
  • dds
  • ddm

Default value:

N/A

datastore_type

No

String

Explanation:

DB engine type

Constraints:

N/A

Values:

  • mysql
  • sqlserver
  • postgresql
  • taurus
  • gaussdbv5
  • mongodb
  • ddm

Default value:

N/A

connection_type

No

String

Explanation:

Connection type

Constraints:

N/A

Values:

  • NORMAL: created connection
  • SHARE: connection shared by others

Default value:

N/A

instance_id

No

String

Explanation:

Unique ID of an instance

Constraints:

N/A

Values:

The value can contain 32 characters, including only letters and digits.

Default value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

total_record

Integer

Explanation:

Total number of records

Values:

N/A

das_conn_info_list

Array of Table 4 objects

Explanation:

Connection information list

Values:

N/A

Table 4 das_conn_info_list

Parameter

Type

Description

connection_id

String

Explanation:

Connection ID

Values:

The value is a UUID containing 36 characters. Only letters, digits, and hyphens (-) are allowed.

instance_id

String

Explanation:

Instance ID

Values:

The value can contain 32 characters, including only letters and digits.

instance_name

String

Explanation:

Instance name

Values:

N/A

network_type

String

Explanation:

Source database type

Values:

  • rds
  • gaussdb
  • dds
  • ddm

engine_type

String

Explanation:

DB engine type

Values:

  • mysql
  • sqlserver
  • postgresql
  • taurus
  • gaussdbv5
  • mongodb
  • ddm

datastore_version

String

Explanation:

Database version

Values:

N/A

user_name

String

Explanation:

Username

Values:

N/A

database_name

String

Explanation:

Database name

Values:

N/A

is_save_password

Boolean

Explanation:

Whether a password needs to be saved

Values:

N/A

ip_address

String

Explanation:

IP address

Values:

N/A

port

Integer

Explanation:

Port number

Values:

[1,65536]

remarks

String

Explanation:

Remarks

Values:

N/A

create_at

Long

Explanation:

Time when a connection was created

Values:

N/A

status

String

Explanation:

Status

Values:

  • NORMAL: normal
  • INSTANCE_DELETE: An instance is deleted.

conn_share_type

String

Explanation:

Connection type

Values:

  • NORMAL: normal connection
  • SHARE: shared connection

shared_user_name

String

Explanation:

Sharer name

Values:

N/A

shared_user_id

String

Explanation:

Sharer ID

Values:

N/A

expired_time

Long

Explanation:

Time when a shared connection expires

Values:

N/A

Example Request

Querying the instance connection list

GET https://das.cn-north-7.myhuaweicloud.com/v3/052041494800d57c2f02c00275b4c247/list-connections?curpage=0&perpage=50&connectionType=NORMAL

Example Response

Status code: 200

Successful request

{ 
  "total_record" : 1, 
  "das_conn_info_list" : [ { 
    "engine_type" : "mysql", 
    "datastore_version" : "mysql 5.7.44", 
    "network_type" : "rds", 
    "connection_id" : "bcca4e8e-f0d8-4f96-b359-393a66d29c09", 
    "instance_name" : "rds-mysql-2502", 
    "instance_id" : "364a5d0498974d459782975e8b65bc13in01", 
    "ip_address" : "192.168.0.204", 
    "port" : 3306, 
    "user_name" : "root", 
    "is_save_password" : true, 
    "status" : "NORMAL", 
    "create_at" : 1738745756479, 
    "conn_share_type" : "NORMAL" 
  } ] 
}

Status Codes

Status Code

Description

200

Successful request

400

Client error

500

Server error

Error Codes

See Error Codes.