All Products
Search
Document Center

DataWorks:ListTasks

Last Updated:Jun 11, 2026

Mengkueri daftar task per halaman. Anda juga dapat menentukan kondisi filter untuk mengkueri task.

Deskripsi operasi

DataWorks Basic Edition atau yang lebih tinggi diperlukan.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Parameter permintaan

Parameter

Type

Required

Description

Example

ProjectEnv

string

No

Lingkungan workspace.

Nilai yang valid:

  • Prod

  • Dev

Valid values:

  • Prod :
  • Dev :

Prod

ProjectId

integer

Yes

ID workspace.

100

Name

string

No

Nama task. Pencocokan fuzzy didukung.

SQL node

Ids

array

No

ID task.

integer

No

ID akun pemilik task.

1234

Owner

string

No

ID akun pemilik task.

1000

TaskType

string

No

Tipe task. Nilai yang valid:

  • 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

RuntimeResource

string

No

Informasi tentang grup resource. Setel parameter ini ke ID grup resource untuk penjadwalan.

S_res_group_524258031846018_1684XXXXXXXXX

WorkflowId

integer

No

ID workflow tempat task berada.

1234

TriggerType

string

No

Tipe trigger.

Nilai yang valid:

  • Scheduler: Dipicu berdasarkan jadwal.

  • Manual: Dipicu secara manual.

Valid values:

  • Scheduler :
  • Manual :

Scheduler

TriggerRecurrence

string

No

Mode jalankan ketika dipicu. Hanya valid jika TriggerType adalah Scheduler.

Nilai yang valid:

  • Pause

  • Skip

  • Normal

Valid values:

  • Pause :
  • Skip :
  • Normal :

Normal

SortBy

string

No

Field yang digunakan untuk mengurutkan task. Parameter ini dikonfigurasi dalam format "Field pengurutan Urutan pengurutan". Anda dapat menyetel urutan pengurutan ke Desc atau Asc. Jika Anda tidak menentukan urutan pengurutan, Asc digunakan secara default. Nilai yang valid:

  • ModifyTime (Desc/Asc)

  • CreateTime (Desc/Asc)

  • Id (Desc/Asc)

    Nilai default: Id Desc.

Id Desc

PageSize

integer

No

Jumlah entri per halaman. Nilai default: 10.

10

PageNumber

integer

No

Nomor halaman. Halaman dimulai dari halaman 1. Nilai default: 1.

1

Elemen respons

Element

Type

Description

Example

object

ResultModel

RequestId

string

ID permintaan.

22C97E95-F023-56B5-8852-B1A77A17XXXX

PagingInfo

object

Informasi paginasi.

TotalCount

integer

Jumlah total entri yang dikembalikan.

100

PageSize

integer

Jumlah entri per halaman.

10

PageNumber

integer

Nomor halaman.

1

Tasks

array<object>

Daftar task.

array<object>

Name

string

The name of the task.

SQL node

Description

string

The description of the task.

test

WorkflowId

integer

The ID of the workflow to which the task belongs.

1234

InstanceMode

string

The instance generation mode. Valid values:

  • T+1

  • Immediately

T+1

Type

string

The type of the task.

ODPS_SQL

BaselineId

integer

The baseline ID.

1234

Priority

integer

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

1

Timeout

integer

The timeout period of task running. Unit: seconds.

3600

RerunMode

string

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.

Valid values:

  • AllDenied :
  • FailureAllowed :
  • AllAllowed :

AllAllowed

RerunTimes

integer

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

RerunInterval

integer

The rerun interval. Unit: seconds.

60

Trigger

object

The method to trigger task scheduling.

Type

string

The trigger type.

Valid values:

  • Scheduler: scheduling cycle-based trigger

  • Manual: manual trigger

Valid values:

  • Scheduler :
  • Manual :

Scheduler

Recurrence

string

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

Valid values:

  • Pause :
  • Skip :
  • Normal :

Normal

Cron

string

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

00 00 00 * * ?

StartTime

string

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

EndTime

string

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

RuntimeResource

object

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

ResourceGroupId

string

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

S_res_group_524258031846018_1684XXXXXXXXX

Image

string

The ID of the image configured for task running.

i-xxxxxx

Cu

string

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

0.25

DataSource

object

The information about the associated data source.

Name

string

The name of the data source.

mysql_test

Id

integer

The task ID.

1234

ProjectId

integer

The workspace ID.

100

ProjectEnv

string

The environment of the workspace.

Valid values:

  • Prod: production environment

  • Dev: development environment

Valid values:

  • Prod :
  • Dev :

Prod

Owner

string

The account ID of the task owner.

1000

CreateTime

integer

The creation time.

1710239005403

ModifyTime

integer

The modification time.

1710239005403

CreateUser

string

The account ID of the creator.

1000

ModifyUser

string

The account ID of the modifier.

1000

ScriptParameters

string

The list of script parameters.

para1=$bizdate para2=$[yyyymmdd]

Contoh

Respons sukses

JSONformat

{
  "RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX\n",
  "PagingInfo": {
    "TotalCount": 100,
    "PageSize": 10,
    "PageNumber": 1,
    "Tasks": [
      {
        "Name": "SQL node\n",
        "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] "
      }
    ]
  }
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.