Help Center/ Relational Database Service/ API Reference/ API v3 (Recommended)/ Querying Version Information About a DB Engine
Updated on 2025-06-19 GMT+08:00

Querying Version Information About a DB Engine

Function

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

  • Before calling an API, you need to understand the API in Authentication.

URI

  • URI format

    GET /v3/{project_id}/datastores/{database_name}

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Explanation:

    Project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    Constraints:

    N/A

    Value range:

    N/A

    Default value:

    N/A

    database_name

    Yes

    Explanation:

    DB engine.

    Constraints:

    N/A

    Value range:

    The value can be any of the following and is case-insensitive:

    • MySQL
    • PostgreSQL

    Default value:

    N/A

Request

  • Request parameters

    None

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    dataStores

    Array of objects

    Explanation:

    Database versions.

    For details, see Table 3.

    Table 3 dataStores field data structure description

    Parameter

    Type

    Description

    id

    String

    Explanation:

    Database version ID. The value is unique.

    Value range:

    N/A

    name

    String

    Explanation:

    Database version number. Only the major version number (two digits) is returned. For example, if the version number is MySQL 5.7.X, only 5.7 is returned.

    Value range:

  • Example normal response
    {
    	"dataStores": [{
    		"id": "87620726-6802-46c0-9028-a8785e1f1921",
    		"name": "8.0"
    	}, {
    		"id": "87620726-6802-46c0-9028-a8785e1f1922",
    		"name": "5.7"
    	}]
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.