Updated on 2023-06-29 GMT+08:00

Querying a Task List

Function

This API is used to query a task list.

URI

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

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

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Number of records displayed on each page in pagination query. The maximum value is 1000 and the minimum value is 1.

Minimum: 1

Maximum: 1000

offset

No

Integer

Offset of pagination in pagination query. The query starts from this offset.

Minimum: 1

Maximum: 20000

task_id

No

String

Task ID. This parameter can be left empty.

Minimum: 1

Maximum: 64

task_name

No

String

Task name for fuzzy match. This parameter can be left empty.

Minimum: 1

Maximum: 64

status

No

Integer

Task status. This parameter can be left empty.

  • 0 (stopped or not started)

  • 1 (running)

Minimum: 0

Maximum: 1

task_type

No

String

Task type.

  • realtime (real-time)

  • timing (scheduled)

Minimum: 0

Maximum: 10

source_datasource_id

No

String

Data source ID at the source. This parameter can be left empty.

Minimum: 1

Maximum: 64

target_datasource_id

No

String

Data source ID at the destination. This parameter can be left empty.

Minimum: 1

Maximum: 64

datasource_id

No

String

Source or Data source ID at the destination. This parameter can be left empty.

Minimum: 1

Maximum: 64

sort_field

No

String

Sorting criteria for the query.

  • CREATED_DATE

  • STATUS

Minimum: 1

Maximum: 64

sort_type

No

String

Sorting type. This parameter can be left empty.

  • ASC (ascending order)

  • DESC (descending order)

Minimum: 1

Maximum: 10

execute_status

No

String

Execution status. This parameter can be left empty.

  • UNSTARTED

  • WAITING

  • RUNNING

  • SUCCESS

  • CANCELLED

  • ERROR

Minimum: 1

Maximum: 64

source_app_id

No

String

ID of the integration application to which the source data source belongs. This parameter can be left empty.

Minimum: 1

Maximum: 64

target_app_id

No

String

ID of the integration application to which the destination data source belongs. This parameter can be left empty.

Minimum: 1

Maximum: 64

task_tag

No

String

Task tag. This parameter can be left empty.

Minimum: 0

Maximum: 64

task_mode

No

String

Task mode. If the value is left empty, all tasks are queried.

  • NORMAL (common task)

  • CDC (composite task)

  • FLOW (orchestration task)

Minimum: 0

Maximum: 6

Request Parameters

Table 3 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 4 Response body parameters

Parameter

Type

Description

total

Long

Total number of tasks in a task list queried.

Minimum: 0

Maximum: 1000000

size

Integer

Number of tasks on the current page returned after the task list is queried.

Minimum: 0

Maximum: 1000

entities

Array of BriefTaskRespBean objects

Object returned after the task list is queried.

Table 5 BriefTaskRespBean

Parameter

Type

Description

task_id

String

Task ID.

Minimum: 1

Maximum: 64

task_name

String

Task name.

Minimum: 1

Maximum: 64

task_type

String

Task type.

  • REALTIME (real-time)

  • TIMING (scheduled)

Minimum: 1

Maximum: 10

status

Integer

Task status.

  • 0: stopped/not started

  • 1: running

Minimum: 0

Maximum: 1

created_date

String

Time when the task was created.

version

String

Task version.

Minimum: 0

Maximum: 10

last_modified_time

Long

Last modification time.

Minimum: 1

Maximum: 9999999999999999999

execute_status

String

Task execution status.

  • UNSTARTED

  • WAITING

  • RUNNING

  • SUCCESS

  • CANCELLED

  • ERROR

Minimum: 1

Maximum: 64

source_app_id

String

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

Minimum: 1

Maximum: 64

target_app_id

String

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

Minimum: 1

Maximum: 64

source_instance_id

String

ID of the source instance.

Minimum: 1

Maximum: 64

target_instance_id

String

ID of the destination instance.

Minimum: 1

Maximum: 64

ext_type

String

Composite task type. This parameter can be left empty.

Minimum: 1

Maximum: 64

enterprise_project_id

String

Enterprise project ID.

Minimum: 1

Maximum: 64

task_tag

String

Task tag.

Minimum: 1

Maximum: 64

Status code: 400

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

Status code: 404

Table 7 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 8 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

None

Example Responses

Status code: 200

OK

null

Status Codes

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Codes

See Error Codes.