Updated on 2026-07-24 GMT+08:00

Querying Details About an Upgrade Task

Function

Queries details about an upgrade task by task ID.

  • The information includes the scheduled configuration, execution policy, grayscale configuration, and application objects.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    workspace:upgradeTask:get

    Read

    -

    -

    -

    -

URI

GET /v2/{project_id}/upgrade-task/{task_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

task_id

Yes

String

Task ID.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

id

String

Task ID.

project_id

String

ID

task_name

String

Task name.

task_type

Integer

Task type. The value can be 0 (cloud desktop), 1 (application server), or 2 (image).

scheduled_type

String

Execution period type. The value can be FIXED_TIME (specified time), DAY (by day), WEEK (by week), or MONTH (by month).

timezone

String

Time zone.

week_list

String

If the period is by week, the value ranges from 1 to 7. Multiple values are separated by commas (,), for example, 1,2,7.

month_list

String

If the period is by month, the value ranges from 1 to 12, separated by commas (,).

date_list

String

If the period is by month, the value ranges from 1 to 31 and can be L (indicating the last day of the current month).

day_interval

Integer

Number of days to skip.

scheduled_date

String

If the period is by specified time, the value indicates the specified date.

scheduled_time

String

Specified execution time.

cron_expression

String

Cron expression.

last_execute_status

String

Latest execution status. The value can be SUCCESS, FAILED, RUNNING, or WAITING.

last_execute_time

String

Last execution time.

next_execute_time

String

Next execution time.

is_enable

Integer

Enabling status. The value can be 0 (disabled) or 1 (enabled).

is_force_execute

Integer

Whether to forcibly upgrade the version. The value can be 0 (no) or 1 (yes).

min_version

String

Upgrade is required if the version is earlier than this version.

target_version

String

Target version.

expire_enable

Integer

Whether to enable the expiration time. The value can be 0 (no) or 1 (yes).

expire_time

String

Expiration time.

is_notify

Integer

Whether to send a notification. The value can be 0 (no) or 1 (yes).

extra_params

String

Extended parameter (in JSON format).

execute_strategy

Integer

Execution policy. The value can be 0 (full delivery) or 1 (grayscale delivery).

grayscale_rule

Integer

Grayscale rule. The value can be 0 (determined) or 1 (random). This parameter is used when execute_strategy is set to 1.

gray_object_ids

String

Grayscale object ID list.

random_first_batch_count

Integer

Random number for the first batch execution.

gray_fail_threshold

Integer

First-batch execution failure threshold.

scheduled_end_time

String

End time of the time window.

description

String

Task description.

Status code: 400

Table 3 Response body parameters

Parameter

Type

Description

error_code

String

Service error code.

error_msg

String

Service error message.

Status code: 500

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Service error code.

error_msg

String

Service error message.

Example Requests

None

Example Responses

Status code: 200

ok

{
  "id" : "task-001",
  "project_id" : "project-001",
  "task_name" : "Daily Desktop Upgrade Task",
  "task_type" : 0,
  "scheduled_type" : "DAY",
  "timezone" : "Asia/Shanghai",
  "week_list" : "1,2,7",
  "month_list" : "1,6,12",
  "date_list" : "1,15,L",
  "day_interval" : 1,
  "scheduled_date" : "2026-05-01",
  "scheduled_time" : "02:00",
  "cron_expression" : "0 2 * * *",
  "last_execute_status" : "SUCCESS",
  "last_execute_time" : "2026-05-08T02:00:00Z",
  "next_execute_time" : "2026-05-09T02:00:00Z",
  "is_enable" : 1,
  "is_force_execute" : 1,
  "min_version" : "23.0.0",
  "target_version" : "24.6.3",
  "expire_enable" : 1,
  "expire_time" : "2026-12-31 23:59:59",
  "is_notify" : 1,
  "execute_strategy" : 0,
  "grayscale_rule" : 0,
  "random_first_batch_count" : 100,
  "gray_fail_threshold" : 10,
  "scheduled_end_time" : "12:00:00",
  "description" : "Desktop upgrade is performed at 02:00 every day.",
  "extra_params" : "{}",
  "gray_object_ids" : "sid-001,sid-002,sid-003"
}

Status Codes

Status Code

Description

200

ok

400

Invalid request parameter.

500

Internal server error.

Error Codes

See Error Codes.