Updated on 2025-12-02 GMT+08:00

Querying Database Version Information

Function

This API is used to obtain database version information about a specified type of a DB instance.

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

    dds:instance:listDatabaseVersion

    read

    -

    -

    -

    -

URI

  • URI format

    GET /v3/{project_id}/datastores/{datastore_name}/versions

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/datastores/DDS-Community/versions

Request Parameters

Table 1 Request parameters

Name

Type

IN

Mandatory

Description

x-auth-token

string

header

Yes

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

project_id

string

path

Yes

Project ID of a tenant in a region. Obtain the project ID by following the instructions in Obtaining a Project ID.

datastore_name

string

path

Yes

Specifies the database type. The value is DDS-Community.

Response Parameters

Table 2 Parameter description

Name

Type

Mandatory

Description

versions

Array of strings

Yes

DB version. Versions 5.0, 4.4, 4.2, 4.0, and 3.4 are supported. The value can be 5.0, 4.4, 4.2, 4.0, or 3.4.

Example Request

None

Example Response

 {
   "versions": [
        "3.4",
        "4.0",
        "4.2",
        "4.4",
        "5.0"
    ]
}

SDK

Click Document Database Service DDS SDK to download the SDK or view the SDK document. To learn how to install and authenticate an SDK, read the Usage section.

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.