Overview
Queries data sources. You can filter the results by cloud provider, region, database type, connection status, and other criteria.
API details
Constraints
The caller must have an AccessKey to access the multi-cloud API. For information about how to obtain the AccessKey ID and AccessKey Secret, see Manage AccessKeys.
Request path
GET /api/v2/datasource/datasources
Request parameters
Header
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| X-Ob-Project-Id | String | Yes | Project ID. | proj-xxxxxxxx |
| X-Ob-Org-Id | String | Yes | Organization ID. | org-xxxxxxxx |
Query
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| page | Integer | No | Page number, starting from 0. | 0 |
| size | Integer | No | Number of entries per page. Default: Integer.MAX_VALUE. |
20 |
| sort | String | No | Sort field and order, for example, sort=id,desc. |
id,desc |
| fullFuzzySearchKeyword | String | No | Keyword for fuzzy matching across all fields. | env |
| cloudProvider | Array<String> | No | Cloud providers. Valid values: ALIYUN, HUAWEI, AWS, GCP, and AZURE. | ALIYUN |
| regionName | Array<String> | No | Region name. | zone-xxxx |
| databaseType | Array<String> | No | Database types. Valid values: OB_MYSQL, OB_ORACLE, MYSQL, ORACLE, TIDB, POSTGRESQL, and KAFKA. | MYSQL |
| status | Array<String> | No | Connection status. Valid values: NOT_TESTED, ACTIVE, INACTIVE, TESTING, and UNAVAILABLE. | ACTIVE |
The following table lists the cloud providers supported for each database type:
Database type |
Supported cloud providers |
Description |
|---|---|---|
OB_MYSQL, OB_ORACLE |
ALIYUN, AWS, AZURE, GCP, HUAWEI |
HUAWEI does not support self-managed databases. |
MYSQL, ORACLE, TIDB |
ALIYUN, AWS, AZURE, GCP |
— |
POSTGRESQL, KAFKA |
ALIYUN, AWS, GCP |
— |
Response parameters
Field |
Type |
Description |
|---|---|---|
| success | Boolean | Whether the request succeeded. |
| httpStatus | String | HTTP status code. |
| data | PaginatedData | Paginated data. |
PaginatedData structure
Field |
Type |
Description |
|---|---|---|
| page | Page | Pagination information. |
| contents | Array<DataSource> | List of data sources. |
Page structure
Field |
Type |
Description |
Example value |
|---|---|---|---|
| totalElements | Integer | Total number of entries. | 100 |
| totalPages | Integer | Total number of pages. | 10 |
| number | Integer | Current page number, starting from 1. | 1 |
| size | Integer | Number of entries per page. | 20 |
DataSource structure
Field |
Type |
Description |
Example value |
|---|---|---|---|
| id | Integer | Primary key ID. | 1001 |
| uuid | String | Unique identifier. | ds-uuid-xxx |
| name | String | Data source name. | my-mysql |
| projectId | String | Project ID. | proj-xxx |
| creatorUid | String | UID of the creator. | 123456 |
| cloudProvider | String | Cloud provider. | ALIYUN |
| region | String | Region. | zone-xxxx |
| databaseType | String | Database type | MYSQL |
| instanceType | String | Instance type. | ALIYUN_RDS |
| networkAccessType | String | Network access method. | PUBLIC_NETWORK |
| username | String | Database username. | root |
| host | String | Host. | rm-xxx.mysql.rds.aliyuncs.com |
| port | Integer | Port. | 3306 |
| visible | Boolean | Whether the data source is visible to users. | true |
| testConnectivityResult | Object | Connectivity test result. | |
| testConnectivityResult.status | String | Connection status. Valid values: NOT_TESTED, ACTIVE, INACTIVE, TESTING, and UNAVAILABLE. | ACTIVE |
| createTime | String | Creation time. | 2026-06-30T10:00:00+08:00 |
| updateTime | String | Update time. | 2026-06-30T10:00:00+08:00 |
Examples
Request example
curl --digest -u '<your AK:SK>' \
--request GET \
--url 'https://api-cloud.oceanbase.com/api/v2/datasource/datasources?page=0&size=20&cloudProvider=ALIYUN&status=ACTIVE' \
-H 'X-Ob-Project-Id: <project ID>' \
-H 'X-Ob-Org-Id: <organization ID>'
Response example
{
"success": true,
"httpStatus": "OK",
"data": {
"page": {
"totalElements": 1,
"totalPages": 1,
"number": 1,
"size": 20
},
"contents": [
{
"id": 1001,
"uuid": "ds-uuid-xxx",
"name": "my-mysql",
"projectId": "proj-xxx",
"creatorUid": "123456",
"cloudProvider": "ALIYUN",
"region": "zone-xxxx",
"databaseType": "MYSQL",
"instanceType": "ALIYUN_RDS",
"networkAccessType": "PUBLIC_NETWORK",
"username": "root",
"host": "rm-xxx.mysql.rds.aliyuncs.com",
"port": 3306,
"testConnectivityResult": {
"status": "ACTIVE"
},
"createTime": "2026-06-30T10:00:00+08:00",
"updateTime": "2026-06-30T10:00:00+08:00"
}
]
}
}
