Start Schema Comparison Task
Start a specified schema comparison task. One-time tasks run immediately. Scheduled tasks can either enable the schedule only or enable the schedule and run once immediately.
Request URL: /openapi/v1/compareschema/execute
Request Method: POST
Before You Call
taskId can be obtained from data.taskId in the successful response of Create Schema Comparison Task. We recommend running Start Schema Comparison Precheck first and confirming that the precheck succeeds.
Request Body
{
"taskId": "cc-th6j3fs58y",
"runNow": true
}
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| taskId | String | Yes | Schema comparison task ID to start. | cc-th6j3fs58y |
| runNow | Boolean | No | Whether to run once immediately after enabling scheduled execution. Default value: false. This parameter applies to scheduled tasks. One-time tasks run immediately. | true |
Response Behavior
| Task Type | runNow | Behavior | Returned Value |
|---|---|---|---|
| One-time task | false or true | Run schema comparison immediately. | execId |
| Scheduled task | false | Enable the schedule. | No execId |
| Scheduled task | true | Enable the schedule and run once immediately. | execId |
Response Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | Whether the request is successful. | true |
| requestId | String | Request ID, which can be used for troubleshooting and tracing. | Bi5j8CFB-jpqkjCHnlppg7MYdkot2FHM |
| data | Long | Latest subtask ID started for the schema comparison task, which is the execId. | 46958 |
| message | String | Error message returned when the request fails. | task status invalid |
Successful Invocation Example
{
"success": true,
"requestId": "Bi5j8CFB-jpqkjCHnlppg7MYdkot2FHM",
"data": 46958
}