DataSource list
List visible DataSources by environment and type, with pagination.
POST /api/open/v1/datasource/listDataSources
Requires the “Query Settings Read” permission.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| pageNumber | Integer | Yes | Page number, starting at 1. |
| pageSize | Integer | Yes | Number of records per page, from 1 to 100. |
| envId | Integer | No | Environment ID. See listEnvironments. |
| dataSourceType | String | No | DataSource type. For supported values, see listDataSourceTypes. |
Response fields
| Fields in data | Type | Description |
|---|---|---|
| items | Array of objects | Records on the current page. |
| items[].dataSourceId | Integer | DataSource ID. |
| items[].instanceId | String | Instance identifier. |
| items[].instanceDesc | String | Display name. |
| items[].dataSourceType | String | DataSource type. For supported values, see listDataSourceTypes. |
| items[].envId | Integer or null | Environment ID. |
| items[].lifeCycleState | String | CREATING (registering), CREATED (registered), DELETING (deregistering), LOCKED (locked). |
| total | Integer | Total number of visible records that match the criteria. |
Request example
{
"pageNumber": 1,
"pageSize": 20,
"envId": 3,
"dataSourceType": "MySQL"
}
Response example
{
"requestId": "0d5efce5-6792-51a1-b1e4-1ab5d1505231",
"code": "OK",
"msg": "Request succeeded.",
"data": {
"items": [
{
"dataSourceId": 42,
"instanceId": "my-5samk76gx9hj2tr",
"instanceDesc": "Sales database",
"dataSourceType": "MySQL",
"envId": 3,
"lifeCycleState": "CREATED"
}
],
"total": 1
}
}