Updated on 2026-01-08 GMT+08:00

Upgrading the Database Patch

API Description

This API is used to upgrade the database patch version.

Restrictions

  • This API is not available to frozen or abnormal instances.
  • This API is not available if there are abnormal instance nodes.
  • View field patch_available in the result returned by the API in Querying Instances and Details and check whether a minor version upgrade is supported.
  • Perform an upgrade during off-peak hours.

URI

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

    Name

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID.

    instance_id

    Yes

    String

    Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one.

Request Parameters

Table 2 Request header parameters

Name

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Table 3 Request body parameters

Name

Mandatory

Type

Description

upgrade_mode

No

String

Upgrade mode. If this parameter is set to minimized_interrupt_time, the shortest interruption time is preferred. In this mode, the upgrade has little impact on services. If this parameter is set to minimized_upgrade_time, the shortest upgrade time is preferred. The default value is minimized_interrupt_time.

  • Request example

    Example of upgrading the database patch version of a replica set instance

    { 
      "upgrade_mode" : "minimized_interrupt_time" 
    }

Response Parameters

Table 4 Response body parameters

Name

Type

Description

job_id

String

Task ID.

  • Example response
    { 
      "job_id" : "55e166d2-83ad-425f-b887-3503de03dc9b" 
    }

Status Code

For details, see Status Code.

Error Code

For details, see Error Code.