Help Center/ Data Admin Service/ API Reference/ APIs/ Intelligent O&M/ Viewing Binlog Parsing Details
Updated on 2026-08-25 GMT+08:00

Viewing Binlog Parsing Details

Function

This API is used to view binlog parsing details.

Authorization Information

Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions Policies and Supported Actions.
  • 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

    das:clouddba:listBinlog

    List

    Instance

    -

    -

    -

URI

POST /v3/{project_id}/connections/{connection_id}/binlog-parse/search

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

Constraints

N/A

Range

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

Default Value

N/A

connection_id

Yes

String

Definition

Connection ID established between a database account and the database. The database user ID is created using the API in Creating an Instance Connection.

Constraints

N/A

Range

The value is a UUID containing 36 characters. Only letters, digits, and hyphens (-) are allowed.

Default Value

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

task_id

Yes

Long

Definition

ID of a parsing task

Constraints

N/A

Range

N/A

Default Value

N/A

start_time

No

Long

Definition

Start time in the Unix timestamp format, in milliseconds

Constraints

N/A

Range

[0, 2^63 – 1]. The actual value depends on the query result.

Default Value

N/A

end_time

No

Long

Definition

End time in the Unix timestamp format, in milliseconds

Constraints

N/A

Range

[0, 2^63 – 1]. The actual value depends on the query result.

Default Value

N/A

db_name

No

String

Definition

Database name

Constraints

N/A

Range

N/A

Default Value

N/A

table_name

No

String

Definition

Table name

Constraints

N/A

Range

N/A

Default Value

N/A

type_list

No

Array of strings

Definition

SQL types

  • insert
  • update
  • delete
  • ddl

Constraints

N/A

cur_page

Yes

Integer

Definition

Page number

Constraints

N/A

Range

[0, 2^31 – 1]. The actual value depends on the query result.

Default Value

N/A

per_page

Yes

Integer

Definition

Number of records on each page

Constraints

N/A

Range

[0, 100]. The actual value depends on the query result.

Default Value

N/A

column_list

No

Array of Table 3 objects

Definition

Filters

Constraints

N/A

Table 3 FilterColumn

Parameter

Mandatory

Type

Description

column_name

No

String

Definition

Filter field name

Constraints

N/A

Range

N/A

Default Value

N/A

column_value

No

String

Definition

Filter value

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total

Integer

Definition

Total number

Range

[0, 2^31-1]

event_list

Array of Table 5 objects

Definition

Binlog details

Table 5 EventRowsVo

Parameter

Type

Description

event_id

Long

Definition

Event ID

Range

N/A

file_name

String

Definition

File name

Range

N/A

position

Long

Definition

Parsing position

Range

N/A

timestamp

Long

Definition

Event occurrence time, in milliseconds

Range

N/A

db_name

String

Definition

Name of a changed database

Range

N/A

table_name

String

Definition

Name of a changed table

Range

N/A

sql_type

String

Definition

Type of a changed SQL statement

Range

  • insert
  • update
  • delete
  • ddl

sql_statement

String

Definition

Changed SQL statement

Range

N/A

column_names

Array of strings

Definition

Name list of changed columns

primary_keys

Array of strings

Definition

Name list of changed primary keys

affect_rows

Integer

Definition

Number of affected rows

Range

N/A

row_pairs

Array of Table 6 objects

Definition

Change data details

Table 6 RowPairDto

Parameter

Type

Description

before_row

JSONObject

Definition

Row data before the change

Range

N/A

after_row

JSONObject

Definition

Row data after the change

Range

N/A

Example Requests

POST https://das.cn-north-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/connections/179e525e-0e9c-4dcc-9dd7-ee2f36121e23/binlog-parse/search 
 
{
  "cur_page": 1,
  "per_page": 10,
  "db_name": null,
  "table_name": null,
  "column_list": [],
  "type_list": ["insert", "update", "delete", "ddl"],
  "start_time": null,
  "end_time": null,
  "task_id": 1163
}

Example Responses

Status code: 200

Success.

{
    "total": 2,
    "event_list": [
        {
            "event_id": 1,
            "file_name": "mysql-bin.045330",
            "position": 302,
            "timestamp": 1764127367000,
            "db_name": "cds",
            "table_name": "shopping",
            "sql_type": "ddl",
            "sql_statement": "CREATE TABLE shopping (\n\na int NOT NULL AUTO_INCREMENT,\n\nb int,\n\nc int,\n\nPRIMARY KEY (a),\n\nUNIQUE KEY u_k (b, c)\n\n)",
            "column_names": [],
            "primary_keys": [],
            "affect_rows": 0,
            "row_pairs": []
        },
        {
            "event_id": 2,
            "file_name": "mysql-bin.045330",
            "position": 750,
            "timestamp": 1764127374000,
            "db_name": "cds",
            "table_name": "shopping",
            "sql_type": "insert",
            "sql_statement": "insert into table_abc values (1)",
            "column_names": [
                "a",
                "b",
                "c"
            ],
            "primary_keys": [
                "a"
            ],
            "affect_rows": 3,
            "row_pairs": [
                {
                    "after_row": {
                        "a": 1,
                        "b": 1,
                        "c": 1
                    },
                    "before_row": {
                        "a": 2,
                        "b": 1,
                        "c": 5
                    }
                }
            ]
        }
    ]
}

Status Codes

Status Code

Description

200

Success.

400

Client error.

500

Server error.

Error Codes

See Error Codes.