All Products
Search
Document Center

:GetFile

Last Updated:Jun 11, 2026

Mengkueri informasi 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

ProjectId

integer

No

ID ruang kerja DataWorks. Anda dapat masuk ke Konsol DataWorks dan membuka halaman Workspace Management untuk mendapatkan ID ruang kerja.

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

10000

ProjectIdentifier

string

No

Nama ruang kerja DataWorks. Anda dapat masuk ke Konsol DataWorks dan membuka halaman Workspace Management untuk mendapatkan nama ruang kerja.

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

dw_project

FileId

integer

No

ID file. Anda dapat memanggil operasi ListFiles untuk mendapatkan ID.

100000001

NodeId

integer

No

ID node yang dijadwalkan. Anda dapat memanggil operasi ListFiles untuk mendapatkan ID node.

200000001

Elemen respons

Element

Type

Description

Example

object

The response parameters.

HttpStatusCode

integer

The HTTP status code returned.

200

ErrorMessage

string

The error message returned.

The connection does not exist.

RequestId

string

The ID of the request. You can use the ID to troubleshoot issues.

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 details of the file.

File

object

The basic 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.

0

AutoParsing

boolean

Indicates 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 corresponds to the Analyze Code parameter that is displayed after Same Cycle is selected in the Dependencies section of the Properties tab in the DataWorks console.

true

Owner

string

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

7775674356****

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.

1593879116000

FileType

integer

The type of the code for the file. The code for files varies based on the file type. For more information, see DataWorks nodes.

10

CurrentVersion

integer

The latest version number of the file.

3

BizId

integer

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

1000001

LastEditUser

string

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

62465892****

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 file is used for a dry-run DataStudio node.

  • 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****

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 used to create the file.

424732****

IsMaxCompute

boolean

Indicates whether the file needs to be uploaded to MaxCompute.

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

true

BusinessId

integer

The ID of the workflow to which the file belongs.

1000001

FileDescription

string

The description of the file.

My first DataWorks file

DeletedStatus

string

The status of the file. Valid values:

  • NORMAL: The file is not deleted.

  • RECYCLE_BIN: The file is stored in the recycle bin.

  • DELETED: The file is deleted.

RECYCLE

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.

1593879116000

Content

string

The code in 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

AdvancedSettings

string

The advanced configurations of the node.

This parameter is valid for an EMR node. This parameter corresponds to the Advanced Settings tab in the right-side navigation pane on the configuration tab of the node in the DataWorks console.

Catatan

You cannot configure advanced parameters for EMR Shell nodes.

For information about the advanced parameters of each type of EMR node, see Develop EMR tasks.

{"queue":"default","SPARK_CONF":"--conf spark.driver.memory=2g"}

FileId

integer

The ID of the file.

100000001

NodeConfiguration

object

The scheduling configurations of the file.

RerunMode

string

Indicates whether the node that corresponds to the file can be rerun. Valid values:

  • ALL_ALLOWED: The node can be rerun regardless of whether it is successfully run or fails to run.

  • FAILURE_ALLOWED: The node can be rerun only after it fails to run.

  • ALL_DENIED: The node cannot be rerun regardless of whether it is successfully run or fails to run.

This parameter corresponds to the Rerun parameter in the Schedule section of the Properties tab in the DataWorks console.

ALL_ALLOWED

SchedulerType

string

The scheduling type of the node. Valid values:

  • NORMAL: The node is an auto triggered node.

  • MANUAL: The node is a manually triggered node. Manually triggered nodes cannot be automatically triggered. They correspond to the nodes in the Manually Triggered Workflows pane.

  • PAUSE: The node is a paused node.

  • SKIP: The node is a dry-run node. Dry-run nodes are started as scheduled but the system sets the status of the nodes to successful when it starts to run them.

NORMAL

Stop

boolean

Indicates whether the scheduling for the node is suspended Valid values:

  • true: The scheduling for the node is suspended.

  • false: The scheduling for the node is not suspended.

This parameter corresponds to the Recurrence parameter in the Schedule section of the Properties tab in the DataWorks console.

false

ParaValue

string

The scheduling parameters of the node.

This parameter corresponds to the Parameters section of the Properties tab in the DataWorks console. For more information about the configurations of the scheduling parameters, see Configure scheduling parameters.

a=x b=y

StartEffectDate

integer

The start time of automatic scheduling. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

