Help Center/ Document Database Service/ API Reference/ APIs V3.0 (Recommended)/ DB Instance Management/ Upgrading the Minor Versions of DB Instances in Batches
Updated on 2025-08-22 GMT+08:00

Upgrading the Minor Versions of DB Instances in Batches

Function

This API is used to upgrade the minor versions of DB instances in batches.

Constraints

  • Upgrade is triggered immediately, so you need to upgrade the minor version during off-peak hours.
  • Only Fastest completion can be selected for Method.

URI

POST https://{Endpoint}/v3/{project_id}/instances/db-upgrade
Table 1 Path parameters

Name

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Name

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token obtained from IAM. For details, see Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 Request body parameters

Name

Mandatory

Type

Description

instance_ids

Yes

Array of strings

Definition

IDs of instances whose minor versions need to be upgraded.

Constraints

A maximum of 10 instance IDs can be transferred at a time.

Range

N/A

Default Value

N/A

Response Parameters

Status code: 202

Table 4 Response body parameters

Name

Type

Description

upgrade_results

Array of objects

Definition

Batch upgrade result. For details, see Table 5.

Range

N/A

Table 5 UpgradeResult

Name

Type

Description

job_id

String

Definition

Task ID. This field is returned only when a minor version upgrade task is successfully submitted.

Range

N/A

instance_id

String

Definition

DB instance ID.

Range

N/A

error_code

String

Definition

Error code. This field is returned only when a minor version upgrade task fails to be submitted.

Range

N/A

error_message

String

Definition

Failure cause. This field is returned only when a minor version upgrade task fails to be submitted.

Range

N/A

Example Request

  • URI example
    POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/db-upgrade
  • Upgrading the minor versions of DB instances in batches
    { 
      "instance_ids" : [ "046287aae57843b1a7bc61b7a8812f41in02", "3d1e04f49efa473a8c7eaf07ed7ff870in02" ] 
    }

Example Response

Status code: 202

Accepted.

{ 
  "upgrade_results" : [ { 
    "instance_id" : "046287aae57843b1a7bc61b7a8812f41in02", 
    "job_id" : "e4616470-733d-41de-a9b0-a260709293d3" 
  }, { 
    "instance_id" : "3d1e04f49efa473a8c7eaf07ed7ff870in02", 
    "error_code" : "DBS.200011", 
    "error_message" : "The status of DB instance does not allow the operation." 
  } ] 
}

Status Code

Status Code

Description

202

Accepted.

400

Client error.

500

Server error.

Error Code

For details, see Error Code.