Call GetFile to obtain the object details.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Required GetFile

The operation that you want to perform.

ProjectId Long Yes 10000

Dataworks workspace ID and click the workspace manage icon in the upper-right corner to view the workspace information.

RegionId String Required cn-zhangjiakou

The list of regions where the services are located.

ProjectIdentifier String No dw_project

Dataworks unique identifier of the workspace, that is, the name of the workspace at the top of the data Development page.

You must specify either this parameter or the ProjectId parameter to determine the Dataworks workspace for the current API call.

FileId Long No 100000001

The ID of the object. You can call ListFiles to query the object ID.

Response parameters

Parameter Type Example Description
Data Struct

The details of the file.

File Struct

The basic information about the file.

BizId Long 1000001

The ID of the workflow to which the file belongs.

CommitStatus Integer 0

Indicates the current submission status of the object. Valid values: 0 (the latest code is not submitted) and 1 (the latest code is submitted).

ConnectionName String odps_first

The engine instance ID of the task for the file.

Content String SHOW TABLES;

The code of the file.

CreateTime Long 1593879116000

The millisecond timestamp when the object was created.

CreateUser String 424732****

The Alibaba Cloud User ID of the document creator.

CurrentVersion Integer 3

The latest submitted version number of the file.

FileDescription String My first Dataworks file

Description of the file.

FileFolderId String 2735c2****

The ID of the folder to which the file belongs.

FileName String ods_user_info_d

The name of the file.

FileType Integer 10

The code type of the file. Common code types include 6(Shell), 10(ODPS SQL), 11(ODPS MR), 23 (data integration), 24(ODPS Script), 99 (virtual node), 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), cross-tenant collaboration node ID: 1089, 1091, 1093,, or 1221, which is PyODPS 3.

IsMaxCompute Boolean true

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

LastEditTime Long 1593879116000

The millisecond timestamp when the file was last edited.

LastEditUser String 62465892****

The ID of the Alibaba Cloud user who edited the file last.

NodeId Long 300001

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

Owner String 7775674356****

The Alibaba Cloud User ID of the owner of the file.

ParentId Long -1

If the current file is an internal file of a composite node file, This field identifies the ID of the corresponding composite node file.

UseType String 0

A file type has three functional modules: 0 (data analytics), 1 (one-time task), 2 (one-time workflow), 3 (dry-run scheduling), 10 (ad-hoc query), and 30 (Component Management).

NodeConfiguration Struct

Schedule configuration for the file.

AutoRerunIntervalMillis Integer 120000

The automatic rerunning interval of the error. Unit: milliseconds. On the Select Properties page, choose schedule configuration> time properties. Then, click the error Details tab and select the automatically rerun interval. The unit of time on the page is minutes, please pay attention to the conversion time when calling.

AutoRerunTimes Integer 3

The number of automatic rerunning errors.

CronExpress String 00 05 00 * * ?

The cron expression used for the scheduled file scheduling.

CycleType String DAY

The scheduling cycle type, including NOT_DAY (minute, hour) and DAY (DAY, week, month), according to the scheduling configuration> time Property> scheduling cycle on the page.

DependentNodeIdList String 5,10,15,20

When the DependentType parameter is set to USER_DEFINE, you can specify task IDs and separate them with commas (,). On the page, choose Properties> depend on previous cycle> custom in the schedule section.

DependentType String USER_DEFINE

Select a cross-cycle dependency, including NONE (deselect cross-cycle dependency), SELF, CHILD, and USER_DEFINE (custom).

EndEffectDate Long 4155787800000

The millisecond timestamp that indicates when auto scheduling is stopped. The timestamp corresponds to the timestamp when scheduling configuration> time attribute> Effective Time> end time on the properties page.

InputList Array of NodeInputOutput

The output of the file according to the parent node output name.

Input String project.001_out

The output of the file.

OutputList Array of NodeInputOutput

The output of the current file, which corresponds to scheduling configuration> scheduling dependency> Output name of the current node on the page.

Output String dw_project.002_out

The output of the configuration file. For example, choose Properties> dependencies in the left-side navigation pane, and then click the output name column of the current node.

RefTableName String ods_user_info_d

The output of the configuration file. For example, choose Properties> dependencies in the left-side navigation pane, and then click the output of the current node in the left-side navigation pane.

ParaValue String a=x b=y

Scheduling parameter. On the page that appears, choose scheduling configuration> basic configuration> parameters.

RerunMode String ALL_ALLOWED

The rerun attributes, including ALL_ALLOWED (which can be rerun after a successful or failed run), FAILURE_ALLOWED (which cannot be rerun after a successful run, and can be rerun after a failed run), and ALL_DENIED (which cannot be rerun after a successful or failed run). On the Select Properties page, choose Properties> dashboard.

