This topic describes the DownloadConflictData API provided by OceanBase Migration Service (OMS).
Purpose
DownloadConflictData is used to download conflict logs for a data migration task.
Call description
Limitations
This API applies to OMS V4.3.0 and later.
Request path
POST /api/v2?Action=DownloadConflictData
curl example
You can use the curl tool to call the APIs of O&M Migration Service. In the following example, the address of OMS is xxx.xxx.xxx.1, and the port is 8089. The endpoint of the API called is DownloadConflictData. YWRtaW46cm9vdA= is the Base64-encoded value of username:password. The -o option specifies the file name of the downloaded conflict log file.
curl -X POST -H 'Authorization:Basic YWRtaW46cm9vdA=' -H 'Content-Type: application/json' -o np_xxxxx_download.zip -d '{"projectId":"np_xxxxx","omsStepName":"FULL_TRANSFER","fileNames":["conflict_sql_msg.log"]}' http://xxx.xxx.xxx.1:8089/api/v2?Action=DownloadConflictData
Request parameters
| Parameter | Type | Description |
|---|---|---|
| projectId | string | The ID of the data migration task. |
| omsStepName | string | The name of the task step. Valid values: FULL_TRANSFER, INCR_TRANSFER, and REVERSE_INCR_TRANSFER. |
| fileNames | array | The names of the conflict log files. |
Response parameters
| Parameter | Description |
|---|---|
| content-type | The value of the HTTP response header Content-Type is application/zip, indicating that the response content is a binary stream in the ZIP format. |
| content-disposition | The file name specified in the Content-Disposition header will be recognized and used for browser-based downloads. |
Examples
Request example
{
"projectId": "np_4w3a****",
"omsStepName": "FULL_TRANSFER",
"fileNames": [
"conflict_sql_1.log",
"conflict_sql_2.log"
]
}
Response example
The DownloadConflictData API returns a binary stream in the ZIP format. The following example shows the response header.
content-type:application/zip
content-disposition:attachment; filename=np_xxxxx_conflict_1746500479.zip