Querying a Task List
Function
This API is used to query a task list.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
GET /v2/{project_id}/fdi/instances/{instance_id}/tasks
| 
        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 API Reference.  | 
     
| 
        instance_id  | 
      
        Yes  | 
      
        String  | 
      
        Instance ID.  | 
     
| 
        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.  | 
     
| 
        offset  | 
      
        No  | 
      
        Integer  | 
      
        Offset of pagination in pagination query. The query starts from this offset.  | 
     
| 
        task_id  | 
      
        No  | 
      
        String  | 
      
        Task ID. This parameter can be left empty.  | 
     
| 
        task_name  | 
      
        No  | 
      
        String  | 
      
        Task name for fuzzy match. This parameter can be left empty.  | 
     
| 
        status  | 
      
        No  | 
      
        Integer  | 
      
        Task status. This parameter can be left empty. 
  | 
     
| 
        task_type  | 
      
        No  | 
      
        String  | 
      
        Task type. 
  | 
     
| 
        source_datasource_id  | 
      
        No  | 
      
        String  | 
      
        Data source ID at the source. This parameter can be left empty.  | 
     
| 
        target_datasource_id  | 
      
        No  | 
      
        String  | 
      
        Data source ID at the destination. This parameter can be left empty.  | 
     
| 
        datasource_id  | 
      
        No  | 
      
        String  | 
      
        Source or Data source ID at the destination. This parameter can be left empty.  | 
     
| 
        sort_field  | 
      
        No  | 
      
        String  | 
      
        Sorting criteria for the query. 
  | 
     
| 
        sort_type  | 
      
        No  | 
      
        String  | 
      
        Sorting type. This parameter can be left empty. 
  | 
     
| 
        execute_status  | 
      
        No  | 
      
        String  | 
      
        Execution status. This parameter can be left empty. 
  | 
     
| 
        source_app_id  | 
      
        No  | 
      
        String  | 
      
        ID of the integration application to which the source data source belongs. This parameter can be left empty.  | 
     
| 
        target_app_id  | 
      
        No  | 
      
        String  | 
      
        ID of the integration application to which the destination data source belongs. This parameter can be left empty.  | 
     
| 
        task_tag  | 
      
        No  | 
      
        String  | 
      
        Task tag. This parameter can be left empty.  | 
     
| 
        task_mode  | 
      
        No  | 
      
        String  | 
      
        Task mode. If the value is left empty, all tasks are queried. 
  | 
     
Request 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
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        total  | 
      
        Long  | 
      
        Total number of tasks in a task list queried.  | 
     
| 
        size  | 
      
        Integer  | 
      
        Number of tasks on the current page returned after the task list is queried.  | 
     
| 
        entities  | 
      
        Array of BriefTaskRespBean objects  | 
      
        Object returned after the task list is queried.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        task_id  | 
      
        String  | 
      
        Task ID.  | 
     
| 
        task_name  | 
      
        String  | 
      
        Task name.  | 
     
| 
        task_type  | 
      
        String  | 
      
        Task type. 
  | 
     
| 
        status  | 
      
        Integer  | 
      
        Task status. 
  | 
     
| 
        created_date  | 
      
        String  | 
      
        Time when the task was created.  | 
     
| 
        version  | 
      
        String  | 
      
        Task version.  | 
     
| 
        last_modified_time  | 
      
        Long  | 
      
        Last modification time.  | 
     
| 
        execute_status  | 
      
        String  | 
      
        Task execution status. 
  | 
     
| 
        source_app_id  | 
      
        String  | 
      
        ID of the application to which the source data source belongs.  | 
     
| 
        target_app_id  | 
      
        String  | 
      
        ID of the application to which the destination data source belongs.  | 
     
| 
        source_instance_id  | 
      
        String  | 
      
        ID of the source instance.  | 
     
| 
        target_instance_id  | 
      
        String  | 
      
        ID of the destination instance.  | 
     
| 
        ext_type  | 
      
        String  | 
      
        Composite task type. This parameter can be left empty.  | 
     
| 
        enterprise_project_id  | 
      
        String  | 
      
        Enterprise project ID.  | 
     
| 
        task_tag  | 
      
        String  | 
      
        Task tag.  | 
     
Status code: 400
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        Error code.  | 
     
| 
        error_msg  | 
      
        String  | 
      
        Error message.  | 
     
Status code: 404
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        Error code.  | 
     
| 
        error_msg  | 
      
        String  | 
      
        Error message.  | 
     
Status code: 500
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        Error code.  | 
     
| 
        error_msg  | 
      
        String  | 
      
        Error message.  | 
     
Example Requests
None
Example Responses
Status code: 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"
  }
}
 Status Codes
| 
        Status Code  | 
      
        Description  | 
     
|---|---|
| 
        200  | 
      
        OK  | 
     
| 
        400  | 
      
        Bad Request  | 
     
| 
        404  | 
      
        Not Found  | 
     
| 
        500  | 
      
        Internal Server Error  | 
     
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot