Queries cache analytics reports of an ApsaraDB for Redis instance.

Note Alibaba Cloud has optimized the cache analytics feature of ApsaraDB for Redis. This API operation is phased out. The new API operation for cache analysis is available. For more information, see The API operation for cache analysis of ApsaraDB for Redis phased out.

Before you call this operation, make sure that the following requirements are met:

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 DescribeCacheAnalysisReportList

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

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance.

RegionId String No cn-hangzhou

The ID of the region where the instance is deployed.

Days Integer No 7

Specifies the number of the past days for which you want to query cache analytics results. Default value: 7.

Note If either automatic analysis or manual analysis is performed on the day when you query analysis reports, no record is returned for this day.
PageSize Integer No 30

The number of entries to return on each page. Valid values: 30, 50, and 100.

Note Default value: 30.
PageNumbers Integer No 1

The number of the page to return.

NodeId String No r-bp1zxszhcgatnx****-db-0

The ID of the node in the ApsaraDB for Redis cluster.

Note If you do not set this parameter, the analysis reports of all nodes in the cluster will be returned.

Response parameters

Parameter Type Example Description
InstanceId String 1041xxxx

The ID of the instance.

RequestId String 743D0A03-52DE-4E6F-8D09-EC1414CF****

The ID of the request.

DailyTasks Array of DailyTask

The cache analysis reports that are returned.

DailyTask
Date String 2019-08-01Z

The date on which the cache analysis tasks is initiated.

Tasks Array of Task

The detailed information about the cache analysis tasks.

Task
NodeId String r-bp1zxszhcgatnx****-db-0

The ID of the node in the ApsaraDB for Redis cluster.

StartTime String 2019-08-01T19:08:49Z

The time when the cache analysis task is initiated.

Status String success

The status of cache analysis tasks. Valid values:

  • success: The cache analysis task is successful.
  • running: The cache analysis task is running
TaskId String 156465****

The ID of the task.

Examples

Sample requests

https://r-kvstore.aliyuncs.com?Action=DescribeCacheAnalysisReportList
&InstanceId=r-bp1zxszhcgatnx****
&<Common request parameters>

Sample success responses

XML format

<DescribeCacheAnalysisReportListResponse>
      <InstanceId>1041xxxx</InstanceId>
      <RequestId>BFB9478A-119E-4589-B02C-2D2EBE5E****</RequestId>
      <DailyTasks>
            <DailyTask>
                  <Date>2019-08-03Z</Date>
                  <Tasks>
                        <Task>
                              <Status>success</Status>
                              <NodeId>r-bp1zxszhcgatnx****-db-0</NodeId>
                              <StartTime>2019-08-03T19:08:48Z</StartTime>
                              <TaskId>156483****</TaskId>
                        </Task>
                        <Task>
                              <Status>success</Status>
                              <NodeId>r-bp1zxszhcgatnx****-db-1</NodeId>
                              <StartTime>2019-08-03T19:08:49Z</StartTime>
                              <TaskId>156483****</TaskId>
                        </Task>
                  </Tasks>
            </DailyTask>
            <DailyTask>
                  <Date>2019-08-02Z</Date>
                  <Tasks>
                        <Task>
                              <Status>success</Status>
                              <NodeId>r-bp1zxszhcgatnx****-db-0</NodeId>
                              <StartTime>2019-08-02T19:08:55Z</StartTime>
                              <TaskId>156474****</TaskId>
                        </Task>
                        <Task>
                              <Status>success</Status>
                              <NodeId>r-bp1zxszhcgatnx****-db-1</NodeId>
                              <StartTime>2019-08-02T19:08:55Z</StartTime>
                              <TaskId>156474****</TaskId>
                        </Task>
                  </Tasks>
            </DailyTask>
      </DailyTasks>
</DescribeCacheAnalysisReportListResponse>

JSON format

{
	"InstanceId": "1041xxxx",
	"RequestId": "BFB9478A-119E-4589-B02C-2D2EBE5E****",
	"DailyTasks": {
		"DailyTask": [
			{
				"Date": "2019-08-03Z",
				"Tasks": {
					"Task": [
						{
							"Status": "success",
							"NodeId": "r-bp1zxszhcgatnx****-db-0",
							"StartTime": "2019-08-03T19:08:48Z",
							"TaskId": "156483****"
						},
						{
							"Status": "success",
							"NodeId": "r-bp1zxszhcgatnx****-db-1",
							"StartTime": "2019-08-03T19:08:49Z",
							"TaskId": "156483****"
						}
					]
				}
			},
			{
				"Date": "2019-08-02Z",
				"Tasks": {
					"Task": [
						{
							"Status": "success",
							"NodeId": "r-bp1zxszhcgatnx****-db-0",
							"StartTime": "2019-08-02T19:08:55Z",
							"TaskId": "156474****"
						},
						{
							"Status": "success",
							"NodeId": "r-bp1zxszhcgatnx****-db-1",
							"StartTime": "2019-08-02T19:08:55Z",
							"TaskId": "156474****"
						}
					]
				}
			}						
		]
	}
}

Error codes

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