Introduction to APIs Related to Scheduled Task

  • Last update: October 15, 2025
  • Overview

    This document introduces the APIs related to scheduled tasks provided by FineDataLink that can be called by Jiandaoyun, FineReport, and external systems.

    iconNote:
    For details about the invocation instructions, see Description of Calling APIs Related to Scheduled Tasks. For examples of calling scheduled task APIs in FineReport templates, see Examples of Calling Scheduled Task APIs in FineReport Templates.

    API Description

    iconNote:

    1. The instance ID is the running record ID, which can be viewed under O&M Center > Scheduled Task > Running Record.

    2. All API calls require authentication. Otherwise, an authentication failure message will be returned. The examples in this document use the built-in authentication methods of Open Platform for demonstration. For details about authentication methods, see Description of Calling APIs Related to Scheduled Tasks.

    3. Only scheduled tasks running in Production Mode support API-based execution and termination.

    Querying the Instance List by Task ID

    Basic Information

    API URL: http://IP address:Port number/webroot/decision/sp/client/api/fdl/workId/records

    Content-Type: application/json

    Request method: POST

    Request Parameter

    1. Header parameter

    Parameter Name
    Parameter ValueRequired or NotParameter TypeDescription

    client_id

    ${Application ID}

    Yes

    String

    The client_id parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    secret

    {{Secret key}}

    Yes

    String

    The secret parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    2. Body parameter

    Request type: raw_json

    {  
    "workId": "e10f1f1a-d567-4058-98bb-b71204154f8b",  
    "latest": false, //Optional. Determine whether to query only the most recent execution. Options include true and false, which defaults to false if omitted.  
    "startTime": "", //Optional. Enter the start time (unrestricted if omitted).  
    "finishTime": "", //Optional. Enter the end time (unrestricted if omitted).  
    "taskStatus": "SUCCESS", //Optional. Enter the task execution status (returns all if omitted).  
    "triggerMethod": "MANUAL" //Optional. Enter the triggering method, including MANUAL and FIX_TIME (returns all if omitted).
    }
    Parameter Name
    Parameter ValueRequired or NotParameter TypeDescription

    workId

    e10f1f1a-d567-4058-98bb-b71204154f8b

    Yes

    String

    Scheduled task ID

    latest

    false

    No

    Boolean

    Optional. Determine whether to query only the most recent execution. Options include true and false, which defaults to false if omitted.

    startTime

    /

    No

    String

    Optional. Enter the start time (unrestricted if omitted).

    finishTime

    /

    No

    String

    Optional. Enter the end time (unrestricted if omitted).

    taskStatus

    /

    No

    String

    Optional. Enter the task execution status.

    SUCCESS: successful

    ERROR: execution failed

    BUILD_FAIL: construction failed

    INTERRUPT: interrupted

    RUNNING: running

    QUEUING: queuing

    BUILDING: constructing

    triggerMethod

    MANUAL

    No

    String

    Optional. Enter the triggering method, including MANUAL and FIX_TIME (returns all if omitted).

    Response Example

    Success:

    {
       "status": 200,
       "data": {
               "executeIds": [
                       "7d5a4b14-f0de-47b8-91ad-a8777b76236c",
                       "0d20a589-e66f-4b47-8256-e40e0252eea2",
                       "24c6d78a-2d4f-40b5-b9fb-08eef1133612",
                       "9fa0d375-89f4-425f-8e39-0c6de623637a",
       ]
    }
    }
    Parameter Name
    Parameter ValueParameter TypeDescription
    status

    200

    Integer

    /

    data

    /

    Object

    /

    data.executeIds

    7d5a4b14-f0de-47b8-91ad-a8777b76236c

    Array

    The value is a list of instance IDs, which are the running record IDs.

    Querying the Instance List by Task Name

    Basic Information

    API URL: http://IP address:Port number/webroot/decision/sp/client/api/fdl/workName/records

    Content-Type: application/json

    Request method: POST

    Request Parameter

    1. Header parameter

    Parameter Name
    Parameter ValueRequired or NotParameter TypeDescription
    client_id

    ${Application ID}

    Yes

    String

    The client_id parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    secret

    {{Secret key}}

    Yes

    String

    The secret parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    2. Body parameter

    Request type: raw_json

    {  
    "workName": "fdlDemo,  //Required. Enter the task name. 
    "latest": true, //Optional. Determine whether to query only the most recent execution. Options include true and false, which defaults to false if omitted.  
    "startTime": "", //Optional. Enter the start time (unrestricted if omitted).  
    "finishTime": "", //Optional. Enter the end time (unrestricted if omitted).  
    "taskStatus": "SUCCESS", //Optional. Enter the task execution status (returns all if omitted).  
    "triggerMethod": "FIX_TIME" //Optional. Enter the triggering method, including MANUAL and FIX_TIME (returns all if omitted).
    }
    Parameter Name
    Parameter ValueRequired or NotParameter TypeDescription

    workName

    fdlDemo

    Yes

    String

    Required. Enter the task name.

    latest

    true

    No

    Boolean

    Optional. Determine whether to query only the most recent execution. Options include true and false, which defaults to false if omitted.

    startTime

    /

    No

    String

    Optional. Enter the start time (unrestricted if omitted).

    finishTime

    /

    No

    String

    Optional. Enter the end time (unrestricted if omitted).

    taskStatus

    SUCCESS

    No

    String

    Optional. Enter the task execution status.

    SUCCESS: successful

    ERROR: execution failed

    BUILD_FAIL: construction failed

    INTERRUPT: interrupted

    RUNNING: running

    QUEUING: queuing

    BUILDING: constructing

    triggerMethod

    FIX_TIME

    No

    String

    Optional. Enter the triggering method, including MANUAL and FIX_TIME (returns all if omitted).

    Response Example

    1. Success

    iconNote:
    The API returns null if no query results exist.
    {
    "status": 200,
    "data": {
    "executeIds": [
    "40fc80c6-ac03-4943-b6d7-e79ff5cca581"
    ]
    }
    }
    Parameter NameParameter ValueParameter TypeDescription

    status

    200

    Integer

    /

    data

    /

    Object

    /

    data.executeIds

    40fc80c6-ac03-4943-b6d7-e79ff5cca581

    Array

    The value is the instance ID list.

    2. Failure

    {
    "status": 200,
    "errorCode": "E8130031",
    "errorMsg": "The task does not exist. The file cannot be obtained."
    }
    Parameter Name
    Parameter ValueParameter TypeDescription

    status

    200

    Integer

    /

    errorCode

    E8130031

    String

    /

    errorMsg

    The task does not exist. The file cannot be obtained.

    String

    /

    Querying Instance Information by Instance ID

    Basic Information

    API URL: http://IP address:Port number/webroot/decision/sp/client/api/fdl/record/info?recordId=

    Request method: GET

    Request Parameter

    Query parameter:

    Parameter Name
    Parameter ValueRequired or NotParameter TypeDescription

    recordId

    16f7f568-767f-4786-bb2c-5dbc64cfbcad

    Yes

    String

    /

    client_id

    ${Application ID}

    Yes

    String

    The client_id parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    secret

    {{Secret key}}

    Yes

    String

    The secret parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    Response Example

    1. Success

    {  
    "status": 200,  
    "data": {    
    "recordId": "16f7f568-767f-4786-bb2c-5dbc64cfbcad", //Execution instance ID    
    "taskId": "868478d9-a36d-481f-b42d-6074310c2829", //Task ID    
    "taskName": "fdlDemo", //Task name    
    "taskPath": "Task List/Level 1 Directory/fdlDemo", //Task path    
    "status": "INTERRUPT", //Instance execution status    
    "startTime": 1690786927020, //Execution start time of the instance    
    "finishTime": 1690786944299, //Execution end time of the instance 
    "triggerMethod": "MANUAL", //Instance triggering method.   
    "triggerBy": "root" //User who triggered the instance execution
    }
    }
    Parameter Name
    Parameter ValueParameter TypeDescription

    status

    200

    Integer

    /

    data

    /

    Object

    /

    data.recordId

    16f7f568-767f-4786-bb2c-5dbc64cfbcad

    String

    The value is the instance ID, which is the running record ID. 

    data.taskId

    868478d9-a36d-481f-b42d-6074310c2829

    String

    Task ID

    data.taskName

    fdlDemo

    String

    Task name

    data.taskPath

    Task List/First-Level Directory/fdlDemo

    String

    Task path

    data.status

    INTERRUPT

    String

    Instance execution status

    data.startTime

    1690786927020

    Integer

    Execution start time of the instance

    data.finishTime

    1690786944299

    Integer

    Execution end time of the instance

    data.triggerMethod

    MANUAL

    String

    Instance triggering method

    data.triggerBy

    root

    String

    The user who triggered the instance execution

    2. Failure

    {
    "status": 200,
    "errorCode": "E8130012",
    "errorMsg": "can not find record by recordId"
    }
    Parameter Name
    Parameter ValueParameter TypeDescription

    status

    200

    Integer

    /

    errorCode

    E8130011

    String

    /

    errorMsg

    can not find record by recordId

    String

    /

    3. Permission dissatisfaction

    {
    "status": 200,
    "errorCode": "E8130011",
    "errorMsg": "You have no permission."
    }
    Parameter Name
    Parameter ValueRequired or NotParameter TypeDescription

    status

    200

    Yes

    Integer

    /

    errorCode

    E8130011

    Yes

    String

    /

    errorMsg

    You have no permission.

    Yes

    String

    /

    Running a Task by Task ID

    Basic Information

    API URL: http://IP address:Port number/webroot/decision/sp/client/api/fdl/workId/execute

    Content-Type: application/json

    Request method: POST

    Request Parameter

    1. Header parameter

    Parameter Name
    Parameter ValueRequired or NotParameter TypeDescription

    client_id

    ${Application ID}

    Yes

    String

    The client_id parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    secret

    {{Secret key}}

    Yes

    String

    The secret parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    2. Body parameter

    Request type: raw_json

    iconNote:
    This API cannot be used to trigger simultaneous execution of multiple scheduled tasks.
    {
        "workId": "e10f1f1a-d567-4058-98bb-b71204154f8b",
        "params": {
            "paramName": "paramValue"
        },
        "waitForResponse": false,
        "waitTime": 10000
    }
    iconNote:
    If you do not want to input values of non-required fields in the body, follow the body format below:
    {
        "workId": "e10f1f1a-d567-4058-98bb-b71204154f8b",
        "params": {}
    }
    Parameter NameParameter ValueRequired or NotParameter TypeDescription

    workId

    e10f1f1a-d567-4058-98bb-b71204154f8b

    Yes

    String

    Required. Enter the task ID.

    params

    /

    No

    Object

    Optional. Enter the parameter.

    You can pass parameters to the scheduled task. For details, see Examples of Calling Scheduled Task APIs in FineReport Templates.

    params.paramName

    paramValue

    No

    String

    Optional. Enter the parameter.

    waitForResponse

    true

    No

    String

    Optional. Determine whether to return the result after task completion. Values include true and false, which defaults to false if omitted. If you enter false, it returns the instance ID or the request result immediately. If you enter true, it returns the actual execution result.

    waitTime

    10000

    No

    String

    Optional. Enter the wait time (unit: millisecond). The default value is 60000.

    iconNote:
    If the waitForResponse value is set to false, the waitTime parameter will not take effect. If the waitForResponse value is set to true, the API will return the current task status after the duration specified by waitTime.

    Response Example

    1. Success

    {
    "status": 200,
    "data": {
    "recordId": "70aa0661-c626-4c55-bbba-e392624945fa", //Instance ID
    "status": "SUCCESS" //Instance execution status
    }
    }
    Parameter NameParameter ValueParameter TypeDescription

    status

    200

    Integer

    /

    data

    /

    Object

    /

    data.recordId

    70aa0661-c626-4c55-bbba-e392624945fa

    String

    Instance ID

    The instance ID is the running record ID.

    data.status

    SUCCESS

    String

    This parameter value is returned only when the waitForResponse value is set to true.

    Instance execution results include:

    SUCCESS: successful

    ERROR: execution failed

    BUILD_FAIL: construction failed

    INTERRUPT: interrupted

    RUNNING: running

    QUEUING: queuing

    BUILDING: constructing

    2. Failure

    {
    "status": 200,
    "errorCode": "E8130051",
    "errorMsg": "The task does not exist. The file cannot be obtained."
    }
    Parameter Name
    Parameter ValueParameter Type
    Description

    status

    200

    Integer

    /

    errorCode

    E8130051

    String

    /

    errorMsg

    The task does not exist. The file cannot be obtained.

    String

    /

    3. Null values for required fields

    {
    "status": 200,
    "errorCode": "E8130052",
    "errorMsg": "workId can not be null!"
    }
    Parameter Name
    Parameter ValueParameter Type

    status

    200

    Integer

    errorCode

    E8130052

    String

    errorMsg

    workId can not be null!

    String

    4. Permission dissatisfaction

    {
    "status": 200,
    "errorCode": "E8130059",
    "errorMsg": "You have no permission."
    }
    Parameter Name
    Parameter ValueParameter Type

    status

    200

    Integer

    errorCode

    E8130059

    String

    errorMsg

    You have no permission.

    String

    Running a Task by Task Name

    Basic Information

    API URL: http://IP address:Port number/webroot/decision/sp/client/api/fdl/workName/execute

    Content-Type: application/json

    Request method: POST

    Request Parameter

    1. Header parameter

    Parameter NameParameter ValueRequired or NotParameter TypeDescription

    client_id

    ${Application ID}

    Yes

    String

    The client_id parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    secret

    {{Secret key}}

    Yes

    String

    The secret parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    2. Body parameter

    Request type: raw_json

    {
    "workName": "fdlDemo", //Required. Enter the task name. 
    "params": {
    "paramName": "paramValue" //Optional. Enter the parameter. Leave it empty if there is no parameter.}, //Optional. Enter the parameter. 
    "waitForResponse": "true", //Optional. Determine whether to return the result after task completion. 
    "waitTime": 10000 
    }
    iconNote:
    If you do not want to input values of non-required fields in the body, follow the body format below:
    {
    "workName": "Row-to-Column Conversion",
    "params": {
    "paramName": ""
    }
    }
    Parameter Name
    Parameter ValueRequired or NotParameter TypeDescription

    workName

    fdlDemo

    Yes

    String

    Required. Enter the task name.

    params

    /

    No

    Object

    Optional. Enter the parameter.

    You can pass parameters to the scheduled task. For details, see Examples of Calling Scheduled Task APIs in FineReport Templates.

    params.paramName

    paramValue

    No

    String

    Optional. Enter the parameter.

    waitForResponse

    true

    No

    String

    Optional. Determine whether to return the result after task completion. Values include true and false, which defaults to false if omitted. If you enter false, it returns the instance ID or the request result immediately. If you enter true, it returns the actual execution result.

    timeout

    10000

    No

    String

    Optional. Enter the wait time (unit: millisecond). The default value is 60000.

    Response Example

    1. Success

    {
    "status": 200, 
    "data": {
    "recordId": "e14169b9-328c-4b62-8a75-abc546f61d38", 
    "status": "SUCCESS" 

    }
    Parameter NameParameter ValueParameter TypeDescription

    status

    200

    Integer

    /

    data

    /

    Object

    /

    data.recordId

    e14169b9-328c-4b62-8a75-abc546f61d38

    String

    Instance ID

    data.status

    SUCCESS

    String

    This parameter value is returned only when the waitForResponse value is set to true.

    Instance execution results include:

    SUCCESS: successful

    ERROR: execution failed

    BUILD_FAIL: construction failed

    INTERRUPT: interrupted

    RUNNING: running

    QUEUING: queuing

    BUILDING: constructing

    2. Failure

    {
    "status": 200, 
    "errorCode": "E8130061", 
    "errorMsg": "The task does not exist. The file cannot be obtained."
    }
    Parameter Name
    Parameter ValueParameter TypeDescription

    status

    200

    Integer

    /

    errorCode

    E8130061

    String

    /

    errorMsg

    The task does not exist. The file cannot be obtained.

    String

    /

    3. Null values for required fields

    {
    "status": 200,
    "errorCode": "E8130061",
    "errorMsg": "workName can not be null!"
    }
    Parameter Name
    Parameter ValueParameter Type

    status

    200

    Integer

    errorCode

    E8130061

    String

    errorMsg

    workName can not be null!

    String

    4. Permission dissatisfaction

    {
    "status": 200,
    "errorCode": "E8130069",
    "errorMsg": "You have no permission."
    }
    Parameter Name
    Parameter ValueParameter Type

    status

    200

    Integer

    errorCode

    E8130069

    String

    errorMsg

    You have no permission.

    String

    Terminating a Running Instance by Task ID

    • It does not check whether the instance is currently running. If you call it to terminate an instance, any queued instances will also be terminated.

    • A successful request does not guarantee immediate termination, as the process may experience some delay.

    Basic Information

    API URL: http://IP address:Port number/webroot/decision/sp/client/api/fdl/workId/terminate?workId=e10f1f1a-d567-4058-98bb-b71204154f8b

    Request method: POST

    Request Parameter

    1. Header parameter

    Parameter Name
    Parameter ValueRequired or NotParameter TypeDescription

    client_id

    ${Application ID}

    Yes

    String

    The client_id parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    secret

    {{Secret key}}

    Yes

    String

    The secret parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    2. Query parameter:

    Parameter Name
    Parameter ValueRequired or NotParameter TypeDescription

    workId

    868478d9-a36d-481f-b42d-6074310c2829

    Yes

    String

    Required. Enter the task ID.

    Response Example

    Success:

    {
    "code": "200",
    "message": "success"
    }
    Parameter Name
    Parameter ValueParameter TypeDescription

    code

    200

    String

    /

    message

    success

    String

    /

    Terminating a Running Instance by Task Name

    • It does not check whether the instance is currently running. If you call it to terminate an instance, any queued instances will also be terminated.

    • A successful request does not guarantee immediate termination, as the process may experience some delay.

    Basic Information

    API URL: http://IP address:Port number/webroot/decision/sp/client/api/fdl/workName/terminate?workName=01 Data Synchronization

    Request method: POST

    Request Parameter

    1. Header parameter

    Parameter NameParameter ValueRequired or NotParameter TypeDescription

    client_id

    ${Application ID}

    Yes

    String

    The client_id parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    secret

    {{Secret key}}

    Yes

    String

    The secret parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    2. Query parameter:

    Parameter Name
    Parameter ValueRequired or NotParameter TypeDescription

    workName

    01 Data Synchronization

    Yes

    String

    Required. Enter the task name.

    Response Example

    1. Success

    {
    "code": "200",
    "data": "success"
    }
    Parameter Name
    Parameter ValueParameter Type
    Description

    code

    200

    String

    /

    message

    success

    String

    /

    2. Failure

    {
    "status": 200, 
    "errorCode": "E8130089", 
    "errorMsg": "Task does not exist, unable to retrieve file" 
    }
    Parameter Name
    Parameter ValueParameter TypeDescription

    status

    200

    Integer

    /

    errorCode

    E8130089

    String

    /

    errorMsg

    The task does not exist. The file cannot be obtained.

    String

    /

    Terminating a Running Instance by Instance ID

    • It does not check whether the instance is currently running. If you call it to terminate an instance, any queued instances will also be terminated.

    • A successful request does not guarantee immediate termination, as the process may experience some delay.

    Basic Information

    API URL: http://IP address:Port number/webroot/decision/sp/client/api/fdl/records/terminate

    Content-Type: application/json

    Request method: POST

    Request Parameter

    1. Header parameter

    Parameter NameParameter ValueRequired or NotParameter TypeDescription

    client_id

    ${Application ID}

    Yes

    String

    The client_id parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    secret

    {{Secret key}}

    Yes

    String

    The secret parameter is required for API authentication using the AK/SK Direct Authentication method. Replace it with the one required by the actually used application authentication method.

    2. Body parameter

    {
    "executeIds": [
    "16f7f568-767f-4786-bb2c-5dbc64cfbcad222"
    ] //Required. Enter the instance ID.
    }
    Parameter Name
    Parameter ValueRequired or NotParameter TypeDescription

    executeIds

    16f7f568-767f-4786-bb2c-5dbc64cfbcad

    Yes

    Array

    Required. Enter the instance ID.

    Response Example

    1. Success

    {
    "status": 200,
    "data": "success"
    }
    Parameter Name
    Parameter ValueParameter Type

    status

    200

    Integer

    data

    success

    String

    2. Failure

    {
    "status": 200,
    "errorCode": "E8130042",
    "errorMsg": "executeIds can not be null!"
    }
    Parameter Name
    Parameter ValueParameter Type

    status

    200

    Integer

    errorCode

    E8130042

    String

    errorMsg

    executeIds can not be null!

    String

    附件列表


    主题: Data Development - Scheduled Task
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy