Retrieve Data Source List
Paginated query of data source list, supports filtering by data source ID, data source name, and data source type.
Request URL: /openapi/v1/datasource/list
Request Method: GET
Request Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
datasourceId | String | No | Data source ID. | ds-d92lj22cb03k |
datasourceType | String | No | Data source type. Values: MySQL, PostgreSQL, SQLServer, Oracle | MySQL |
name | String | No | Data source name. | Production Environment MySQL |
current | Integer | No | Current page number, starting from 1, default is 1. | 1 |
pageSize | Integer | No | Page size, default is 10. | 50 |
Response Parameters
Parameter | Type | Description | Example |
---|---|---|---|
success | Bool | Whether the interface call is successful. Return values: true , false . | true |
requestId | String | Request ID. | Mi6y0FCN-BHEEaHAnCFFp9DFdAAk0OUZ |
data | Array | Data source details, including data source ID (datasourceId), organization ID (orgId), name (name), data source type (datasourceType), username (username), host name (host), port (port), environment (envId), region (regionId), access type (networkType), and other information. | { "datasourceId": "ds-d92mr1g445le", "orgId": "2697478995911717", "name": "127.0.0.1", "datasourceType": "MySQL", "username": "root", "host": "127.0.0.1", "port": 3306, "envId": "env-dev", "regionId": "aliyun-cn-hangzhou", "networkType": "Public" } |
current | Integer | Current page number. | 1 |
pageSize | Integer | Size of each page. | 50 |
total | Integer | Total number of data sources. | 6 |
Successful Invocation Example
{
"success": true,
"requestId": "Mi6y0FCN-BHEEaHAnCFFp9DFdAAk0OUZ",
"data": [{
"datasourceId": "ds-d92mr1g445le",
"orgId": "2697478995911717",
"name": "127.0.0.1",
"datasourceType": "MySQL",
"username": "root",
"host": "127.0.0.1",
"port": 3306,
"envId": "env-dev",
"regionId": "aliyun-cn-hangzhou",
"networkType": "Public"
}],
"current": 1,
"pageSize": 10,
"total": 1
}