Queries folders.

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 Yes ListFolders

The operation that you want to perform.

PageNumber Integer Yes 1

The number of the page to return.

PageSize Integer Yes 10

The number of entries to return on each page. Default value: 10. Maximum value: 100.

ParentFolderPath String Yes Workflow/1/MaxCompute

The path of the parent folder.

RegionId String Yes cn-zhangjiakou

The region ID. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation.

ProjectId Long No 10000

The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Management page to obtain the ID. You must specify either this parameter or ProjectIdentifier to determine the DataWorks workspace to which the operation is applied.

ProjectIdentifier String No dw_project

The name of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Settings panel to obtain the name. You must specify either this parameter or ProjectId to determine the DataWorks workspace to which the operation is applied.

Response parameters

Parameter Type Example Description
Data Struct

The folders returned.

Folders Array of Folders

The details of the folder.

FolderId String 2735c2****

The ID of the folder.

FolderPath String Workflow/1/MaxCompute/ods

The path of the folder.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries on the returned page.

TotalCount Integer 13

The total number of entries returned.

ErrorCode String Invalid.Tenant.ConnectionNotExists

The error code returned.

ErrorMessage String The connection does not exist.

The error message returned.

HttpStatusCode Integer 200

The HTTP status code returned.

RequestId String 0000-ABCD-EFG****

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

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListFolders
&PageNumber=1
&PageSize=10
&ParentFolderPath=Workflow/1/MaxCompute
&RegionId=cn-zhangjiakou
&<Common request parameters>

Sample success responses

XML format

<RequestId>0000-ABCD-EFG****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>
    <TotalCount>13</TotalCount>
    <PageSize>10</PageSize>
    <PageNumber>1</PageNumber>
    <Folders>
        <FolderPath>Workflow/1/MaxCompute/ods</FolderPath>
        <FolderId>2735c2****</FolderId>
    </Folders>
</Data>
<ErrorCode>Invalid.Tenant.ConnectionNotExists</ErrorCode>
<ErrorMessage>The connection does not exist.</ErrorMessage>
<Success>true</Success>

JSON format

{
    "RequestId": "0000-ABCD-EFG****",
    "HttpStatusCode": 200,
    "Data": {
        "TotalCount": 13,
        "PageSize": 10,
        "PageNumber": 1,
        "Folders": {
            "FolderPath": "Workflow/1/MaxCompute/ods",
            "FolderId": "2735c2****"
        }
    },
    "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
    "ErrorMessage": "The connection does not exist.",
    "Success": true
}

Error codes

HTTP status code Error code Error message Description
500 InternalError.System An internal system error occurred. Try again later. The error message returned because an internal error has occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. The error message returned because an internal error has occurred. Try again later.
429 Throttling.Api The request for this resource has exceeded your available limit. The error message returned because the number of requests for the resource has exceeded the upper limit.
429 Throttling.System The DataWorks system is busy. Try again later. The error message returned because the DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later. The error message returned because excessive requests have been submitted within a short period of time. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. The error message returned because you are not allowed to perform this operation. Activate DataWorks Enterprise Edition or Ultimate Edition.

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