Help Center/ Data Admin Service/ API Reference/ APIs/ Intelligent O&M/ Obtaining the SQL Template Database Comparison List
Updated on 2026-08-25 GMT+08:00

Obtaining the SQL Template Database Comparison List

Function

This API is used to obtain the SQL template comparison list.

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

    Read

    Instance

    -

    -

    -

URI

GET /v3/{project_id}/fullsql/query-tpl-db-cmp-list

Table 1 URI parameters

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

Default Value

N/A

Request Parameters

Table 2 Query parameters

Parameter

Mandatory

Type

Description

instance_id

Yes

String

Definition

Unique ID of an instance

Constraints

N/A

Range

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

Default Value

N/A

node_id

No

String

Definition

Unique ID of a node

Constraints

N/A

Range

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

Default Value

N/A

start_at1

Yes

Long

Definition

Start time of comparison period 1

Constraints

Unix timestamp, in milliseconds

Range

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

Default Value

N/A

end_at1

Yes

Long

Definition

End time of comparison period 1

Constraints

Unix timestamp, in milliseconds

Range

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

Default Value

N/A

start_at2

Yes

Long

Definition

Start time of comparison period 2

Constraints

Unix timestamp, in milliseconds

Range

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

Default Value

N/A

end_at2

Yes

Long

Definition

End time of comparison period 2

Constraints

Unix timestamp, in milliseconds

Range

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

Default Value

N/A

operation

No

String

Definition

Operation type

Constraints

Multiple values need to be separated by commas (,).

Range

N/A

Default Value

N/A

db_name_list

No

Array of Strings

Definition

Database

Constraints

N/A

Range

N/A

Default Value

N/A

keyword

No

String

Definition

Keyword

Constraints

N/A

Range

N/A

Default Value

N/A

sort

No

String

Definition

Sorting field

Constraints

  • executeNum: execution times
  • totalCost: total duration
  • avgCost: average duration
  • totalScan: total rows scanned
  • avgScan: average rows scanned

Range

N/A

Default Value

N/A

asc

No

Boolean

Definition

Sorting order

Constraints

N/A

Range

  • true: ascending
  • false: descending

Default Value

N/A

size

No

Integer

Definition

Quantity. The default value is 30.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

db_name_list

Arrays of Strings

Definition

Database list

Range

N/A

Example Requests

GET https://das.cn-north-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/fullsql/query-sql-tpl-db-list?start_at=1764825853228&end_at=1764829453228&sort=avgCost&asc=false&node_id=&instance_id=bcfa975193f1402fa11a6d4fd6baf5fbin01&operation=&keyword=&size=50 
 

Example Responses

Status code: 200

Success.

{
    "db_name_list": [
        "czh_test"
    ]
}

Status Codes

Status Code

Description

200

Success.

400

Client error.

500

Server error.

Error Codes

See Error Codes.