Updated on 2025-10-20 GMT+08:00

Querying DB Engine Versions

Function

This API is used to query DB engine versions supported by a DB instance. Before calling this API:

Debugging

You can debug this API in API Explorer.

URI

GET /v3.2/{project_id}/datastore/versions

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

limit

No

Definition

Number of records returned by a query. For example, if this parameter is set to 10, a maximum of 10 records can be displayed.

Constraints

N/A

Range

[1,100]

Default Value

100

offset

No

Definition

Index offset. The query starts from the next piece of data indexed by this parameter. For example, if this parameter is set to 1 and limit is set to 10, only the 2nd to 11th records are displayed.

Constraints

N/A

Range

[0,2^31-1]

Default Value

0: The query starts from the first data record.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

After the request is processed, the value of X-Subject-Token in the message header is the token value.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Language.

Constraints

N/A

Range

  • zh-cn
  • en-us

Default Value

en-us

Response Parameters

Table 3 Response parameter description

Parameter

Type

Description

database_versions

Array of objects

Definition

Database versions.

For details, see Table 4.

total

Integer

Definition

Total number of DB engine versions.

Range

N/A

Table 4 Attributes of database versions

Parameter

Type

Description

software_version

String

Definition

Three-digit DB engine version.

Range

N/A

hotfixes

Array of objects

Definition

Hot patch information corresponding to the three-digit DB engine version.

For details, see Table 5.

Table 5 Hot patch information

Parameter

Type

Description

version

String

Definition

Hot patch version.

Range

N/A

create_time

Long

Definition

Time when the hot patch was created. The value is a UNIX timestamp in milliseconds.

Range

N/A

deploy_modes

Array of objects

Definition

Deployment model information of the instance for which the hot patch can be installed.

For details, see Table 6.

Table 6 Deployment model information of the instance for which the hot patch can be installed

Parameter

Type

Description

default_upgrade

String

Definition

Default patch fix policy.

Range

  • true: You do not need to select the hot patch version to be installed. The current hot patch is installed by default.
  • false: You need to select the hot patch version to be installed.

update_time

Long

Definition

Time when a hot patch installation policy was modified. The value is a UNIX timestamp in milliseconds.

Range

N/A

mode

String

Definition

Deployment model of the instance for which the patch can be installed.

Range

  • distributed: The deployment model can be either independent or combined (basic edition).
  • centralization_standard: The deployment model can be centralized.

Example Request

Querying DB engine versions

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.2/0483b6b16e954cb88930a360d2c4e663/datastore/versions?offset=0&limit=10

Example Response

DB engine versions queried.

{
    "database_versions":
    [
        {
            "software_version": "V2.0-8.210",
            "hotfixes":
            [
                {
                    "version": "V2.0-8.210.0.1",
                    "create_time": "1755475200",
                    "deploy_modes":
                    [
                        {
                            "default_upgrade": true,
                            "update_time": "1755475200",
                            "mode": "centralization_standard"
                        }
                    ]
                }
            ]
        }
    ],
    "total": 1
}

Status Codes

Error Codes

For details, see Error Codes.