All Products
Search
Document Center

Cloud Control API:GetTask

Last Updated:Aug 27, 2026

Queries the details of a specified asynchronous task.

Operation description

GET /api/v1/tasks/{taskId}.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET /api/v1/tasks/{taskId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

taskId

string

Yes

The ID of the task.

task-433aead756057fff8189a7ce5****

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

The response body.

requestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

task

object

The task details.

createTime

string

The time when the task was created.

2022-10-09T00:46:03Z

error

object

The error details, returned if the task failed.

code

string

The error code.

OperationFailure.OperationFailed

message

string

The error message.

{ "requestId": "123****", "errorCode": "InvalidRamUser.NoPermission", "errorMsg": "Ram user is not authorized to perform the operation." }

product

string

The service code.

ECS

regionId

string

The region ID.

cn-beijing

resourceId

string

The resource ID.

i-8vbascjthm7kzhp3****

resourcePath

string

The resource path, which specifies the complete resource location (parent resource/child resource).

Instance/i-8vbascjthm7kzhp3**** Instance/r-8vbf5abe31c9c4d4/Account/cctest

resourceType

string

The resource type.

Instance

status

string

The task status.

Pending

Running

Succeeded

Failed

Cancelling

Cancelled.

Valid values:

  • Succeeded :

    Succeeded

  • Failed :

    Failed

  • Running :

    Running

  • Cancelled :

    Cancelled

  • Pending :

    Pending

  • Cancelling :

    Cancelling

Succeeded

taskAction

string

The task operation type. Valid values: Create, Update, and Delete.

Valid values:

  • Delete :

    Delete

  • Create :

    Create

  • Update :

    Update

Create

taskId

string

The task ID.

task-433aead756057fff8189a7ce5****

Examples

Success response

JSON format

{
  "requestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "task": {
    "createTime": "2022-10-09T00:46:03Z",
    "error": {
      "code": "OperationFailure.OperationFailed",
      "message": "{\n     \"requestId\": \"123****\",\n     \"errorCode\": \"InvalidRamUser.NoPermission\",\n     \"errorMsg\": \"Ram user is not authorized to perform the operation.\"\n}"
    },
    "product": "ECS",
    "regionId": "cn-beijing",
    "resourceId": "i-8vbascjthm7kzhp3****\n",
    "resourcePath": "Instance/i-8vbascjthm7kzhp3****\nInstance/r-8vbf5abe31c9c4d4/Account/cctest",
    "resourceType": "Instance",
    "status": "Succeeded",
    "taskAction": "Create",
    "taskId": "task-433aead756057fff8189a7ce5****"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.