Updated on 2024-08-28 GMT+08:00

Querying Change History of Instance Parameters

Function

This API is used to query parameter change history of a DB instance.

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

Constraints

  • The following DB engines are supported: MySQL, PostgreSQL, and Microsoft SQL Server.

URI

  • URI format

    GET /v3/{project_id}/instances/{instance_id}/configuration-histories?offset={offset}&limit={limit}&start_time={start_time}&end_time={end_time}&param_name={param_name}

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    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

    String

    Instance ID.

    offset

    No

    Integer

    Pagination parameter.

    Default value: 0

    limit

    No

    Integer

    Pagination parameter.

    Default value: 10

    start_time

    No

    String

    Start time in the "yyyy-mm-ddThh:mm:ssZ" format. The default value is seven days before the current time.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.

    end_time

    No

    String

    End time in the "yyyy-mm-ddThh:mm:ssZ" format. The default value is the current time.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.

    param_name

    No

    String

    Parameter name.

Request

  • Parameter description

    None

  • URI example

    GET https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/1922f9c9144a421d9d1dfcb7377a849ain04/configuration-histories

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    total_count

    Integer

    Total number of historical records.

    histories

    Array of objects

    Parameter change history list.

    For details, see Table 3.

    Table 3 histories data structure description

    Parameter

    Type

    Description

    parameter_name

    String

    Parameter name.

    old_value

    String

    Old parameter value.

    new_value

    String

    New parameter value.

    update_result

    String

    Update result. Valid Value:

    • SUCCESS
    • FAILED

    applied

    Boolean

    Whether the new value has been applied to the instance.

    • true: indicates that the new value has been applied.
    • false: indicates that the new value has not been applied.

    update_time

    String

    Time when the value is updated.

    apply_time

    String

    Time when the new value is applied to the instance.

  • Example normal response
    {
       "total_count" : 3, 
       "histories" : [ { 
         "parameter_name" : "fill factor (%)", 
         "old_value" : "0", 
         "new_value" : "2", 
         "update_result" : "SUCCESS", 
         "applied" : true, 
         "update_time" : "2022-10-29T09:39:21+0000", 
         "apply_time" : "2022-10-31T01:46:29+0000" 
       }, { 
         "parameter_name" : "remote login timeout (s)", 
         "old_value" : "10", 
         "new_value" : "20", 
         "update_result" : "SUCCESS", 
         "applied" : true, 
         "update_time" : "2022-10-29T09:38:36+0000", 
         "apply_time" : "2022-10-29T09:38:36+0000" 
       }, { 
         "parameter_name" : "remote query timeout (s)", 
         "old_value" : "600", 
         "new_value" : "601", 
         "update_result" : "SUCCESS", 
         "applied" : true, 
         "update_time" : "2022-10-29T09:40:30+0000", 
         "apply_time" : "2022-10-29T09:40:30+0000" 
       } ] 
     }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.