All Products
Search
Document Center

:ListFiles

Last Updated:Jun 11, 2026

Mengkueri daftar file.

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

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:*

get

*All Resource

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

FileFolderPath

string

No

Jalur folder tempat file berada.

Business_process/my_first_business_process/MaxCompute/ods_layer

ProjectId

integer

No

ID ruang kerja DataWorks. Anda dapat masuk ke Konsol DataWorks dan membuka halaman Manajemen Ruang Kerja untuk mendapatkan ID ruang kerja.

Anda harus mengonfigurasi parameter ProjectId atau ProjectIdentifier untuk menentukan ruang kerja DataWorks tempat operasi diterapkan.

10000

Keyword

string

No

Kata kunci dalam nama file. Kata kunci digunakan untuk melakukan pencocokan kabur. Anda dapat menentukan kata kunci untuk mengkueri semua file yang namanya mengandung kata kunci tersebut.

ods

ProjectIdentifier

string

No

Nama ruang kerja DataWorks. Anda dapat masuk ke Konsol DataWorks dan membuka halaman Manajemen Ruang Kerja untuk mendapatkan nama ruang kerja.

Anda harus mengonfigurasi parameter ProjectId atau ProjectIdentifier untuk menentukan ruang kerja DataWorks tempat operasi diterapkan.

dw_project

PageNumber

integer

No

Nomor halaman.

1

PageSize

integer

No

Jumlah entri per halaman. Nilai default: 10. Nilai maksimum: 100.

10

UseType

string

No

Modul tempat file berada. Nilai valid:

  • NORMAL: File digunakan untuk DataStudio.

  • MANUAL: File digunakan untuk node yang dipicu secara manual.

  • MANUAL_BIZ: File digunakan untuk alur kerja yang dipicu secara manual.

  • SKIP: File digunakan untuk node dry-run di DataStudio.

  • ADHOCQUERY: File digunakan untuk kueri ad hoc.

  • COMPONENT: File digunakan untuk cuplikan.

NORMAL

FileTypes

string

No

Tipe kode dalam file.

Nilai valid: 6 (Shell), 10 (ODPS SQL), 11 (ODPS MR), 23 (Integrasi Data), 24 (Skrip ODPS), 97 (PAI), 98 (kelompok node), 99 (zero load), 221 (PyODPS 2), 225 (ODPS Spark), 227 (EMR Hive), 228 (EMR Spark), 229 (EMR Spark SQL), 230 (EMR MR), 239 (pemeriksaan objek OSS), 257 (EMR Shell), 258 (EMR Spark Shell), 259 (EMR Presto), 260 (EMR Impala), 900 (sinkronisasi real-time), 1002 (node internal PAI), 1089 (kolaborasi lintas penyewa), 1091 (pengembangan Gudang Data Real-time), 1093 (SQL Gudang Data Real-time), 1100 (penugasan), 1106 (for-each), dan 1221 (PyODPS 3).

10,23

Owner

string

No

Pemilik file.

3726346****

NodeId

integer

No

ID node terjadwal. Anda dapat memanggil operasi ListNodes untuk mengkueri ID node.

123541234

NeedContent

boolean

No

Apakah hasil kueri mengandung konten file. Untuk file dengan konten besar, mungkin terjadi penundaan transmisi jaringan.

false

NeedAbsoluteFolderPath

boolean

No

Apakah hasil kueri mengandung jalur folder tempat file berada.

false

ExactFileName

string

No

Nama file persis yang akan dicocokkan. Nama file dalam hasil kueri harus persis sama dengan nilai parameter ini.

ods_create.sql

FileIdIn

string

No

Daftar ID file. ID file dalam hasil kueri hanya dapat berupa subset dari daftar ini. Anda dapat menentukan hingga 50 ID file sekaligus.

78237,816123

LastEditUser

string

No

ID akun Alibaba Cloud yang terakhir digunakan untuk memodifikasi file.

38748246285727

Elemen respons

Element

Type

Description

Example

object

The returned data.

HttpStatusCode

integer

The HTTP status code returned.

200

ErrorMessage

string

The error message returned.

The connection does not exist.

RequestId

string

The request ID. You can troubleshoot issues based on the ID.

0000-ABCD-EFG

ErrorCode

string

The error code returned.

Invalid.Tenant.ConnectionNotExists

Success

boolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.

  • false: The request fails.

true

Data

object

The files returned.

PageNumber

integer

The page number of the returned page.

1

PageSize

integer

The number of entries returned per page.

10

TotalCount

integer

The total number of entries returned.

13

Files

array<object>

The details of the files.

object

The information about the file.

CommitStatus

integer

