Help Center/ Data Admin Service/ API Reference/ APIs/ Intelligent O&M/ Querying the SQL Execution Result (GET Request)
Updated on 2026-08-25 GMT+08:00

Querying the SQL Execution Result (GET Request)

Function

This API is used to query the SQL execution result.

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

    Write

    Instance

    -

    -

    -

URI

GET /v3/{project_id}/connections/{connection_id}/get-execute-result-without-key

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

Table 2 Query parameters

Parameter

Mandatory

Type

Description

execute_id

No

String

Definition

SQL execution ID

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

column_values

Array of Maps

Definition

Field value

metadata

Array of Table 4 Objects

Definition

Field attributes, such as a field name

result_type

String

Definition

Result set type

Range

N/A

rows

Integer

Definition

Number of rows

Range

N/A

time_delay

Long

Definition

Execution duration

Range

N/A

can_edit

Boolean

Definition

Whether the result set is editable

Range

N/A

can_export

Boolean

Definition

Whether the result set can be exported

Range

N/A

edit_db_name

String

Definition

Edited database name

Range

N/A

edit_table

String

Definition

Edited table name

Range

N/A

edit_primary_keys

Array of strings

Definition

Primary key information

cannot_edit_reason

Integer

Definition

Reason why the information cannot be edited

Range

  • 1001: The virtual table cannot be edited.
  • 1002: Multiple tables cannot be edited.
  • 1003: Editing is not allowed if there is no primary key.
  • 1004: Metadata cannot be edited.
  • 1005: Editing is not allowed if the result set does not contain all primary keys.
  • 1006: Editing is not allowed if there are multiple result sets.
  • 1007: The system catalog cannot be edited.
  • 1009: The view cannot be edited.
  • 1010: Editing is not supported.

extend_datas

Array of Table 3 Objects

Definition

Extra information

data_sum

Integer

Definition

Total data volume

Range

N/A

big_table

Boolean

Definition

Whether there is a big table

Range

N/A

warning

Array of strings

Definition

Alarm generated after a command is executed

sql

String

Definition

SQL statement to be executed

Range

N/A

explain_sql

Boolean

Definition

Whether the statement is an execution plan statement

Range

N/A

page_state

String

Definition

Page status

Range

N/A

exceed_data

Boolean

Definition

Whether the query result exceeds the specified size

Range

N/A

execute_status

String

Definition

Execution status

Range

  • finished: The execution is complete.
  • pending: The statement is being executed.
Table 4 Column

Parameter

Type

Description

auto_increment

Boolean

Definition

Whether auto-increment is enabled

Range

N/A

data_type

String

Definition

Data type

Range

N/A

db_name

String

Definition

Database name

Range

N/A

label

String

Definition

Label

Range

N/A

name

String

Definition

Name

Range

N/A

real_name

String

Definition

Real name

Range

N/A

size

Integer

Definition

Size

Range

N/A

table_name

String

Definition

Table name

Range

N/A

schema_name

String

Definition

Schema name

Range

N/A

readonly

Boolean

Definition

Read-only or not

Range

N/A

Example Requests

GET https://das.cn-north-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/connections/179e525e-0e9c-4dcc-9dd7-ee2f36121e23/get-execute-result-without-key?execute_id=6f2e280e-60aa-4e37-82be-1b47d5520811

Example Responses

Status code: 200

Success.

{
    "column_values": [
        {
            "COLUMN_1": "2"
        },
        {
            "COLUMN_1": "1"
        }
    ],
    "metadata": [
        {
            "auto_increment": false,
            "data_type": "INTEGER",
            "db_name": "czh_test",
            "label": "id",
            "name": "COLUMN_1",
            "real_name": "id",
            "size": 11,
            "table_name": "lbw",
            "schema_name": "",
            "readonly": false
        }
    ],
    "result_type": "data",
    "rows": 50,
    "time_delay": 2,
    "can_edit": false,
    "can_export": false,
    "cannot_edit_reason": 1003,
    "data_sum": 89,
    "big_table": false,
    "sql": "SELECT *\nFROM lbw\nLIMIT 0, 50",
    "explain_sql": false,
    "exceed_data": false,
    "execute_status": "finished",
    "edit_db_name": "",
    "edit_table": "",
    "edit_primary_keys": [],
    "extend_datas": [],
    "warning": [],
    "page_state": ""
}

Status Codes

Status Code

Description

200

Success.

400

Client error.

500

Server error.

Error Codes

See Error Codes.