This topic describes the ListDataSource API provided by OceanBase Migration Service (OMS) Community Edition.
Overview
You can call this operation to query a list of created data sources.
API details
Limitations
This operation is applicable to OMS Community Edition V4.1.1 and later versions.
Request path
POST /api/v2?Action=ListDataSource
Request parameters
Parameter |
Type |
Description |
|---|---|---|
| searchKey | string | The data source name or ID. |
| types | string | The data source type. |
| sortField | string | The field for sorting the data sources. |
| order | string | The order for sorting the data sources. Valid values: asc and descend. |
| pageNumber | integer | The number of the page to return. |
| pageSize | integer | The number of entries to return on each page. Default value: 10. |
Response parameters
Parameter |
Type |
Description |
|---|---|---|
| success | boolean | Indicates whether the call is successful. |
| errorDetail | object | The error details. |
| code | string | The error code. |
| message | string | The error description. |
| advice | string | The suggestions about how to resolve the error. |
| requestId | string | The request ID. |
| pageNumber | integer | The number of the page to return. |
| pageSize | integer | The number of entries to return on each page. |
| totalCount | integer | The total number of entries returned. |
| cost | string | The time spent in processing the request, in seconds. |
| data | string | The information about data sources. |
| ├─ id | string | The ID of the data source endpoint. |
| ├─ name | string | The name of the data source. |
| ├─ type | string | The data source type. |
| ├─ role | string | The role of the data source. Valid values: MASTER and SLAVE. |
| ├─ owner | string | The owner of the data source. |
| ├─ tenant | string | The name of the database tenant. |
| ├─ cluster | string | The name of the cluster where the database tenant resides. |
| ├─ schema | string | The name of the database for which data migration or synchronization is to be performed. |
| ├─ ip | string | The IP address of the host where the database is located. |
| ├─ port | integer | The port number of the host where the database is located. |
| ├─ userName | string | The name of the database user for data migration or synchronization. |
| ├─ region | string | The region where the data source resides. |
| ├─ description | string | The description of the data source. The value must not exceed 128 characters in length. |
| ├─ ocpName | string | The name of the associated OceanBase Cloud Platform (OCP) instance. |
| ├─ oracleSid | string | The system ID (SID) of the Oracle database. |
| ├─ oracleNlsLengthSemantics | string | The nls_length_semantics attribute. This parameter is available only when the data source is an Oracle database or an Oracle-compatible tenant of OceanBase Database. |
| ├─ operatingSystem | string | The operating system. This parameter is unavailable for the OceanBase data source. |
| ├─ version | string | The version of the data source. |
| ├─ timezone | string | The time zone. |
| ├─ charset | string | The character encoding format. |
| ├─ tryKeepHb | boolean | Indicates whether a keep-alive attempt is allowed. |
| ├─ gmtCreate | string | The time when the data source was created, which is presented in the UTC+0 time zone. |
| ├─ gmtModified | string | The time when the data source was modified, which is presented in the UTC+0 time zone. |
| ├─ partnerId | string | The ID of the corresponding primary/standby database. |
| ├─ connExtraAttributes | string | Extra connection attributes. For more information about the fields returned, see the "Appendix" section. |
Examples
Request example
{
"searchKey": "GRATI****89278244",
"types": "OB_MYSQL",
"sortField": "gmtCreate",
"order": "asc",
"pageNumber": 1,
"pageSize": 10
}
Response example
{
"success": true,
"errorDetail": null,
"code": null,
"message": null,
"advice": null,
"requestId": "d5627aa****929",
"pageNumber": 1,
"pageSize": 10,
"totalCount": 54,
"cost": "18 ms",
"data": [
{
"id": "e_4w****v",
"name": "RATION***1DBUTF11",
"type": "OB_MYSQL",
"role": "MASTER",
"owner": "ade**",
"tenant": "dwr***",
"cluster": "desx***",
"schema": "t12***mysql",
"ip": "xxx.xxx.xxx.1",
"port": 2883,
"userName": "dexf***",
"region": "cn-beijing",
"description": "test",
"ocpName": "xxx.xxx.xxx.2",
"operatingSystem": null,
"version": "4.1.0.1",
"timezone": "+08:00",
"charset": "UTF8",
"tryKeepHb": true,
"gmtCreate": "2023-07-13T19:57:28.000+00:00",
"gmtModified": "2023-07-13T20:37:28.000+00:00",
"partnerId": null,
"connExtraAttributes": {}
}
]
}
Appendix
Kafka
{
"connExtraAttributes":{
"endpoint":"xxx.xxx.xxx.1:2883",
"username":null,
"enableSSL":null,
"enableSASL":null,
"saslMechanism":null,
"disableIdentificationAlgorithm":false
}
}
Parameter |
Type |
Description |
|---|---|---|
| endpoint | string | The service endpoint. |
| username | string | The username. This parameter is required when you select the PLAIN, SCRAM-SHA-256, or SCRAM-SHA-512 authentication method. |
| enableSSL | boolean | Indicates whether Secure Sockets Layer (SSL) authentication is enabled. If SSL authentication is enabled, you must upload an SSL certificate. |
| enableSASL | boolean | Indicates whether Simple Authentication and Security Layer (SASL) authentication is enabled. |
| saslMechanism | KafkaSaslMechanisnEnum | The encryption method. Valid values: PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, and KERBEROS. |
| disableIdentificationAlgorithm | boolean | Indicates whether hostname verification is enabled during SSL encryption. |
DataHub
{
"connExtraAttributes":{
"endpoint":"xxx.xxx.xxx.1:2883",
"project":"detx***"
}
}
Parameter |
Type |
Description |
|---|---|---|
| endpoint | string | The service endpoint. |
| project | string | The name of the task. |
RocketMQ
{
"connExtraAttributes":{
"endpoint":"xxx.xxx.xxx.1:2883",
"endpointType":null,
"version":null
}
}
Parameter |
Type |
Description |
|---|---|---|
| endpoint | string | The service endpoint. |
| endpointType | CloudRocketMQEndpoint.Type | The type of the endpoint. |
| version | CloudRocketMQInst.Version | The RocketMQ version. |
OceanBase
{
"connExtraAttributes":{
"cluster":"xgez***",
"tenant":"gexr**",
"isLogicSource":false,
"useLogProxy":true,
"drcUser":"tes***",
"configUrl":"http://xxx.xxx.xxx.1:2883/service****",
"logProxyIp":"xxx.xxx.xxx.2",
"logProxyPort":2883,
"noUserAuth":false
}
}
Parameter |
Type |
Description |
|---|---|---|
| cluster | string | The name of the cluster. |
| tenant | string | The name of the tenant. |
| isLogicSource | boolean | Indicates whether the data source is a logical data source. |
| useLogProxy | boolean | Indicates whether LogProxy is used. |
| drcUser | string | The drc_user user. |
| configUrl | string | The actual URL of the server that runs OceanBase Database. |
| logProxyIp | string | The IP address of the oblogproxy service. |
| logProxyPort | integer | The port of the oblogproxy service. |
| noUserAuth | boolean | For an API that synchronizes data from DataWorks, the data source is automatically generated by OMS. If you do not have a user account and password, you cannot connect to OceanBase Database. |
TiDB
{
"connExtraAttributes":{
"kafkaId":"e_edz****",
"kafkaTopic":"test**",
"kafkaName":"denz***"
}
}
Parameter |
Type |
Description |
|---|---|---|
| kafkaId | string | The ID of the bound Kafka data source. |
| kafkaTopic | string | The name of the bound Kafka topic. |
| kafkaName | string | The name of the bound Kafka data source. |