This parameter corresponds to the Validity Period parameter in the Schedule section of the Properties tab in the DataWorks console.

936923400000

EndEffectDate

integer

The end time of automatic scheduling. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

This parameter corresponds to the Validity Period parameter in the Schedule section of the Properties tab in the DataWorks console.

4155787800000

CycleType

string

The type of the scheduling cycle. Valid values: NOT_DAY and DAY. The value NOT_DAY indicates that the node is scheduled to run by minute or hour. The value DAY indicates that the node is scheduled to run by day, week, or month.

This parameter corresponds to the Scheduling Cycle parameter in the Schedule section of the Properties tab in the DataWorks console.

DAY

DependentNodeIdList

string

The ID of the node on which the node corresponding to the file depends when the DependentType parameter is set to USER_DEFINE. Multiple IDs are separated by commas (,).

The value of this parameter is equivalent to the ID of the node that you specified after you select Previous Cycle and set Depend On to Other Nodes in the Dependencies section of the Properties tab in the DataWorks console.

5,10,15,20

ResourceGroupId

integer

The ID of the resource group that is used to run the node. You can call the ListResourceGroups operation to query the available resource groups in the workspace.

375827434852437

DependentType

string

The type of the cross-cycle scheduling dependency of the node. Valid values:

  • SELF: The instance generated for the node in the current cycle depends on the instance generated for the node in the previous cycle.

  • CHILD: The instance generated for the node in the current cycle depends on the instances generated for the descendant nodes at the nearest level of the node in the previous cycle.

  • USER_DEFINE: The instance generated for the node in the current cycle depends on the instances generated for one or more specified nodes in the previous cycle.

  • NONE: No cross-cycle scheduling dependency type is selected for the node.

USER_DEFINE

AutoRerunTimes

integer

The number of automatic reruns that are allowed after an error occurs.

3

AutoRerunIntervalMillis

integer

The interval between automatic reruns after an error occurs. Unit: milliseconds.

This parameter corresponds to the Rerun Interval parameter that is displayed after the Auto Rerun upon Error check box is selected in the Schedule section of the Properties tab in the DataWorks console.

The interval that you specify in the DataWorks console is measured in minutes. Pay attention to the conversion between the units of time when you call the operation.

120000

CronExpress

string

The CRON expression that represents the periodic scheduling policy of the node.

00 05 00 * * ?

InputList

array<object>

The output names of the parent files on which the current file depends.

object

Input

string

The output name of the parent file on which the current file depends.

This parameter corresponds to the Output Name of Ancestor Node parameter under Parent Nodes after Same Cycle is selected in the Dependencies section of the Properties tab in the DataWorks console.

project.001_out

ParseType

string

The mode of the configuration file dependency. Valid values:

  • MANUAL: Scheduling dependencies are manually configured.

  • AUTO: Scheduling dependencies are automatically parsed.

MANUAL

OutputList

array<object>

The output names of the current file.

This parameter corresponds to the Output Name parameter under Output after Same Cycle is selected in the Dependencies section of the Properties tab in the DataWorks console.

object

RefTableName

string

The output table name of the current file.

This parameter corresponds to the Output Table Name parameter under Output after Same Cycle is selected in the Dependencies section of the Properties tab in the DataWorks console.

ods_user_info_d

Output

string

The output name of the current file.

This parameter corresponds to the Output Name parameter under Output after Same Cycle is selected in the Dependencies section of the Properties tab in the DataWorks console.

dw_project.002_out

StartImmediately

boolean

Indicates whether a node is immediately run after the node is deployed to the production environment.

This parameter is valid only for an EMR Spark Streaming node or an EMR Streaming SQL node. This parameter corresponds to the Start Method parameter in the Schedule section of the Configure tab in the DataWorks console.

true

InputParameters

array<object>

Input parameters of the node.

This parameter corresponds to the Input Parameters table in the Input and Output Parameters section of the Properties tab in the DataWorks console.

object

ParameterName

string

The name of the input parameter of the node. In the code, you can use the ${...} method to reference the input parameter of the node.

This parameter corresponds to the Parameter Name parameter in the Input Parameters table in the Input and Output Parameters section of the Properties tab in the DataWorks console.

input

ValueSource

string

The value source of the input parameter of the node.

This parameter corresponds to the Value Source parameter in the Input Parameters table in the Input and Output Parameters section of the Properties tab in the DataWorks console.

project_001.parent_node:outputs

OutputParameters

