Updated on 2025-08-11 GMT+08:00

Querying DR Operation Records

Function

This API is used to query DR operation records. Before calling this API:

URI

GET /v3/{project_id}/instances/{instance_id}/disaster-recovery/records

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance.

Constraints

N/A

Range

The value can contain 36 characters. Only letters and digits are allowed.

Default Value

N/A

entity_id

Yes

String

Definition

Entity ID (unique ID of the DR relationship). For details, see the synchronization_id field in Table 3.

Constraints

N/A

Range

N/A

Default Value

N/A

entity_type

Yes

String

Definition

Entity type.

Constraints

N/A

Range

dr: DR

Default Value

N/A

offset

No

Integer

Definition

Index offset. The query starts from the next piece of data indexed by this parameter. For example, if this parameter is set to 0 and limit is set to 10, only the 1st to 10th records are displayed.

Constraints

The value must be a non-negative integer.

Range

N/A

Default Value

0: The query starts from the first data record.

limit

No

Integer

Definition

Number of records returned by a query. For example, if this parameter is set to 10, a maximum of 10 records can be displayed.

Constraints

N/A

Range

1–100

Default Value

100

Request Parameters

None

Response Parameters

Table 2 Response body parameters

Parameter

Type

Description

records

Array of objects

Definition

Action records.

For details, see Table 3.

Table 3 records field data structure description

Parameter

Type

Description

id

String

Definition

Primary key ID.

Range

N/A

action

String

Definition

DR action.

Range

  • dr_stream_switchover_to_postcheck: Check after a primary/standby switchover in streaming DR
  • dr_stream_switchover_auto_recovery: Processing after a primary/standby switchover in streaming DR
  • dr_stream_switchover_auto_recovery_result: Post-processing result of a primary/standby switchover in streaming DR
  • dr_stream_switchover: Primary/Standby switchover in streaming DR started
  • dr_stream_switchover_result: Primary/Standby switchover in streaming DR completed
  • dr_stream_failover: Standby instance promotion in streaming DR started
  • dr_stream_failover_result: Standby instance promotion in streaming DR completed
  • dr_stream_restore: Streaming DR relationship re-establishment started
  • dr_stream_restore_result: Streaming DR relationship re-establishment completed

status

String

Definition

Operation status.

Range

  • success: The operation succeeded.
  • failed: The operation failed.
  • query: The operation is in progress.

message

String

Definition

Message to be recorded.

Range

N/A

entity_id

String

Definition

Entity ID (unique ID of the DR relationship).

Range

N/A

entity_type

String

Definition

Entity type.

Range

dr: DR

job_id

String

Definition

Job ID.

Range

N/A

instance_id

String

Definition

Instance ID.

Range

N/A

created_at

String

Definition

Creation time.

Range

The value is in the yyyy-mm-ddThh:mm:ssZ format.

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

updated_at

String

Definition

Update time.

Range

The value is in the yyyy-mm-ddThh:mm:ssZ format.

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

extended_info

Object

Definition

Extended information.

Example Request

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/c04c789b6baa4b6dbcc139c5226f3a2cin14/disaster-recovery/records?offset=0&limit=100&entity_id=643a0dd1-ae7b-47c9-bac4-29590a67b679&entity_type=dr

Example Response

{
    "records": [
        {
            "id": "f34bf1d7-03f9-4f33-aac5-033457ca86f6",
            "action": "dr_stream_failover_result",
            "status": "success",
            "message": "",
            "entity_id": "210c7c5c-618d-4ec9-917a-c2681426df85",
            "entity_type": "dr",
            "job_id": "b4670be1-3372-4f44-b049-9c145abbb5d9",
            "instance_id": "083e6e04bc534727954f9d07ac90ab03in14",
            "created_at": "2024-11-19T11:29:25Z",
            "updated_at": "2024-11-19T11:29:25Z",
            "extended_info": {
                "allExtras": {},
                "extraKeys": [],
                "extra": {}
            }
        },
        {
            "id": "0074ead8-a50c-429f-b602-9d70f4a6dc36",
            "action": "dr_stream_failover",
            "status": "success",
            "message": "",
            "entity_id": "210c7c5c-618d-4ec9-917a-c2681426df85",
            "entity_type": "dr",
            "job_id": "b4670be1-3372-4f44-b049-9c145abbb5d9",
            "instance_id": "083e6e04bc534727954f9d07ac90ab03in14",
            "created_at": "2024-11-19T11:28:49Z",
            "updated_at": "2024-11-19T11:28:49Z",
            "extended_info": {
                "allExtras": {},
                "extraKeys": [],
                "extra": {}
            }
        }
    ]
}

Status Codes

Error Codes

For details, see Error Codes.