Files
doc-exports/docs/rds/api-ref/rds_11_0010.html
wangdengke2 1ddaec1a62 rds_api
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: wangdengke2 <wangdengke2@huawei.com>
Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
2026-01-29 11:28:26 +00:00

18 KiB

Querying Extensions

Function

This API is used to obtain extension information of a specified database.

Constraints

This operation cannot be performed when the DB instance is in any of the following statuses: creating, changing instance class, changing port, or abnormal.

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/extensions?database_name={database_name}&offset={offset}&limit={limit}

  • Parameter description
    Table 1 Parameters

    Parameter

    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.

    instance_id

    Yes

    Specifies the DB instance ID.

    database_name

    Yes

    The name of the specific database created inside the RDS instance. This is the logical database name, not the RDS instance identifier.

    offset

    No

    Index offset. The query starts from the next piece of data indexed by this parameter.

    The value must be a non-negative number.

    The default value is 0, indicating that the query starts from the first data record.

    limit

    No

    Number of records to be queried.

    The value ranges from 1 (inclusive) to 100 (inclusive).

    The default value is 100.

Request

  • Request parameters
    Table 2 Request header parameters

    Parameter

    Mandatory

    Type

    Description

    X-Auth-Token

    Yes

    String

    Specifies the user token.

    The user token is a response to the API used to obtain a user token.

Response

  • Normal response
    Table 3 Parameters

    Parameter

    Type

    Description

    extensions

    Array of objects

    Extension list. For details, see Table 4.

    total_count

    Integer

    Total number of extensions.

    Table 4 extensions element structure description

    Parameter

    Type

    Description

    name

    String

    Extension name.

    database_name

    String

    The name of the specific database created inside the RDS instance. This is the logical database name, not the RDS instance identifier.

    version

    String

    Extension version.

    version_update

    String

    New version that the extension can be upgraded to. If the value of this parameter is different from that of version, the extension can be upgraded.

    shared_preload_libraries

    String

    Dependent preloaded library.

    created

    Boolean

    Whether the extension has been created.

    description

    String

    Extension description.

    enable_install

    Boolean

    Whether the extension can be installed.

  • Example normal response
    { 
       "extensions" : [ { 
         "name" : "pg_cron", 
         "database_name" : "db1", 
         "version" : "1.0", 
         "version_update" : "1.0", 
         "shared_preload_libraries" : "pg_cron", 
         "created" : false,
         "enable_install": false,
         "description" : "pg_cron access method - signature file based index" 
     } ], 
       "total_count" : 1 
     }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.