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 2025-12-09 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

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    instance_id

    String

    Yes

    Instance ID.

    offset

    Integer

    No

    Index offset. If offset is set to N, the resource query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value must be a number but cannot be a negative number.

    limit

    Integer

    No

    Number of query records. The default value is 10. The value must be a positive integer. The minimum value is 1 and the maximum value is 100.

    order

    String

    No

    Sorting order.

    • DESC: descending order
    • ASC: ascending order
    • Default value: desc

    sort_field

    String

    No

    Sorting field.

    • check_time: check time
    • expiration_time: expiration time
    • check_time is the default value.

    target_version

    String

    No

    Target version.

    is_available

    Boolean

    No

    Whether the check is valid.

    • true: valid
    • false: invalid

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

    Total number of records.

    inspection_reports

    Array of objects

    Check report details.

    For details, see Table 3.

    Table 3 inspection_report field data structure description

    Parameter

    Type

    Description

    id

    String

    Check report ID.

    check_time

    String

    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.

    expiration_time

    String

    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.

    target_version

    String

    Target version.

    result

    String

    Check results.

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

    detail

    String

    Check report details.

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