This topic describes the CreateOceanBaseODPDataSource API provided by OceanBase Migration Service (OMS).
Purpose
You can call this operation to create an OceanBase Database Proxy (ODP) data source.
Call description
Limitations
This operation is supported in OMS V4.2.2 and later.
Request path
POST /api/v2?Action=CreateOceanBaseODPDataSource
Request parameters
| Parameter | Type | Description |
|---|---|---|
| name | string | The ID of the data source. |
| url | string | The URL of the OP gateway, or the URL of the OP gateway JSON file that can be obtained in standalone deployment mode. |
| obProxy | string | Optional. The URL of ODP. The format is IP address:port. |
| route | string | The API to route to, such as MiddleWareCluster-ODP. |
| accessKey | string | The access key of the visitor. |
| instanceId | string | The instance ID of the ODP physical node, which corresponds to ODP Instance ID on the New Data Source page of the OMS console, such as odp-xxx. |
| middlewareInstanceId | string | The ODP middleware ID, which corresponds to Instance ID on the New Data Source page of the OMS console, such as 000001. |
| secretKey | string | The security key of the visitor. |
| userName | string | The username of the database user intended for data migration or synchronization. |
| password | string | The password of the database user, which is Base64-encoded. |
| region | string | The region of the data source. |
| description | string | The description of the data source, which cannot exceed 128 characters in length. |
| drcUserName | string | The username of the data replication center (DRC) user intended for reading database incremental logs and database object schemas in OceanBase Database. You must create this user in the sys tenant of your business cluster. |
| drcPassword | string | The password of the DRC user. |
Return result
| 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 ID of the ODP data source. |
Examples
Sample request
{
"name":"ODP data source test",
"url": "http://xxx.xxx.xxx.1",
"obProxy": "http://xxx.xxx.xxx.2:8080",
"route": "MiddleWareCluster-ODP",
"accessKey": "abc****",
"instanceId": "odp-xxx",
"middlewareInstanceId": "000001",
"secretKey": "ncd****",
"userName": "username",
"password": "cGFzc3dvcmQ=",
"region": "cn-hangzhou",
"description": "open-api",
"drcUserName": "",
"drcPassword": ""
}
Sample response
{
"success":true,
"errorDetail":null,
"code":null,
"message":null,
"advice":null,
"requestId":"a7b57****",
"pageNumber":null,
"pageSize":null,
"totalCount":null,
"cost":"599 ms",
"data":"e_edz****"
}