Help Center/ Workspace/ API Reference/ Workspace APIs/ Order/ Batch Changing Orders of Yearly/Monthly Desktops
Updated on 2025-07-14 GMT+08:00

Batch Changing Orders of Yearly/Monthly Desktops

Function

Changes yearly/monthly desktop orders in batches.

Debugging

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

URI

POST /v2/{project_id}/periodic/change/batch-order

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Content-Type

No

String

MIME type of the request body.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

type

No

String

Order placement type.

  • ADD_VOLUME: Add a disk.

  • EXTEND_VOLUME: expands the disk capacity.

  • RESIZE: Modify specifications.

  • CHANGE_IMAGE: switches images.

  • ADD_SUB_RESOURCES: purchasing desktop collaboration resources

  • DELETE_SUB_RESOURCES: unsubscribes from desktop collaboration resources.

add_volume_param

No

EstimateAddVolumeRequestBody object

Request body for querying the price for adding a disk or switching an image in a yearly/monthly desktop pool.

extend_volume_param

No

EstimateExtendVolumeRequestBody object

Request body for querying the price for expanding disk capacity in a yearly/monthly desktop pool.

resize_param

No

CreateResizeOrderRequestBody object

Request body for querying the price for changing the specifications of a yearly/monthly subscription.

change_image_param

No

CreateChangeImageOrderRequestBody object

Request body for querying the price for recomposing the system disk of a yearly/monthly subscription.

add_sub_resources_param

No

EstimateAddSubResourcesRequestBody object

Request body for querying the price for adding supplementary resources to a yearly/monthly subscription.

delete_sub_resources_param

No

CreateDeleteSubResourcesOrderRequestBody object

Request body for querying the price for deleting supplementary resources of a yearly/monthly subscription.

Table 4 EstimateAddVolumeRequestBody

Parameter

Mandatory

Type

Description

desktop_pool_id

No

String

Desktop pool ID. If both desktop_pool_id and desktop_ids are set, the value of desktop_ids is used. The two parameters cannot be empty at the same time.

desktop_ids

No

Array of strings

IDs of yearly/monthly desktops. Common desktop IDs and pooled desktop IDs cannot coexist.

promotion_plan_id

No

String

Promotion plan ID.

volume_type

Yes

String

Type of the newly added disk.

volume_size

Yes

Integer

Size of the newly added disk.

Table 5 EstimateExtendVolumeRequestBody

Parameter

Mandatory

Type

Description

desktop_pool_id

No

String

Desktop pool ID. If both desktop_pool_id and desktop_ids are set, the value of desktop_ids is used. The two parameters cannot be empty at the same time.

desktop_ids

No

Array of strings

IDs of yearly/monthly desktops. Common desktop IDs and pooled desktop IDs cannot coexist.

promotion_plan_id

No

String

Promotion plan ID.

desktop_pool_disk_id

Yes

String

ID of the disk to be expanded in the desktop pool.

new_size

Yes

Integer

Disk size after capacity expansion.

Table 6 CreateResizeOrderRequestBody

Parameter

Mandatory

Type

Description

desktop_pool_id

No

String

Desktop pool ID. If both desktop_pool_id and desktop_ids are set, the value of desktop_ids is used. The two parameters cannot be empty at the same time.

desktop_ids

No

Array of strings

IDs of yearly/monthly desktops. Common desktop IDs and pooled desktop IDs cannot coexist.

promotion_plan_id

No

String

Promotion plan ID.

product_id

Yes

String

Product ID of the target specifications.

mode

No

String

Whether specifications can be modified when the desktop is started. The value is fixed to STOP_DESKTOP. If the desktop has been started, the desktop will be stopped before the specifications are modified.

Table 7 CreateChangeImageOrderRequestBody

Parameter

Mandatory

Type

Description

desktop_pool_id

No

String

Desktop pool ID. If both desktop_pool_id and desktop_ids are set, the value of desktop_ids is used. The two parameters cannot be empty at the same time.

desktop_ids

No

Array of strings

IDs of yearly/monthly desktops. Common desktop IDs and pooled desktop IDs cannot coexist.

promotion_plan_id

No

String

Promotion plan ID.

image_spec_code

No

String

specCode of the KooGallery image. This parameter will be disabled soon. If both image_spec_code and image_id are set, the value of image_id is used. The two parameters cannot be empty at the same time.

image_id

No

String

KooGallery image ID. image_id is recommended.

delay_time

No

Integer

Time reserved for users to save data during immediate recomposing (unit: minute).

message

No

String

Message sent to a user when a system disk recomposing task is delivered.

Table 8 EstimateAddSubResourcesRequestBody

Parameter

Mandatory

Type

Description

desktop_pool_id

No

String

Desktop pool ID. If both desktop_pool_id and desktop_ids are set, the value of desktop_ids is used. The two parameters cannot be empty at the same time.

desktop_ids

No

Array of strings

IDs of yearly/monthly desktops. Common desktop IDs and pooled desktop IDs cannot coexist.

promotion_plan_id

No

String

Promotion plan ID.

sub_resource_sku

Yes

String

Add an appendant resource SKU code.

Table 9 CreateDeleteSubResourcesOrderRequestBody

Parameter

Mandatory

Type

Description

desktop_pool_id

No

String

Desktop pool ID. If both desktop_pool_id and desktop_ids are set, the value of desktop_ids is used. The two parameters cannot be empty at the same time.

desktop_ids

No

Array of strings

IDs of yearly/monthly desktops. Common desktop IDs and pooled desktop IDs cannot coexist.

promotion_plan_id

No

String

Promotion plan ID.

sub_resource_type

Yes

String

Type of the appendant resource to be deleted: DESKTOP_SHARER (desktop collaboration resource)

Response Parameters

Status code: 200

Table 10 Response body parameters

Parameter

Type

Description

orders

Array of OrderV5 objects

Result of generating orders in batches.

Table 11 OrderV5

Parameter

Type

Description

order_id

String

Order ID.

order_status

Integer

Order status. The value can be 0 (initialized), 1 (to be reviewed), 2 (to be refunded), 3 (being processed), 4 (canceled), 5 (completed), 6 (to be paid); 7 (being compensated), 8 (to be approved), 9 (to be confirmed), 10 (to be shipped), 11 (to be received), 12 (to be picked up), 13 (being replaced), or 14 (to be received by the seller).

result

String

Result. The value can be SUCCESS or FAIL.

result_code

String

If result is set to FAIL, this parameter is mandatory, indicating the failure cause of the order.

result_msg

String

Failure information, which is used together with result_code.

Status code: 400

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

error_detail

String

Error details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 409

Table 13 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

error_detail

String

Error details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 500

Table 14 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

error_detail

String

Error details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Example Requests

{
  "type" : "ADD_VOLUME",
  "add_volume_param" : {
    "desktop_pool_id" : "b046ac8e-0994-4c09-a8a8-bd989d218120",
    "volume_type" : "SAS",
    "volume_size" : 10
  }
}

Example Responses

Status code: 200

Response body for placing orders on yearly/monthly desktops in batches.

{
  "orders" : [ {
    "order_id" : "CS25052414519W9OP",
    "order_status" : 6
  } ]
}

Status Codes

Status Code

Description

200

Response body for placing orders on yearly/monthly desktops in batches.

400

The request cannot be understood by the server due to malformed syntax.

409

Operation conflict.

500

Internal server error.

Error Codes

See Error Codes.