array<object>

Output parameters of the node.

This parameter corresponds to the Output Parameters table in the Input and Output Parameters section of the Properties tab in the DataWorks console.

object

ParameterName

string

The name of the output parameter of the node.

This parameter corresponds to the Parameter Name parameter in the Output Parameters table in the Input and Output Parameters section of the Properties tab in the DataWorks console.

output

Value

string

The value of the output parameter of the node.

This parameter corresponds to the Value parameter in the Output Parameters table in the Input and Output Parameters section of the Properties tab in the DataWorks console.

${bizdate}

Type

string

The type of the output parameter of the node. Valid values:

  • 1: indicates a constant.

  • 2: indicates a variable.

  • 3: indicates a pass-through variable.

This parameter corresponds to the Type parameter in the Output Parameters table in the Input and Output Parameters section of the Properties tab in the DataWorks console.

1

Description

string

The description of the output parameter of the node.

It's a context output parameter.

ApplyScheduleImmediately

string

Indicates whether scheduling configurations immediately take effect after the deployment.

true

IgnoreParentSkipRunningProperty

string

Indicates whether to skip the dry-run property of the ancestor nodes of the node that corresponds to the file. This parameter corresponds to the Skip the dry-run property of the ancestor node parameter that is displayed after you configure the Depend On parameter in the Dependencies section of the Properties tab in the DataWorks console.

true

Timeout

integer

The timeout period.

1

ImageId

string

The ID of the custom image.

m-bp1h4b5a8ogkbll2f3tr

Contoh

Respons sukses

JSONformat

{
  "HttpStatusCode": 200,
  "ErrorMessage": "The connection does not exist.",
  "RequestId": "0000-ABCD-EFG****",
  "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
  "Success": true,
  "Data": {
    "File": {
      "CommitStatus": 0,
      "AutoParsing": true,
      "Owner": "7775674356****",
      "CreateTime": 1593879116000,
      "FileType": 10,
      "CurrentVersion": 3,
      "BizId": 1000001,
      "LastEditUser": "62465892****",
      "FileName": "ods_user_info_d",
      "ConnectionName": "odps_source",
      "UseType": "NORMAL",
      "FileFolderId": "2735c2****",
      "ParentId": -1,
      "CreateUser": "424732****",
      "IsMaxCompute": true,
      "BusinessId": 1000001,
      "FileDescription": "My first DataWorks file",
      "DeletedStatus": "RECYCLE",
      "LastEditTime": 1593879116000,
      "Content": "SHOW TABLES;",
      "NodeId": 300001,
      "AdvancedSettings": "{\\\"priority\\\":\\\"1\\\",\\\"ENABLE_SPARKSQL_JDBC\\\":false,\\\"FLOW_SKIP_SQL_ANALYZE\\\":false,\\\"queue\\\":\\\"default\\\"}",
      "FileId": 100000001
    },
    "NodeConfiguration": {
      "RerunMode": "ALL_ALLOWED",
      "SchedulerType": "NORMAL",
      "Stop": false,
      "ParaValue": "a=x b=y",
      "StartEffectDate": 936923400000,
      "EndEffectDate": 4155787800000,
      "CycleType": "DAY",
      "DependentNodeIdList": "5,10,15,20",
      "ResourceGroupId": 375827434852437,
      "DependentType": "USER_DEFINE",
      "AutoRerunTimes": 3,
      "AutoRerunIntervalMillis": 120000,
      "CronExpress": "00 05 00 * * ?",
      "InputList": [
        {
          "Input": "project.001_out",
          "ParseType": "MANUAL"
        }
      ],
      "OutputList": [
        {
          "RefTableName": "ods_user_info_d",
          "Output": "dw_project.002_out"
        }
      ],
      "StartImmediately": true,
      "InputParameters": [
        {
          "ParameterName": "input",
          "ValueSource": "project_001.parent_node:outputs"
        }
      ],
      "OutputParameters": [
        {
          "ParameterName": "output",
          "Value": "${bizdate}",
          "Type": "1",
          "Description": "It's a context output parameter."
        }
      ],
      "ApplyScheduleImmediately": "true",
      "IgnoreParentSkipRunningProperty": "true",
      "Timeout": 1,
      "ImageId": "m-bp1h4b5a8ogkbll2f3tr"
    },
    "ResourceDownloadLink": {
      "downloadLink": "http://xx"
    }
  }
}

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.