Help Center > > API Reference> API v3 (Recommended)> Querying Version Information About a DB Engine

Querying Version Information About a DB Engine

Updated at: Apr 22, 2020 GMT+08:00

Function

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

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/datastores/{database_name}

  • Example

    https://rds.ap-southeast-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/datastores/mysql

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

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

    database_name

    Yes

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

    • MySQL
    • PostgreSQL
    • SQLServer

Request

None

Response

  • Normal response
    Table 2 Parameter description

    Name

    Type

    Description

    dataStores

    Array of objects

    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.

    8.0 is available only for users with the required permission. You can contact customer service to apply for the permission.

  • Example normal response
    {
    	"dataStores": [{
    		"id": "87620726-6802-46c0-9028-a8785e1f1921",
    		"name": "8.0"
    	}, {
    		"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.

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel