调用DescribeDiagnosticReportList接口,查询诊断报告。

使用该接口需满足以下前提条件:

  • 使用阿里云或DAS的SDK时,建议使用最新版本。
  • 在调用DAS服务时,需要将地域指定为cn-shanghai。
  • 本接口适用的数据库引擎为:
    • RDS MySQL
    • PolarDB MySQL版
    • Redis

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeDiagnosticReportList

系统规定参数。取值:DescribeDiagnosticReportList

DBInstanceId String rm-2ze8g2am97624****

实例ID。

PageNo String 1

页码,取值大于0且不超过Integer数据类型的最大值,默认值为1。

PageSize String 10

每页最大记录数,默认值为10。

StartTime String 1668398892000

查询任务开始时间,格式为Unix时间戳(UTC时间),单位为毫秒。

EndTime String 1668420492000

查询任务结束时间,格式为Unix时间戳,单位为毫秒。

说明 查询任务结束时间需晚于查询任务开始时间。

返回数据

名称 类型 示例值 描述
RequestId String D00DB161-FEF6-5428-B37A-8D29A4C2****

请求ID。

Message String Successful

请求返回消息。

说明 请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。
Synchro String None

备用参数。

Data String { "total": 1, "list": [ { "score": 100, "diagnosticTime": "2022-11-14T08:17:00Z", "startTime": "2022-11-14T07:16:59Z", "endTime": "2022-11-14T08:16:59Z" } ] }

返回的数据:

  • total:数据量。
  • score:诊断分数。
  • diagnosticTime:诊断生成时间(UTC 时间)。
  • startTime:查询开始时间(UTC 时间)。
  • endTime:查询结束时间(UTC 时间)。
Code String 200

返回的状态码。

Success String true

请求是否执行成功:

  • true:执行成功。
  • false:执行失败。

示例

请求示例

http(s)://das.cn-shanghai.aliyuncs.com/?Action=DescribeDiagnosticReportList
&DBInstanceId=rm-2ze8g2am97624****
&PageNo=1
&PageSize=10
&StartTime=1668398892000
&EndTime=1668420492000
&公共请求参数

正常返回示例

XML格式

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

<DescribeDiagnosticReportListResponse>
    <RequestId>D00DB161-FEF6-5428-B37A-8D29A4C2****</RequestId>
    <Message>Successful</Message>
    <Data>
        <total>1</total>
        <list>
            <score>100</score>
            <diagnosticTime>2022-11-14T08:17:00Z</diagnosticTime>
            <startTime>2022-11-14T07:16:59Z</startTime>
            <endTime>2022-11-14T08:16:59Z</endTime>
        </list>
    </Data>
    <Code>200</Code>
    <Success>true</Success>
</DescribeDiagnosticReportListResponse>

JSON格式

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

{
  "RequestId" : "D00DB161-FEF6-5428-B37A-8D29A4C2****",
  "Message" : "Successful",
  "Data" : {
    "total" : 1,
    "list" : [ {
      "score" : 100,
      "diagnosticTime" : "2022-11-14T08:17:00Z",
      "startTime" : "2022-11-14T07:16:59Z",
      "endTime" : "2022-11-14T08:16:59Z"
    } ]
  },
  "Code" : 200,
  "Success" : true
}

错误码

HttpCode 错误码 错误信息 描述
400 InvalidParams The request parameters are invalid. 请求参数错误

访问错误中心查看更多错误码。