All Products
Search
Document Center

DataWorks:ListTasks

Last Updated:Jan 12, 2026

Queries a list of tasks by page. You can also specify filter conditions to query tasks.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:*get
*Task
acs:dataworks:{#regionId}:{#accountId}:task/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectEnvstringNo

The workspace environment.

Valid values:

  • Prod
  • Dev
Prod
ProjectIdlongYes

The workspace ID.

100
NamestringNo

The name of the task. Fuzzy match is supported.

SQL node
IdsarrayNo

The ID of the task.

longNo

The account ID of the owner of the task.

1234
OwnerstringNo

The account ID of the task owner.

1000
TaskTypestringNo

The type of the task. Valid values:

  • ODPS_SQL
  • SPARK
  • PY_ODPS
  • PY_ODPS3
  • ODPS_SCRIPT
  • ODPS_MR
  • COMPONENT_SQL
  • EMR_HIVE
  • EMR_MR
  • EMR_SPARK_SQL
  • EMR_SPARK
  • EMR_SHELL
  • EMR_PRESTO
  • EMR_IMPALA
  • SPARK_STREAMING
  • EMR_KYUUBI
  • EMR_TRINO
  • HOLOGRES_SQL
  • HOLOGRES_SYNC_DDL
  • HOLOGRES_SYNC_DATA
ODPS_SQL
RuntimeResourcestringNo

The information about the resource group. Set this parameter to the ID of a resource group for scheduling.

S_res_group_524258031846018_1684XXXXXXXXX
WorkflowIdlongNo

The ID of the workflow to which the task belongs.

1234
TriggerTypestringNo

The trigger type.

Valid values:

  • Scheduler: Triggered by schedule.
  • Manual: Triggered manually.
Scheduler
TriggerRecurrencestringNo

The run mode when triggered. Valid only if TriggerType is Scheduler.

Valid values:

  • Pause
  • Skip
  • Normal
Normal
SortBystringNo

The field that is used to sort tasks. This parameter is configured in the format of "Sorting field Sorting order". You can set the sorting order to Desc or Asc. If you do not specify the sorting order, Asc is used by default. Valid values:

  • ModifyTime (Desc/Asc)

  • CreateTime (Desc/Asc)

  • Id (Desc/Asc)

    Default value: Id Desc.

Id Desc
PageSizeintegerNo

The number of entries per page. Default value: 10.

10
PageNumberintegerNo

The page number. Pages start from page 1. Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object

ResultModel

RequestIdstring

The request ID.

22C97E95-F023-56B5-8852-B1A77A17XXXX
PagingInfoobject

The pagination information.

TotalCountinteger

The total number of entries returned.

100
PageSizeinteger

The number of entries per page.

10
PageNumberinteger

The page number.

1
Tasksarray<object>

The tasks.

Taskobject
Namestring

The name of the task.

SQL node
Descriptionstring

The description of the task.

test
WorkflowIdlong

The ID of the workflow to which the task belongs.

1234
InstanceModestring

The instance generation mode. Valid values:

  • T+1
  • Immediately
T+1
Typestring

The type of the task.

ODPS_SQL
BaselineIdlong

The baseline ID.

1234
Priorityinteger

The priority of the task. Valid values: 1 to 8. A larger value indicates a higher priority. Default value: 1.

1
Timeoutinteger

The timeout period of task running. Unit: seconds.

3600
RerunModestring

The rerun mode.

Valid values:

  • AllDenied: The task cannot be rerun regardless of whether the task is successfully run or fails to run.
  • FailureAllowed: The task can be rerun only after it fails to run.
  • AllAllowed: The task can be rerun regardless of whether it is successfully run or fails to run.
AllAllowed
RerunTimesinteger

The number of times that the task is rerun. This parameter takes effect only if the RerunMode parameter is set to AllAllowed or FailureAllowed.

3
RerunIntervalinteger

The rerun interval. Unit: seconds.

60
Triggerobject

The method to trigger task scheduling.

Typestring

The trigger type.

Valid values:

  • Scheduler: scheduling cycle-based trigger
  • Manual: manual trigger
Scheduler
Recurrencestring

The running mode of the task after it is triggered. This parameter takes effect only if the Type parameter is set to Scheduler.

Valid values:

  • Pause
  • Skip
  • Normal
Normal
Cronstring

The CRON expression of the task. This parameter takes effect only if the Type parameter is set to Scheduler.

00 00 00 * * ?
StartTimestring

The start time of the time range during which the task is periodically scheduled. This parameter takes effect only if the Type parameter is set to Scheduler.

1970-01-01 00:00:00
EndTimestring

The end time of the time range during which the task is periodically scheduled. This parameter takes effect only if the Type parameter is set to Scheduler.

9999-01-01 00:00:00
RuntimeResourceobject

The configurations of the runtime environment, such as the resource group information.

ResourceGroupIdstring

The ID of the resource group for scheduling configured for task running.

S_res_group_524258031846018_1684XXXXXXXXX
Imagestring

The ID of the image configured for task running.

i-xxxxxx
Custring

The default number of compute units (CUs) configured for task running.

0.25
DataSourceobject

The information about the associated data source.

Namestring

The name of the data source.

mysql_test
Idlong

The task ID.

1234
ProjectIdlong

The workspace ID.

100
ProjectEnvstring

The environment of the workspace.

Valid values:

  • Prod: production environment
  • Dev: development environment
Prod
Ownerstring

The account ID of the task owner.

1000
CreateTimelong

The creation time.

1710239005403
ModifyTimelong

The modification time.

1710239005403
CreateUserstring

The account ID of the creator.

1000
ModifyUserstring

The account ID of the modifier.

1000
ScriptParametersstring

The list of script parameters.

para1=$bizdate para2=$[yyyymmdd]

Examples

Sample success responses

JSONformat

{
  "RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX\n",
  "PagingInfo": {
    "TotalCount": 100,
    "PageSize": 10,
    "PageNumber": 1,
    "Tasks": [
      {
        "Name": "SQL node",
        "Description": "test\n",
        "WorkflowId": 1234,
        "InstanceMode": "T+1",
        "Type": "ODPS_SQL",
        "BaselineId": 1234,
        "Priority": 1,
        "Timeout": 3600,
        "RerunMode": "AllAllowed\n",
        "RerunTimes": 3,
        "RerunInterval": 60,
        "Trigger": {
          "Type": "Scheduler\n",
          "Recurrence": "Normal\n",
          "Cron": "00 00 00 * * ?",
          "StartTime": "1970-01-01 00:00:00\n",
          "EndTime": "9999-01-01 00:00:00\n"
        },
        "RuntimeResource": {
          "ResourceGroupId": "S_res_group_524258031846018_1684XXXXXXXXX",
          "Image": "i-xxxxxx\n",
          "Cu": 0.25
        },
        "DataSource": {
          "Name": "mysql_test\n"
        },
        "Id": 1234,
        "ProjectId": 100,
        "ProjectEnv": "Prod",
        "Owner": 1000,
        "CreateTime": 1710239005403,
        "ModifyTime": 1710239005403,
        "CreateUser": 1000,
        "ModifyUser": 1000,
        "ScriptParameters": "para1=$bizdate para2=$[yyyymmdd] "
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-11-25API Description UpdateView Change Details
2025-01-21The response structure of the API has changedView Change Details
2025-01-15The request parameters of the API has changedView Change Details
2025-01-06The response structure of the API has changedView Change Details
2024-11-20The response structure of the API has changedView Change Details