All Products
Search
Document Center

Tair (Redis® OSS-Compatible):DescribeHistoryTasks

Last Updated:Aug 28, 2026

Queries tasks in the task center.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

kvstore:DescribeHistoryTasks

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID. Call the DescribeRegions operation to query the most recent region list.

cn-beijing

PageSize

integer

No

The number of entries per page. Valid values: 10 to 100. Default value: 10.

10

PageNumber

integer

No

The page number. Pages start from page 1. Default value: 1.

1

InstanceType

string

No

Set the value to Instance.

Instance

Status

string

No

The task status. Valid values:

  • Scheduled

  • Running

  • Succeed

  • Failed

  • Cancelling

  • Canceled

  • Waiting

Note

Empty by default, which queries tasks in all states. Separate multiple states with commas (,).

Scheduled

InstanceId

string

No

The instance ID. Empty by default. Separate multiple instance IDs with commas (,). You can specify up to 30 instance IDs.

r-uf62br2491p5l****

TaskId

string

No

The task ID. Empty by default. Separate multiple task IDs with commas (,). You can specify up to 30 task IDs.

t-83br18hloy3faf****

TaskType

string

No

The task type. Empty by default, which queries all task types.

  • ModifyInsSpec

  • DeleteInsNode

  • AddInsNode

  • HaSwitch

  • RestartIns

  • CreateIns

  • ModifyInsConfig

Note

Separate multiple task types with commas (,).

ModifyInsSpec

FromStartTime

string

Yes

The start of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. The start time can be up to 30 days earlier than the current time.

2022-01-02T11:31:03Z

ToStartTime

string

Yes

The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Only tasks with a start time earlier than or equal to this value are returned.

2022-02-02T11:31:03Z

FromExecTime

integer

No

The minimum execution duration. Filters tasks whose execution duration exceeds this value. Unit: seconds. Default value: 0, which indicates no limit.

0

ToExecTime

integer

No

The maximum execution duration. Filters tasks whose execution duration is shorter than or equal to this value. Unit: seconds. Default value: 0, which indicates no limit.

0

Response elements

Element

Type

Description

Example

object

PageNumber

integer

The page number of the returned page.

1

RequestId

string

The request ID.

5D622714-AEDD-4609-9167-F5DDD3D1****

PageSize

integer

The maximum number of entries returned per page.

10

TotalCount

integer

The total number of tasks that match the filter criteria, regardless of pagination.

5

Items

array<object>

The task objects.

object

Status

string

The task status.

  • Scheduled

  • Running

  • Succeed

  • Failed

  • Cancelling

  • Canceled

  • Waiting

Running

TaskId

string

The task ID.

t-83br18hloy3faf****

CurrentStepName

string

The name of the current step. Empty if the task has not started.

exec_task

StartTime

string

The start time of the task, in the yyyy-MM-ddTHH:mm:ssZ format (UTC, ISO 8601).

2022-02-03T11:31:03Z

EndTime

string

The end time of the task, in the yyyy-MM-ddTHH:mm:ssZ format (UTC, ISO 8601).

2022-02-03T12:06:17Z

TaskType

string

The task type.

  • ModifyInsSpec

  • DeleteInsNode

  • AddInsNode

  • HaSwitch

  • RestartIns

  • CreateIns

  • ModifyInsConfig

ModifyInsSpec

RemainTime

integer

The estimated remaining time to complete the task. Unit: seconds. A value of 0 indicates the task is completed.

1000

Progress

number

The task progress. Valid values: 0 to 100.

79.0

RegionId

string

The region ID.

cn-shanghai

InstanceType

string

The instance type. The value is always Instance.

Instance

InstanceId

string

The instance ID.

r-bp1zxszhcgatnx****

InstanceName

string

The instance name.

dba-tair-test-qcloud

DbType

string

The database type. The value is always redis.

redis

Product

string

The product. The value is always kvstore.

kvstore

TaskDetail

string

The task details. Details vary by task type.

{\"callerUid\":\"test\"}

ReasonCode

string

The reason the task was initiated.

小版本升级

ActionInfo

string

The allowed actions for the task. The system matches the current step name and task status against the actions in ActionInfo. If no match is found, the task does not support any action in its current state. Example:

{"steps": [
    {
      "step_name": "exec_task", // The name of the step, which matches CurrentStepName.
      "action_info": {    // The actions supported for this step.
        "Waiting": [      // The status, which matches Status.
          "modifySwitchTime" // The action. Multiple actions are supported.
        ]
      }
    },
    {
      "step_name": "init_task", // The name of the step.
      "action_info": {    // The actions supported for this step.
        "Running": [      // The status.
          "cancel",       // The action.
          "pause"
        ]
      }
    }
  ]
}

Supported actions:

  • retry

  • cancel

  • modifySwitchTime: changes the switching or restoration time.

{"steps":[{"action_info":{"Waiting":["modifySwitchTime"]},"step_name":"exec_task"}]}

Uid

string

The ID of the resource owner.

141345906006****

CallerSource

string

The ID of the user who made the request. If CallerSource is set to User, CallerUid indicates the unique ID (UID) of the user.

141345906006****

CallerUid

string

The request source. Valid values:

  • System

  • User

User

Examples

Success response

JSON format

{
  "PageNumber": 1,
  "RequestId": "5D622714-AEDD-4609-9167-F5DDD3D1****",
  "PageSize": 10,
  "TotalCount": 5,
  "Items": [
    {
      "Status": "Running",
      "TaskId": "t-83br18hloy3faf****",
      "CurrentStepName": "exec_task",
      "StartTime": "2022-02-03T11:31:03Z",
      "EndTime": "2022-02-03T12:06:17Z",
      "TaskType": "ModifyInsSpec",
      "RemainTime": 1000,
      "Progress": 79,
      "RegionId": "cn-shanghai",
      "InstanceType": "Instance",
      "InstanceId": "r-bp1zxszhcgatnx****",
      "InstanceName": "dba-tair-test-qcloud",
      "DbType": "redis",
      "Product": "kvstore",
      "TaskDetail": "{\\\"callerUid\\\":\\\"test\\\"}",
      "ReasonCode": "小版本升级",
      "ActionInfo": "{\"steps\":[{\"action_info\":{\"Waiting\":[\"modifySwitchTime\"]},\"step_name\":\"exec_task\"}]}",
      "Uid": "141345906006****",
      "CallerSource": "141345906006****",
      "CallerUid": "User"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 Param.Invalid Param invalid
400 Param.Invalid.TimeEndBeforeStart Param invalid. End time before start time

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.