All Products
Search
Document Center

DataWorks:ListFiles

Last Updated:Jun 11, 2026

Mengambil 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

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

Parameter permintaan

Parameter

Type

Required

Description

Example

FileFolderPath

string

No

Jalur ke folder tempat file berada.

Business_process/my_first_business_process/MaxCompute/ods_layer

ProjectId

integer

No

ID workspace DataWorks. Anda dapat masuk ke konsol DataWorks dan membuka halaman Workspace untuk memperoleh ID.

Anda harus mengonfigurasi parameter ini atau parameter ProjectIdentifier untuk menentukan workspace DataWorks tempat operasi diterapkan.

10000

Keyword

string

No

Kata kunci untuk nama file. Pencocokan fuzzy didukung. Anda dapat memasukkan kata kunci untuk mengambil semua file yang berisi kata kunci tersebut.

ods

ProjectIdentifier

string

No

Nama workspace DataWorks. Untuk memperoleh nama workspace, masuk ke konsol DataWorks dan navigasikan ke halaman konfigurasi workspace.

Anda harus menentukan parameter ini atau ProjectId untuk mengidentifikasi workspace DataWorks target untuk pemanggilan API ini.

dw_project

PageNumber

integer

No

Nomor halaman untuk paginasi.

1

PageSize

integer

No

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

10

UseType

string

No

Modul fungsional tempat file berada. Nilai yang valid:

  • NORMAL: Data Studio

  • MANUAL: Node yang dipicu secara manual

  • MANUAL_BIZ: Alur kerja yang dipicu secara manual

  • SKIP: Penjadwalan dry-run di Data Studio

  • ADHOCQUERY: Kueri ad hoc

  • COMPONENT: Manajemen komponen

NORMAL

FileTypes

string

No

Jenis kode file.

Jenis kode file. Jenis kode umum dan jenis file yang sesuai meliputi: 6 (Shell), 10 (ODPS SQL), 11 (ODPS MR), 23 (Data Integration), 24 (ODPS Script), 97 (PAI), 98 (Node gabungan), 99 (Node virtual), 221 (PyODPS 2), 225 (ODPS Spark), 227 (EMR Hive), 228 (EMR Spark), 229 (EMR Spark SQL), 230 (EMR MR), 239 (Inspeksi objek OSS), 257 (EMR Shell), 258 (EMR Spark Shell), 259 (EMR Presto), 260 (EMR Impala), 900 (Sinkronisasi real-time), 1002 (Node internal PAI), 1089 (Node lintas tenant), 1091 (Pengembangan Hologres), 1093 (Hologres SQL), 1100 (Node penugasan), 1106 (Node ForEach), 1221 (PyODPS 3).

10,23

Owner

string

No

ID pemilik file.

3726346****

NodeId

integer

No

ID node penjadwalan. Anda dapat memanggil operasi ListNodes untuk memperoleh ID node.

123541234

NeedContent

boolean

No

Menentukan apakah hasil kueri menyertakan konten file. Untuk file dengan konten besar, dapat terjadi penundaan transmisi jaringan.

false

NeedAbsoluteFolderPath

boolean

No

Menentukan apakah hasil kueri menyertakan jalur ke folder tempat file berada.

false

ExactFileName

string

No

Nama file yang persis. Nama file dalam hasil kueri harus persis cocok dengan parameter ini.

ods_create.sql

FileIdIn

string

No

Daftar ID file. ID file dalam hasil kueri harus merupakan subset dari daftar ini. Anda dapat menentukan hingga 50 ID file dalam satu waktu.

78237,816123

LastEditUser

string

No

ID akun Alibaba Cloud dari pengguna yang terakhir memperbarui file.

11233***

CommitStatus

integer

No

Status commit file saat ini. Nilai yang valid: 0 (kode terbaru belum di-commit) dan 1 (kode terbaru telah di-commit).

1

Elemen respons

Element

Type

Description

Example

object

Respons.

HttpStatusCode

integer

Kode status HTTP.

200

ErrorMessage

string

Pesan kesalahan.

The connection does not exist.

RequestId

string

ID permintaan. Gunakan ID ini untuk memecahkan masalah.

0000-ABCD-****

ErrorCode

string

Kode kesalahan.

Invalid.Tenant.ConnectionNotExists

Success

boolean

Menunjukkan apakah pemanggilan berhasil. Nilai yang valid:

  • true

  • false

true

Data

object

Detail respons.

PageNumber

integer

Nomor halaman.

1

PageSize

integer

Jumlah entri per halaman.

10

TotalCount

integer

Jumlah total entri yang dikembalikan.

13

Files

array<object>

Detail file.

object

Informasi file.

CommitStatus

integer

The current commit status of the file. Valid values: 0 (the latest code is not committed) and 1 (the latest code is committed).

1

AutoParsing

boolean

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

  • true: The file automatically parses code.

  • false: The file does not automatically parse code.

This parameter corresponds to Analyze Code when you set Dependencies to Same Cycle in the scheduling configuration of a Data Studio task in the DataWorks console.

true

Owner

string

The Alibaba Cloud account ID of the file owner.

3872572****

CreateTime

integer

The timestamp (in milliseconds) when the file was created.

1593950832000

FileType

integer

The file type. Different file types have different code. For more information, see DataWorks node types.

10

CurrentVersion

integer

The latest version of the file.

2

BizId

integer

The ID of the workflow to which the file belongs. This parameter is deprecated. Use the BusinessId parameter instead.

300000

LastEditUser

string

The Alibaba Cloud account ID of the user who last updated the file.

382762****

FileName

string

The file name.

ods_user_info_d

ConnectionName

string

The data source name used by the task.

odps_source

UseType

string

The functional module to which the file belongs. Valid values:

  • NORMAL: Data Studio

  • MANUAL: Manually triggered node

  • MANUAL_BIZ: Manually triggered workflow

  • SKIP: Dry-run scheduling in Data Studio

  • ADHOCQUERY: Ad hoc query

  • COMPONENT: Component management

NORMAL

FileFolderId

string

The ID of the folder where the file is located.

2735c2****

FileId

integer

The file ID.

10000001

ParentId

integer

If the current file is an internal file of a combined node, this parameter specifies the ID of the corresponding combined node file.

-1

CreateUser

string

The Alibaba Cloud account ID of the file creator.

382762****

IsMaxCompute

boolean

If the current file is a MaxCompute resource file, this parameter specifies whether the resource file needs to be uploaded to MaxCompute.

You only need to configure this parameter when 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 timestamp (in milliseconds) when the file was last modified.

1593950832000

Content

string

This parameter is deprecated. You can call the GetFile operation to query this information.

SHOW TABLES;

NodeId

integer

The ID of the scheduling task generated in the scheduling system after the file is committed.

300001

AbsoluteFolderPath

string

The path to the folder where the file is located.

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": "382762****",
        "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.