StartEffectDate Long 936923400000

The millisecond timestamp when auto scheduling starts. The timestamp is the timestamp that corresponds to the rule setting, time attribute, effective time, and start time on the scheduling page.

Stop Boolean false

Specifies whether to disable scheduling. In the top navigation bar, choose scheduling configuration> scheduling time> disable scheduling.

ErrorCode String 0

The error code.

ErrorMessage String Success

The returned message.

HttpStatusCode Integer 200

The HTTP status code.

RequestId String 0000-ABCD-EFG****

The unique ID of the call. You can use the error ID to troubleshoot the error.

Success Boolean true

Indicates whether the call is successful.

Examples

Sample requests

http(s)://[Endpoint]/? Action=GetFile
&ProjectId=10000
&RegionId=cn-zhangjiakou
&<Common request parameters>

Sample success responses

XML format

<RequestId>0000-ABCD-EFG****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>
    <File>
        <Owner>7775674356****</Owner>
        <TaskRerunIntervalMillis>120000</TaskRerunIntervalMillis>
        <CycleType>DAY</CycleType>
        <InputList>
            <Input>project.001_out</Input>
        </InputList>
        <InputList>
            <Output>dw_project.002_out</Output>
            <RefTableName>ods_user_info_d</RefTableName>
        </InputList>
        <Stop>false</Stop>
        <FileName>ods_user_info_d</FileName>
        <CurrentVersion>3</CurrentVersion>
        <IsMaxCompute>true</IsMaxCompute>
        <CronExpress>00 05 00 * * ? </CronExpress>
        <ConnectionName>odps_first</ConnectionName>
        <StartEffectDate>936923400000</StartEffectDate>
        <CommitStatus>0</CommitStatus>
        <FileFolderId>2735c2c19d58</FileFolderId>
        <ParentId>-1</ParentId>
        <TaskRerunTime>3</TaskRerunTime>
        <CreateTime>1593879116000</CreateTime>
        <UseType>0</UseType>
        <DependentType>USER_DEFINE</DependentType>
        <CreateUser>424732742562</CreateUser>
        <LastEditTime>1593879116000</LastEditTime>
        <EndEffectDate>4155787800000</EndEffectDate>
        <FileDescription> my first Dataworks file </FileDescription>
        <DependentNodeIdList>5,10,15,20</DependentNodeIdList>
        <FileType>10</FileType>
        <Content>SHOW TABLES;</Content>
        <LastEditUser>624658926432862</LastEditUser>
        <NodeId>300001</NodeId>
        <RerunMode>ALL_ALLOWED</RerunMode>
        <ParaValue>a=x b=y</ParaValue>
        <BizId>1000001</BizId>
        <OutputList>
            <Input>project.001_out</Input>
        </OutputList>
        <OutputList>
            <Output>dw_project.002_out</Output>
            <RefTableName>ods_user_info_d</RefTableName>
        </OutputList>
    </File>
    <NodeConfiguration>
        <Owner>7775674356****</Owner>
        <TaskRerunIntervalMillis>120000</TaskRerunIntervalMillis>
        <CycleType>DAY</CycleType>
        <InputList>
            <Input>project.001_out</Input>
        </InputList>
        <InputList>
            <Output>dw_project.002_out</Output>
            <RefTableName>ods_user_info_d</RefTableName>
        </InputList>
        <Stop>false</Stop>
        <FileName>ods_user_info_d</FileName>
        <CurrentVersion>3</CurrentVersion>
        <IsMaxCompute>true</IsMaxCompute>
        <CronExpress>00 05 00 * * ? </CronExpress>
        <ConnectionName>odps_first</ConnectionName>
        <StartEffectDate>936923400000</StartEffectDate>
        <CommitStatus>0</CommitStatus>
        <FileFolderId>2735c2c19d58</FileFolderId>
        <ParentId>-1</ParentId>
        <TaskRerunTime>3</TaskRerunTime>
        <CreateTime>1593879116000</CreateTime>
        <UseType>0</UseType>
        <DependentType>USER_DEFINE</DependentType>
        <CreateUser>424732742562</CreateUser>
        <LastEditTime>1593879116000</LastEditTime>
        <EndEffectDate>4155787800000</EndEffectDate>
        <FileDescription> my first Dataworks file </FileDescription>
        <DependentNodeIdList>5,10,15,20</DependentNodeIdList>
        <FileType>10</FileType>
        <Content>SHOW TABLES;</Content>
        <LastEditUser>624658926432862</LastEditUser>
        <NodeId>300001</NodeId>
        <RerunMode>ALL_ALLOWED</RerunMode>
        <ParaValue>a=x b=y</ParaValue>
        <BizId>1000001</BizId>
        <OutputList>
            <Input>project.001_out</Input>
        </OutputList>
        <OutputList>
            <Output>dw_project.002_out</Output>
            <RefTableName>ods_user_info_d</RefTableName>
        </OutputList>
    </NodeConfiguration>
