查询任务列表 - ListTasks
功能介绍
查询任务列表。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限,具体权限要求请参见权限和授权项。
URI
GET /v2/{project_id}/fdi/instances/{instance_id}/tasks
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目ID,获取方式请参见API参考的“附录 > 获取项目ID”章节。 |
instance_id | 是 | String | 实例ID。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
limit | 否 | Integer | 分页查询,每页显示的条目数量,最大数量1000,最小为1。 |
offset | 否 | Integer | 分页查询,分页的偏移量,表示从此偏移量开始查询。 |
task_id | 否 | String | 任务ID,可为空。 |
task_name | 否 | String | 模糊匹配任务名称,可为空。 |
status | 否 | Integer | 任务状态,可为空。
|
task_type | 否 | String | 任务类型。
|
source_datasource_id | 否 | String | 源端数据源ID,可为空。 |
target_datasource_id | 否 | String | 目标端数据源ID,可为空。 |
datasource_id | 否 | String | 源端或者目标数据源ID,可为空。 |
sort_field | 否 | String | 查询排序的条件。
|
sort_type | 否 | String | 排序类型,可为空。
|
execute_status | 否 | String | 执行状态,可为空。
|
source_app_id | 否 | String | 源端数据源所属集成应用ID,可为空。 |
target_app_id | 否 | String | 目标端数据源所属集成应用ID,可为空。 |
task_tag | 否 | String | 任务标签,可为空。 |
task_mode | 否 | String | 任务模式,如果为空查询所有任务。
|
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Auth-Token | 是 | String | 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码:200
参数 | 参数类型 | 描述 |
|---|---|---|
total | Long | 查询任务列表任务总个数。 |
size | Integer | 查询任务列表返回的当前页的任务个数。 |
entities | Array of BriefTaskRespBean objects | 查询任务列表返回的对象。 |
参数 | 参数类型 | 描述 |
|---|---|---|
task_id | String | 任务ID。 |
task_name | String | 任务名称。 |
task_type | String | 任务类型。
|
status | Integer | 任务状态。
|
created_date | String | 创建时间。 |
version | String | 任务的版本。 |
last_modified_time | Long | 上次修改时间。 |
execute_status | String | 任务执行状态。
|
source_app_id | String | 源端数据源所属应用ID。 |
target_app_id | String | 目标端数据源所属应用ID。 |
source_instance_id | String | 源端实例ID。 |
target_instance_id | String | 目标端实例ID。 |
ext_type | String | 组合任务类型, 可为空。 |
enterprise_project_id | String | 企业项目ID。 |
task_tag | String | 任务标签。 |
状态码:400
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
状态码:404
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
状态码:500
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
请求示例
无
响应示例
状态码:200
OK
{
"total" : 1,
"size" : 1,
"entities" : {
"task_id" : "15366328208d4d77b76532fe9f4006a6",
"task_name" : "task_cdc_oracle2oracle",
"task_type" : "TIMING",
"status" : 0,
"created_date" : "1605288733684",
"version" : "2",
"last_modified_time" : 456223355566,
"execute_status" : "ERROR",
"source_app_id" : "73b7f7a6-d1b8-4806-a0f8-278fe7186592",
"target_app_id" : "73b7f7a6-d1b8-4806-a0f8-278fe7186592",
"source_instance_id" : "fae7ff6c-8e07-4cf8-9e67-589cab2f017c",
"target_instance_id" : "fae7ff6c-8e07-4cf8-9e67-589cab2f017c",
"ext_type" : "cdc",
"enterprise_project_id" : "0",
"task_tag" : "fdi_autotest"
}
} 状态码
状态码 | 描述 |
|---|---|
200 | OK |
400 | Bad Request |
404 | Not Found |
500 | Internal Server Error |
错误码
请参见错误码。

