Retrieves a list of migration tasks.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:ListMmsTasks |
list |
*project
|
None | None |
Request syntax
GET /api/v1/mms/datasources/{sourceId}/tasks HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| sourceId |
integer |
Yes |
The ID of the data source. |
2000028 |
| jobId |
integer |
No |
The ID of the migration job. |
10 |
| jobName |
string |
No |
The name of the job. |
test1 |
| srcDbName |
string |
No |
The name of the source database. |
test_db_1 |
| srcTableName |
string |
No |
The name of the source table. |
test_table_1 |
| dstDbName |
string |
No |
The destination MaxCompute project. |
mms_test |
| dstTableName |
string |
No |
The destination MaxCompute table. |
test_table_1 |
| status |
string |
No |
The status of the migration task. Valid values:
|
DATA_DOING |
| partition |
string |
No |
The partition value. This parameter is used to filter migration tasks by a specific partition value. |
p1=1/p2=abc |
| pageNum |
integer |
No |
The page number. |
1 |
| pageSize |
integer |
No |
The number of entries per page. |
10 |
| sorter.startTime |
string |
No |
Sorts tasks by start time. Valid values:
|
desc |
| sorter.status |
string |
No |
Sorts tasks by status. Valid values:
|
asc |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| requestId |
string |
The request ID. |
373A5CB2-8570-53BE-A98F-729B11D7A8B0 |
| data |
object |
The returned data. |
|
| total |
integer |
The total number of records. |
100 |
| objectList |
array<object> |
The list of migration tasks. |
|
|
object |
The migration task object. |
||
| id |
integer |
The ID of the migration task. |
2323 |
| jobId |
integer |
The ID of the migration job. |
87 |
| sourceId |
integer |
The ID of the data source. |
2000028 |
| dbId |
integer |
The ID of the source database. |
196 |
| tableId |
integer |
The ID of the source table. |
23 |
| jobName |
string |
The name of the migration job. |
test_odps_spark |
| sourceName |
string |
The name of the data source. |
demo |
| srcDbName |
string |
The name of the source database. |
db_1 |
| srcSchemaName |
string |
The name of the source schema. This parameter specifies the schema in a Layer 3 namespace. |
default |
| srcTableName |
string |
The name of the source table. |
table_1 |
| dstDbName |
string |
The destination MaxCompute project. |
mms_test |
| dstSchemaName |
string |
The destination MaxCompute schema. |
default |
| dstTableName |
string |
The destination MaxCompute table. |
table_1 |
| type |
string |
The task type. Valid values:
|
BIGQUERY |
| status |
string |
The status of the migration task. Valid values:
|
DATA_DOING |
| running |
boolean |
Indicates whether the task is running. |
true |
| stopped |
boolean |
Indicates whether the task is stopped. |
false |
| retriedTimes |
integer |
The number of retries. |
1 |
| startTime |
string |
The start time of the task. |
2024-10-25 06:21:01 |
| endTime |
string |
The end time of the task. |
2024-10-25 07:21:01 |
| createTime |
string |
The time when the task was created. |
2024-10-25 04:21:01 |
| pageNum |
integer |
The page number. |
1 |
| pageSize |
integer |
The number of entries per page. |
10 |
Examples
Success response
JSON format
{
"requestId": "373A5CB2-8570-53BE-A98F-729B11D7A8B0",
"data": {
"total": 100,
"objectList": [
{
"id": 2323,
"jobId": 87,
"sourceId": 2000028,
"dbId": 196,
"tableId": 23,
"jobName": "test_odps_spark",
"sourceName": "demo ",
"srcDbName": "db_1",
"srcSchemaName": "default",
"srcTableName": "table_1",
"dstDbName": "mms_test",
"dstSchemaName": "default",
"dstTableName": "table_1",
"type": "BIGQUERY",
"status": "DATA_DOING",
"running": true,
"stopped": false,
"retriedTimes": 1,
"startTime": "2024-10-25 06:21:01",
"endTime": "2024-10-25 07:21:01\n",
"createTime": "2024-10-25 04:21:01\n"
}
],
"pageNum": 1,
"pageSize": 10
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.