All Products
Search
Document Center

DataWorks:ListResources

Last Updated:Dec 12, 2024

Queries a list of file resources in DataStudio. You can also specify filter conditions to query specific file resources.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectIdstringYes

The DataWorks workspace ID. You can log on to the DataWorks console and go to the Workspace page to query the ID.

You must configure this parameter to specify the DataWorks workspace to which the API operation is applied.

10002
OwnerstringNo

The ID of the Alibaba Cloud account used by the workspace administrator. You can log on to the Alibaba Cloud Management Console and view the ID on the Security Settings page.

110755000425XXXX
TypestringNo

The resource type. This parameter specifies a filter condition.

Valid values:

  • Python
  • Jar
  • Archive
  • File
python
PageNumberintegerNo

The page number.

1
PageSizeintegerNo

The number of entries per page. Default value: 10. Maximum value: 100.

10

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

99EBE7CF-69C0-5089-BE3E-79563C31XXXX
PagingInfoobject

The pagination information.

TotalCountinteger

The total number of entries returned.

131
PageSizeinteger

The number of entries per page.

10
PageNumberinteger

The page number.

1
Resourcesarray<object>

The file resources.

resourceobject

The information about the file resource.

Idstring

The ID of the file resource.

631478864897630XXXX
Namestring

The name of the file resource.

math.py
ProjectIdstring

The DataWorks workspace ID. You can log on to the DataWorks console and go to the Workspace page to query the ID.

344247
Ownerstring

The owner of the file resource.

110755000425XXXX
CreateTimelong

The time when the file resource was created. This value is a UNIX timestamp.

1724505917000
ModifyTimelong

The times when the file resource was last modified. This value is a UNIX timestamp.

1724505917000
DataSourceobject

The information about the data source.

Namestring

The name of the data source.

odps_first
Typestring

The type of the data source.

odps
Scriptobject

The script information.

Pathstring

The script path.

root/demo
Runtimeobject

The runtime.

Commandstring

The command used to distinguish file resource types.

ODPS_PYTHON
Idstring

The script ID.

123348864897630XXXX
Typestring

The type of the file resource.

Valid values:

  • Python
  • Jar
  • Archive
  • File
jar
SourceTypestring

The storage type of the source of the file resource.

Valid values:

  • Local
  • Oss
local
SourcePathstring

The path of the source of the file resource. If the SourecType parameter is set to Local, this parameter is left empty.

XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py
TargetTypestring

The storage type of the destination of the file resource.

Valid values:

  • Gateway
  • Oss
  • Hdfs
oss
TargetPathstring

The storage path of the destination of the file resource.

XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py

Examples

Sample success responses

JSONformat

{
  "RequestId": "99EBE7CF-69C0-5089-BE3E-79563C31XXXX",
  "PagingInfo": {
    "TotalCount": 131,
    "PageSize": 10,
    "PageNumber": 1,
    "Resources": [
      {
        "Id": "631478864897630XXXX",
        "Name": "math.py",
        "ProjectId": "344247",
        "Owner": "110755000425XXXX",
        "CreateTime": 1724505917000,
        "ModifyTime": 1724505917000,
        "DataSource": {
          "Name": "odps_first",
          "Type": "odps"
        },
        "Script": {
          "Path": "root/demo",
          "Runtime": {
            "Command": "ODPS_PYTHON"
          },
          "Id": "123348864897630XXXX"
        },
        "Type": "jar",
        "SourceType": "local",
        "SourcePath": "XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py",
        "TargetType": "oss",
        "TargetPath": "XXX/unknown/ide/1/XXX/20240820200851_963a9da676de44ef8d06a6576a8c4d6a.py"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history