Indicates whether the latest code in the file is committed. Valid values: 0 and 1. The value 0 indicates that the latest code in the file is not committed. The value 1 indicates that the latest code in the file is committed.

1

AutoParsing

boolean

Specifies whether the automatic parsing feature is enabled for the file. Valid values:

  • true: The automatic parsing feature is enabled for the file.

  • false: The automatic parsing feature is not enabled for the file.

This parameter is equivalent to the Analyze Code parameter in the Dependencies section of the Properties panel in the DataWorks console.

true

Owner

string

The ID of the Alibaba Cloud account used by the file owner.

3872572****

CreateTime

integer

The time when the file was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1593950832000

FileType

integer

The type of the code in the file. Valid values: 6 (Shell), 10 (ODPS SQL), 11 (ODPS MR), 23 (Data Integration), 24 (ODPS Script), 99 (zero load), 221 (PyODPS 2), 225 (ODPS Spark), 227 (EMR Hive), 228 (EMR Spark), 229 (EMR Spark SQL), 230 (EMR MR), 239 (OSS object inspection), 257 (EMR Shell), 258 (EMR Spark Shell), 259 (EMR Presto), 260 (EMR Impala), 900 (real-time synchronization), 1089 (cross-tenant collaboration), 1091 (Hologres development), 1093 (Hologres SQL), 1100 (assignment), and 1221 (PyODPS 3).

10

CurrentVersion

integer

The latest version number of the file.

2

BizId

integer

The ID of the workflow to which the file belongs. This parameter is deprecated and replaced by the BusinessId parameter.

300000

LastEditUser

string

The ID of the Alibaba Cloud account that is used to last modify the file.

38748246285727

FileName

string

The name of the file.

ods_user_info_d

ConnectionName

string

The ID of the compute engine instance that is used to run the node that corresponds to the file.

odps_first

UseType

string

The module to which the file belongs. Valid values:

  • NORMAL: The file is used for DataStudio.

  • MANUAL: The file is used for a manually triggered node.

  • MANUAL_BIZ: The file is used for a manually triggered workflow.

  • SKIP: The files is used for a dry-run node in DataStudio.

  • ADHOCQUERY: The file is used for an ad hoc query.

  • COMPONENT: The file is used for a snippet.

NORMAL

FileFolderId

string

The ID of the folder to which the file belongs.

2735c2****

FileId

integer

The ID of the file.

10000001

ParentId

integer

The ID of the node group file to which the current file belongs. This parameter is returned only if the current file is an inner file of the node group file.

-1

CreateUser

string

The ID of the Alibaba Cloud account that is used to create the file.

382762****

IsMaxCompute

boolean

Indicates whether the file needs to be uploaded to MaxCompute if the file is a MaxCompute resource file.

This parameter is returned only if the file is a MaxCompute resource file.

false

BusinessId

integer

The ID of the workflow to which the file belongs.

300000

FileDescription

string

The description of the file.

my test datastudio file

LastEditTime

integer

The time when the file was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1593950832000

Content

string

This parameter is deprecated. You can call the GetFile operation to query the details of the file.

SHOW TABLES;

NodeId

integer

The ID of the auto triggered node that is generated in the scheduling system after the file is committed.

300001

AbsoluteFolderPath

string

The path of the folder to which the file belongs.

Business_process/my_first_business_process/MaxCompute/ods_layer

Contoh

Respons sukses

JSONformat

{
  "HttpStatusCode": 200,
  "ErrorMessage": "The connection does not exist.",
  "RequestId": "0000-ABCD-****",
  "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
  "Success": true,
  "Data": {
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 13,
    "Files": [
      {
        "CommitStatus": 1,
        "AutoParsing": true,
        "Owner": "3872572****",
        "CreateTime": 1593950832000,
        "FileType": 10,
        "CurrentVersion": 2,
        "BizId": 300000,
        "LastEditUser": "38748246285727",
        "FileName": "ods_user_info_d",
        "ConnectionName": "odps_source",
        "UseType": "NORMAL",
        "FileFolderId": "2735c2****",
        "FileId": 10000001,
        "ParentId": -1,
        "CreateUser": "382762****",
        "IsMaxCompute": false,
        "BusinessId": 300000,
        "FileDescription": "my test datastudio file",
        "LastEditTime": 1593950832000,
        "Content": "SHOW TABLES;",
        "NodeId": 300001,
        "AbsoluteFolderPath": "Business_process/my_first_business_process/MaxCompute/ods_layer"
      }
    ]
  }
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

500 InternalError.System An internal system error occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. No permission, please authorize
429 Throttling.Api The request for this resource has exceeded your available limit.
429 Throttling.System The DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.