Query Schema Comparison Main Task Details
Query basic information and the latest execution information for a specified schema comparison main task.
Request URL: /openapi/v1/compareschema/queryTaskById
Request Method: GET
Before You Call
taskId can be obtained from data.taskId in the successful response of Create Schema Comparison Task, or from data.schemaComparisons[].taskId returned by List Schema Comparison Tasks.
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| taskId | String | Yes | Schema comparison main task ID. | cc-th6j3fs58y |
How to Use the Returned Value
data.lastExecId in the response is the latest schema comparison subtask ID. Use it when calling Query Schema Comparison Subtask Details, Query Schema Comparison Object Results, and Query Schema Comparison Correction SQL.
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. | Jf5c0IKB-bhicqBRndhhr5TEdchr4BRP |
| data | Object | Schema comparison main task details. See the fields below. | See the example below |
| message | String | Error message returned when the request fails. | task not found |
data Fields
| Parameter | Type | Description | Example |
|---|---|---|---|
| taskId | String | Schema comparison main task ID. | cc-th6j3fs58y |
| lastExecId | Long | Latest schema comparison subtask ID. | 46958 |
| status | String | Task status. Common values include success, failed, starting, and running. | starting |
| name | String | Task name. | schema_compare_demo |
| isDeleted | Boolean | Whether the task is deleted. | false |
| errMsg | String | Error message returned when the task fails or is abnormal. | "" |
Request Example
{
"taskId": "cc-th6j3fs58y"
}
Successful Invocation Example
{
"success": true,
"requestId": "Jf5c0IKB-bhicqBRndhhr5TEdchr4BRP",
"data": {
"taskId": "cc-th6j3fs58y",
"lastExecId": 46958,
"status": "starting",
"name": "schema_compare_demo",
"isDeleted": false
}
}