Help Center/ Relational Database Service/ API Reference/ API v3 (Recommended)/ Upgrading a Major Version (RDS for PostgreSQL)/ Querying the Major Version Upgrade Check History of a DB Instance (RDS for PostgreSQL)
Updated on 2026-02-04 GMT+08:00

Querying the Major Version Upgrade Check History of a DB Instance (RDS for PostgreSQL)

Function

This API is used to query the major version upgrade check history.

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 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

rds:instance:listAll

read

-

-

rds:instance:list

-

Constraints

  • This API is available to RDS for PostgreSQL only.
  • This operation cannot be performed when the DB instance is in any of the following statuses: creating, changing instance specifications, changing port, frozen, or abnormal.

URI

  • URI format

    GET /v3/{project_id}/instances/{instance_id}/major-version/inspection-histories?offset={offset}&limit={limit}&order={order}&sort_field={sort_field}&target_version={target_version}&is_available={is_available}

  • Parameter description
    Table 1 Parameters

    Parameter

    Type

    Mandatory

    Description

    project_id

    String

    Yes

    Definition

    Project ID of a tenant in a region.

    Constraints

    The value cannot be empty.

    Range

    To obtain the value, see Obtaining a Project ID.

    Default Value

    N/A

    instance_id

    String

    Yes

    Definition

    Instance ID.

    Constraints

    The value cannot be empty.

    Range

    You can obtain the value of this parameter from id in Table 4 by calling the API for querying DB instances.

    Default Value

    N/A

    offset

    Integer

    No

    Definition

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

    Constraints

    N/A

    Range

    An integer greater than or equal to 0

    Default Value

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

    limit

    Integer

    No

    Definition

    Number of query records.

    Constraints

    The value cannot be a negative number.

    Range

    1–100

    Default Value

    10

    order

    String

    No

    Definition

    Sorting order.

    Constraints

    N/A

    Range

    • DESC: descending order
    • ASC: ascending order

    Default Value

    DESC

    sort_field

    String

    No

    Definition

    Sorting field.

    Constraints

    N/A

    Range

    • check_time: check time
    • expiration_time: expiration time

    Default Value

    check_time

    target_version

    String

    No

    Definition

    Target version.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    is_available

    Boolean

    No

    Definition

    Whether the check is valid.

    Constraints

    N/A

    Range

    • true: valid
    • false: invalid

    Default Value

    N/A

Request

  • Request parameters

    None

  • URI example
    https://{Endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/3aa441c4c98a4b36b100a7e3e87d17cein03/major-version/inspection-histories?offset=0&limit=10

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    total_count

    Integer

    Definition

    Total number of records.

    Range

    N/A

    inspection_reports

    Array of objects

    Definition

    Check report details.

    For details, see Table 3.

    Table 3 inspection_report field data structure description

    Parameter

    Type

    Description

    id

    String

    Definition

    Check report ID.

    Range

    N/A

    check_time

    String

    Definition

    Check time in the "yyyy-mm-ddThh:mm:ssZ" format.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

    Range

    N/A

    expiration_time

    String

    Definition

    Expiration time in the "yyyy-mm-ddThh:mm:ssZ" format.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

    Range

    N/A

    target_version

    String

    Definition

    Target version.

    Range

    N/A

    result

    String

    Definition

    Check results.

    Range

    • success: The check is successful.
    • failed: The check fails.
    • running: The check is in progress.

    detail

    String

    Definition

    Check report details.

    Range

    N/A

  • Example normal response
    {
             "total_count": 1,
             "inspection_reports": [
                      {
                                "id": "289903e1-3006-19e9-e054-5fb7fe376552",
                                "check_time": "2023-03-06T02:33:49+0800",
                                "expiration_time": "2023-03-07T02:33:49+0800",
                                "target_version": "14.4",        
                                "result": "success",
                                "detail": "2023-03-06 18:33:26 --- pg_upgrade check task                              begin\n2023-03-06 18:34:40 --- pg_upgrade check on master:                       [user_check_report]User check success"
                      }
             ]
    }

Status Code

Error Code

For details, see Error Codes.