Help Center/ MapReduce Service/ API Reference/ API V2/ Data Connection Management/ Querying the Data Connection List - ListDataConnector
Updated on 2026-06-27 GMT+08:00

Querying the Data Connection List - ListDataConnector

Function

This API is used to query the list of data connections.

Constraints

None

Debugging

You can debug this API in API Explorer, which supports automatic authentication and authorization. API Explorer can automatically generate sample SDK code and supports sample SDK code debugging.

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, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependency

    mrs:dataConnector:listInstance

    List

    -

    -

    -

    -

URI

GET /v2/{project_id}/data-connectors

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Constraints

N/A

Range

The value must consist of 1 to 64 characters. Only letters and digits are allowed.

Default Value

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

connector_id

No

String

Definition

Connection ID.

Constraints

N/A

Range

The value can contain 1 to 64 characters, including only letters, digits, underscores (_), and hyphens (-).

Default Value

N/A

source_type

No

String

Definition

Data source type.

Constraints

N/A

Range

  • RDS_POSTGRES: RDS PostgreSQL database
  • RDS_MYSQL: RDS MySQL database
  • gaussdb-mysql: TaurusDB

Default Value

N/A

connector_name

No

String

Definition

Data connection name.

Constraints

N/A

Range

N/A

Default Value

N/A

limit

No

Integer

Definition

Number of resources on each page.

Constraints

N/A

Range

1-1000

Default Value

N/A

offset

No

Integer

Definition

Start offset of the pagination query.

Constraints

N/A

Range

≥0

Default Value

N/A

available

No

Boolean

Definition

Whether the data connection is valid.

Constraints

N/A

Range

true: The connection is valid.

false: The connection is invalid.

Default Value

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

total_count

Integer

Definition

Total number of data connections

Constraints

N/A

Range

N/A

Default Value

N/A

data_connectors

Array of DataConnectorDetail objects

Definition

Data connection details list. For details, see Table 4.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 4 DataConnectorDetail

Parameter

Type

Description

connector_name

String

Definition

Data connection name.

Constraints

N/A

Range

N/A

Default Value

N/A

source_type

String

Definition

Data connection type.

Constraints

N/A

Range

  • RDS_POSTGRES: RDS PostgreSQL database
  • RDS_MYSQL: RDS MySQL database
  • gaussdb-mysql: TaurusDB

Default Value

N/A

source_info

String

Definition

Data source information, which is in JSON format.

Constraints

N/A

Range

N/A

Default Value

N/A

connector_id

String

Definition

Data connection ID.

Constraints

N/A

Range

N/A

Default Value

N/A

create_time

Long

Definition

Time when the connection is created.

Constraints

N/A

Range

N/A

Default Value

N/A

last_update_time

Long

Definition

Last update time of the connection.

Constraints

N/A

Range

N/A

Default Value

N/A

create_by

String

Definition

Creator ID.

Constraints

N/A

Range

N/A

Default Value

N/A

create_user

String

Definition

Creator username.

Constraints

N/A

Range

N/A

Default Value

N/A

tenant_id

String

Definition

Tenant ID.

Constraints

N/A

Range

N/A

Default Value

N/A

last_update_by

String

Definition

ID of the user who last updated the information.

Constraints

N/A

Range

N/A

Default Value

N/A

status

Integer

Definition

Data connection status.

Constraints

N/A

Range

  • -1: deleted
  • 0: normal
  • -2: abnormal
  • 1: in use

Default Value

N/A

used_clusters

String

Definition

Clusters using the connection.

Constraints

N/A

Range

N/A

Default Value

N/A

encrypt_type

Integer

Definition

Encryption type

Constraints

N/A

Range

  • generalCipher: International cryptographic algorithm
  • SMCompatible: Chinese cryptographic algorithm

Default Value

N/A

Example Request

None

Example Response

Status code: 200

Successful query of the data connection list

{
  "total_count" : 1,
  "data_connectors" : [ {
    "connector_id" : "7d169c6c-ab50-4a56-a5d2-240ca20aabda",
    "connector_name" : "test",
    "create_time" : 1681270961,
    "source_type" : "RDS_MYSQL",
    "source_info" : "{\"rds_instance_id\":\"3ce1ae8af8cd43b2bcbd18b7541bb8b0in01\",\"jdbc_url\":\"jdbc:mysql://192.XXX.XXX.XXX:3306/test?socketTimeout=60000\",\"db_name\":\"test\",\"user_name\":\"root\",\"driver_path\":\"mrs-public/drivers/mysql-connector-java-5.1.47.jar\"}",
    "last_update_time" : 1681270961,
    "create_by" : "148c89d603e048b291f5940935b38f46",
    "create_user" : "xxx",
    "tenant_id" : "xxxxe662a7e24cc99bfc858c4558dbf6",
    "last_update_by" : "148c89d603e048b291f5940935b38f46",
    "status" : 0,
    "encrypt_type" : 2
  } ]
}

Status Codes

See Status Codes.

Error Codes

See Error Codes.