• Relational Database Service

rds
  1. Help Center
  2. Relational Database Service
  3. API Reference
  4. API v3 (Recommended)
  5. Querying the DB Engine Version

Querying the DB Engine Version

Function

This API is used to query the database version information of a specified DB engine.

URI

  • URI format

    PATH: /{version_id}/{project_id}/datastores/{database_name}

    Method: GET

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    version_id

    Yes

    Specifies the API version. It is case-sensitive and the value is v3.

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    database_name

    Yes

    Specifies the DB engine. Its value can be any of the following and is case-insensitive:

    • MySQL
    • PostgreSQL
    • SQLServer

Request

N/A

Normal Response

  • Parameter description
    Table 2 Parameter description

    Name

    Type

    Description

    dataStores

    List data structure

    Indicates the list of database versions.

    For details, see Table 3.

    Table 3 dataStores field data structure description

    Name

    Type

    Description

    id

    String

    Indicates the database version ID. Its value is unique.

    name

    String

    Indicates the database version number. Only the major version number (two digits) is returned. For example, if the version number is MySQL 5.6.X, only 5.6 is returned.

  • Response example
    {
      "dataStores": [
       {
          "id": "87620726-6802-46c0-9028-a8785e1f1922",
          "name": "5.7"
        },
       {
          "id": "e8a8b8cc-63f8-4fb5-8d4a-24c502317a62",
          "name": "5.6"
        }
      ]
    }

Abnormal Response

For details, see Abnormal Request Results.