Queries the most recent five download tasks for SQL queries in an AnalyticDB for MySQL cluster.

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 DescribeDownloadRecords

The operation that you want to perform. Set the value to DescribeDownloadRecords.

DBClusterId String Yes am-****************

The ID of the cluster.

Note You can call the DescribeDBClusters operation to query the detailed information of all AnalyticDB for MySQL clusters within a specific region, including cluster IDs.
RegionId String No cn-hangzhou

The region ID of the cluster.

Note You can call the DescribeRegions operation to query the regions and zones supported by AnalyticDB for MySQL, including region IDs.
Lang String No zh

The languages available for file titles and some error messages. Default value: zh. Valid values:

  • zh: Simplified Chinese
  • en: English
  • ja: Japanese
  • zh-tw: Traditional Chinese

Response parameters

Parameter Type Example Description
Records Array of Items

Details about the download tasks.

Status String finished

The status of the download task.

  • running: The download task is currently in progress.
  • finished: The download task is complete.
  • failed: The download task has failed.
DownloadId Long 69

The ID of the download task.

ExceptionMsg String The query result is empty.

The error message returned when the download task has failed.

Url String https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210805104301-20210805164302.xlsx?Expires=1943514161&OSSAccessKeyId=*********&Signature=******"

The download URL of the file.

FileName String 20210806094635-20210806095135

The name of the downloaded file.

RequestId String 987F51BE-C4CB-332A-B159-63CE87******

The ID of the request.

Examples

Sample requests

http(s)://adb.aliyuncs.com/?Action=DescribeDownloadRecords
&DBClusterId=am-****************
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDownloadRecordsResponse>
    <RequestId>987F51BE-C4CB-332A-B159-63CE87******</RequestId>
    <Records>
        <Status>failed</Status>
        <FileName>20210806094635-20210806095135.xlsx</FileName>
        <ExceptionMsg>The query result is empty.</ExceptionMsg>
        <Url/>
        <DownloadId>73</DownloadId>
    </Records>
    <Records>
        <Status>finished</Status>
        <FileName>20210805104301-20210805164302.xlsx</FileName>
        <ExceptionMsg/>
        <Url>https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210805104301-20210805164302.xlsx?Expires=1943514161&amp;OSSAccessKeyId=*********&amp;Signature=******</Url>
        <DownloadId>72</DownloadId>
    </Records>
    <Records>
        <Status>finished</Status>
        <FileName>20210805104301-20210805164301.xlsx</FileName>
        <ExceptionMsg/>
        <Url>https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210805104301-20210805164301.xlsx?Expires=1943513847&amp;OSSAccessKeyId=*********&amp;Signature=******</Url>
        <DownloadId>71</DownloadId>
    </Records>
    <Records>
        <Status>finished</Status>
        <FileName>20210804234858-20210805114858.xlsx</FileName>
        <ExceptionMsg/>
        <Url>https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210804234858-20210805114858.xlsx?Expires=1943495349&amp;OSSAccessKeyId=*********&amp;Signature=******</Url>
        <DownloadId>70</DownloadId>
    </Records>
    <Records>
        <Status>finished</Status>
        <FileName>20210702180330-20210702180333.xlsx</FileName>
        <ExceptionMsg/>
        <Url>https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210702180330-20210702180333.xlsx?Expires=1941607637&amp;OSSAccessKeyId=*********&amp;Signature=******</Url>
        <DownloadId>69</DownloadId>
    </Records>
</DescribeDownloadRecordsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "987F51BE-C4CB-332A-B159-63CE87******",
  "Records" : [ {
    "Status" : "failed",
    "FileName" : "20210806094635-20210806095135.xlsx",
    "ExceptionMsg" : "The query result is empty.",
    "Url" : "",
    "DownloadId" : 73
  }, {
    "Status" : "finished",
    "FileName" : "20210805104301-20210805164302.xlsx",
    "ExceptionMsg" : "",
    "Url" : "https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210805104301-20210805164302.xlsx?Expires=1943514161&OSSAccessKeyId=*********&Signature=******",
    "DownloadId" : 72
  }, {
    "Status" : "finished",
    "FileName" : "20210805104301-20210805164301.xlsx",
    "ExceptionMsg" : "",
    "Url" : "https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210805104301-20210805164301.xlsx?Expires=1943513847&OSSAccessKeyId=*********&Signature=******",
    "DownloadId" : 71
  }, {
    "Status" : "finished",
    "FileName" : "20210804234858-20210805114858.xlsx",
    "ExceptionMsg" : "",
    "Url" : "https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210804234858-20210805114858.xlsx?Expires=1943495349&OSSAccessKeyId=*********&Signature=******",
    "DownloadId" : 70
  }, {
    "Status" : "finished",
    "FileName" : "20210702180330-20210702180333.xlsx",
    "ExceptionMsg" : "",
    "Url" : "https://perth-download-task.oss-cn-beijing.aliyuncs.com/adbmysql/query-sql-logs/am-**************/20210702180330-20210702180333.xlsx?Expires=1941607637&OSSAccessKeyId=*********&Signature=******",
    "DownloadId" : 69
  } ]
}

Error codes

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