</Data>
<ErrorCode>0</ErrorCode>
<ErrorMessage>Success</ErrorMessage>
<Success>true</Success>

JSON format

{
    "RequestId": "0000-ABCD-EFG****",
    "HttpStatusCode": 200,
    "Data": {
        "File": {
            "Owner": "7775674356****",
            "TaskRerunIntervalMillis": 120000,
            "CycleType": "DAY",
            "InputList": [
                {
                    "Input": "project.001_out"
                },
                {
                    "Output": "dw_project.002_out",
                    "RefTableName": "ods_user_info_d"
                }
            ],
            "Stop": false,
            "FileName": "ods_user_info_d",
            "CurrentVersion": 3,
            "IsMaxCompute": true,
            "CronExpress": "00 05 00 * * ?",
            "ConnectionName": "odps_first",
            "StartEffectDate": 936923400000,
            "CommitStatus": 0,
            "FileFolderId": "2735c2c19d58",
            "ParentId": -1,
            "TaskRerunTime": 3,
            "CreateTime": 1593879116000,
            "UseType": 0,
            "DependentType": "USER_DEFINE",
            "CreateUser": 424732742562,
            "LastEditTime": 1593879116000,
            "EndEffectDate": 4155787800000,
            "FileDescription": "My first Dataworks file",
            "DependentNodeIdList": "5,10,15,20",
            "FileType": 10,
            "Content": "SHOW TABLES;",
            "LastEditUser": 624658926432862,
            "NodeId": 300001,
            "RerunMode": "ALL_ALLOWED",
            "ParaValue": "a=x b=y",
            "BizId": 1000001,
            "OutputList": [
                {
                    "Input": "project.001_out"
                },
                {
                    "Output": "dw_project.002_out",
                    "RefTableName": "ods_user_info_d"
                }
            ]
        },
        "NodeConfiguration": {
            "Owner": "7775674356****",
            "TaskRerunIntervalMillis": 120000,
            "CycleType": "DAY",
            "InputList": [
                {
                    "Input": "project.001_out"
                },
                {
                    "Output": "dw_project.002_out",
                    "RefTableName": "ods_user_info_d"
                }
            ],
            "Stop": false,
            "FileName": "ods_user_info_d",
            "CurrentVersion": 3,
            "IsMaxCompute": true,
            "CronExpress": "00 05 00 * * ?",
            "ConnectionName": "odps_first",
            "StartEffectDate": 936923400000,
            "CommitStatus": 0,
            "FileFolderId": "2735c2c19d58",
            "ParentId": -1,
            "TaskRerunTime": 3,
            "CreateTime": 1593879116000,
            "UseType": 0,
            "DependentType": "USER_DEFINE",
            "CreateUser": 424732742562,
            "LastEditTime": 1593879116000,
            "EndEffectDate": 4155787800000,
            "FileDescription": "My first Dataworks file",
            "DependentNodeIdList": "5,10,15,20",
            "FileType": 10,
            "Content": "SHOW TABLES;",
            "LastEditUser": 624658926432862,
            "NodeId": 300001,
            "RerunMode": "ALL_ALLOWED",
            "ParaValue": "a=x b=y",
            "BizId": 1000001,
            "OutputList": [
                {
                    "Input": "project.001_out"
                },
                {
                    "Output": "dw_project.002_out",
                    "RefTableName": "ods_user_info_d"
                }
            ]
        }
    },
    "ErrorCode": 0,
    "ErrorMessage": "Success",
    "Success": true
}

Error code

HttpCode Error code Error message Description
403 Forbidden.Access Access is forbidden. Activate DataWorks first. Your access is restricted, possibly because you have not activated DataWorks.
500 InternalError.System An internal system error occurred. Try again later. An internal system error occurred. Please try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. An internal system error occurred. Please try again later.
403 ResourceNotAuthorized.Api You are not authorized to access the resources. You cannot access resources without authorization.
429 Throttling.Api The request for this resource has exceeded your available limit. The request for the resource exceeds your available upper limit.
429 Throttling.System The DataWorks system is busy. Try again later. DataWorks the system is busy, please try again later.
429 Throttling.User Your request is too frequent. Try again later. Your request is too frequent, please try to slow down the request speed.

For a list of error codes, visit the API Error Center.