Help Center/ ROMA Connect/ API Reference/ Data Integration APIs/ Task Management/ Querying Information About a Specified Task
Updated on 2023-06-29 GMT+08:00

Querying Information About a Specified Task

Function

This API is used to query the information about a specified task based on the task ID.

URI

GET /v2/{project_id}/fdi/instances/{instance_id}/tasks/{task_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Appendix > Obtaining a Project ID in the ROMA Connect API Reference.

Minimum: 1

Maximum: 64

instance_id

Yes

String

Instance ID.

Minimum: 1

Maximum: 64

task_id

Yes

String

Task ID, the unique identifier of a task.

Minimum: 1

Maximum: 64

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token, which can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

task

TaskBasicRsp object

Brief information about a task.

task_detail

String

Task details. For details about the parameter structure, see Data Integration Parameter Description > RawFormDataResponse in the Appendix.

Minimum: 1

Maximum: 2147483647

Table 4 TaskBasicRsp

Parameter

Type

Description

task_id

String

Task ID. This parameter can be left empty.

Minimum: 1

Maximum: 64

task_name

String

Task name. The value contains 3 to 100 characters, consisting of only letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter or digit.

Minimum: 3

Maximum: 100

task_type

String

Task type.

  • realtime (real-time)

  • timing (scheduled)

Minimum: 1

Maximum: 10

status

String

Task status.

  • stopped

  • running

Minimum: 0

Maximum: 1

project_id

String

Project ID.

Minimum: 1

Maximum: 64

source_datasource_id

String

Data source ID at the source.

Minimum: 1

Maximum: 64

target_datasource_id

String

Data source ID at the destination.

Minimum: 1

Maximum: 64

source_datasource_name

String

Name of the source data source.

Minimum: 1

Maximum: 64

target_datasource_name

String

Name of the destination data source.

Minimum: 1

Maximum: 64

source_app_id

String

ID of the integration application to which the source data source belongs.

Minimum: 1

Maximum: 64

target_app_id

String

ID of the integration application to which the destination data source belongs.

Minimum: 1

Maximum: 64

source_app_name

String

Name of the integration application to which the source data source belongs.

Minimum: 1

Maximum: 64

target_app_name

String

Name of the integration application to which the destination data source belongs.

Minimum: 1

Maximum: 64

created_date

Integer

Date created.

Minimum: 0

Maximum: 99999999999999999999

last_modified_date

Integer

Last modification time.

Minimum: 0

Maximum: 99999999999999999999

description

String

Description. This parameter is not displayed when the request parameter is empty.

Minimum: 1

Maximum: 1024

task_tag

String

Task tag, which can contain only letters, digits, hyphens (-), and underscores (_). This parameter is not displayed when the request parameter is empty.

Minimum: 4

Maximum: 64

Status code: 404

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 8

Maximum: 36

error_msg

String

Error message.

Minimum: 2

Maximum: 512

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 8

Maximum: 36

error_msg

String

Error message.

Minimum: 2

Maximum: 512

Example Requests

https://{{ServerHost}}/v2/:project_id/fdi/instances/:instance_id/tasks/:task_id

Example Responses

Status code: 200

OK

{
  "task" : {
    "task_id" : "9496207a5d6b44b486d79005b5815bd4",
    "task_name" : "fdi_task_pzy4m5",
    "task_type" : "timing",
    "project_id" : "c53626012ba84727b938ca8bf03108ef",
    "source_datasource_id" : "d3412230cff8449e92c8ff8f74d1157d",
    "target_datasource_id" : "d3412230cff8449e92c8ff8f74d1157d",
    "source_datasource_name" : "100.85.221.77",
    "target_datasource_name" : "100.85.221.77",
    "source_app_id" : "7f245167-ac84-4b2e-bbea-f0988a4bf6f4",
    "target_app_id" : "7f245167-ac84-4b2e-bbea-f0988a4bf6f4",
    "source_app_name" : "app-fdi-ttt",
    "target_app_name" : "app-fdi-ttt",
    "status" : "stop",
    "created_date" : 1666772375897,
    "last_modified_date" : 1666772375897,
    "task_mode" : "NORMAL",
    "enterprise_project_id" : "0",
    "source_datasource_type" : "MYSQL",
    "target_datasource_type" : "MYSQL",
    "source_instance_name" : "roma-z00617033-not-delete",
    "target_instance_name" : "roma-z00617033-not-delete",
    "execute_status" : "SUCCESS",
    "repulling_snapshot" : false
  },
  "task_detail" : "{\"needAPI\":false,\"targetDsId\":\"d3412230cff8449e92c8ff8f74d1157d\",\"sourceSelectedDatasource\":{\"extend_meta_data\":[],\"orderType\":\"ASC\",\"sourceDateColumn\":\"\",\"dataTimestamp\":\"\",\"sourceTable\":\"zhenghaotest.zh_sss01\",\"sourceSelectedColumnList\":[{\"null_able\":\"0\",\"unique\":\"1\",\"field_length\":\"11\",\"field_type\":\"INT\",\"field_name\":\"id\"},{\"null_able\":\"1\",\"unique\":\"0\",\"field_length\":\"255\",\"field_type\":\"VARCHAR\",\"field_name\":\"name\"}],\"isParse\":\"true\",\"querySql\":\"\",\"whereOptions\":[],\"instanceId\":\"db93bfe1-c660-4c9e-82b6-388e44662cc8\",\"sourceMetaData\":{\"dataSource\":[]},\"isAddSql\":false,\"meta_data\":[],\"where\":[],\"need_inc_migration\":false,\"textInputValue\":\"\",\"orderColumn\":\"\",\"isTextInput\":false},\"targetDatasource\":\"100.85.221.77\",\"needEmailNew\":false,\"description\":\"\",\"taskTag\":\"\",\"mappingTableProperties\":[{\"sourceNullable\":\"0\",\"sourceUnique\":\"1\",\"targetUnique\":\"1\",\"targetNullable\":\"0\"},{\"sourceNullable\":\"1\",\"sourceUnique\":\"0\",\"targetUnique\":\"0\",\"targetNullable\":\"1\"}],\"sourceDatasourceType\":\"MYSQL\",\"taskType\":2,\"sourceDatasource\":\"100.85.221.77\",\"targetDatasourceType\":\"MYSQL\",\"mappingSourceTextOrNot\":[{\"flag\":false},{\"flag\":false}],\"mappingTable\":[{\"targetColumnType\":\"INT\",\"isAddDateMapping\":false,\"targetColumnLength\":\"11\",\"isAddMapping\":false,\"isAddBooleanMapping\":false,\"sourceColumnLength\":\"11\",\"targetColumn\":\"id\",\"sourceColumnType\":\"INT\",\"isAddFDIUUIDMapping\":false,\"sourceColumn\":\"id\"},{\"targetColumnType\":\"VARCHAR\",\"isAddDateMapping\":false,\"targetColumnLength\":\"255\",\"isAddMapping\":false,\"isAddBooleanMapping\":false,\"sourceColumnLength\":\"255\",\"targetColumn\":\"name\",\"sourceColumnType\":\"VARCHAR\",\"isAddFDIUUIDMapping\":false,\"sourceColumn\":\"name\"}],\"targetSelectedDatasource\":{\"targetNeedCreateTable\":false,\"targetSelectedColumnList\":[{\"null_able\":\"0\",\"unique\":\"1\",\"field_length\":\"11\",\"field_type\":\"INT\",\"field_name\":\"id\"},{\"null_able\":\"1\",\"unique\":\"0\",\"field_length\":\"255\",\"field_type\":\"VARCHAR\",\"field_name\":\"name\"},{\"null_able\":\"1\",\"unique\":\"0\",\"field_length\":\"64\",\"field_type\":\"VARCHAR\",\"field_name\":\"bunum\"}],\"supportPartUpdate\":false,\"targetTable\":\"zhenghaotest.zh_sss02\",\"instanceId\":\"db93bfe1-c660-4c9e-82b6-388e44662cc8\",\"batch_number_style\":\"UUID\",\"isSupportClearTab\":false,\"batchNumber\":\"\"},\"taskName\":\"fdi_task_pzy4m5\",\"sourceDsId\":\"d3412230cff8449e92c8ff8f74d1157d\",\"projectId\":\"c53626012ba84727b938ca8bf03108ef\",\"needMQS\":false,\"mappingInput\":{},\"mappingRequired\":true}"
}

Status Codes

Status Code

Description

200

OK

404

Not Found

500

Internal Server Error

Error Codes

See Error Codes.