All Products
Search
Document Center

Simple Log Service:SubmitAsyncSql

Last Updated:Mar 27, 2026

Submits an asynchronous SQL request.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /asyncsql HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

project

string

No

The idempotence parameter.

sls-demo-project

Accept

string

No

The data format of the response. The value is fixed to application/x-protobuf.

application/x-protobuf

Accept-Encoding

string

No

The compression format of the response. The value is fixed to lz4.

lz4

body SubmitAsyncSqlParams

No

The format of the returned parameters. The format is protobuf.

Response elements

Element

Type

Description

Example

AsyncSqlResponseData

The response body in protobuf format.

Examples

Success response

JSON format

{
  "id": "690C4F2A16FBD65C40000484_14",
  "state": "FINISHED",
  "AsyncSqlMetaPB": {
    "result_rows": 12000,
    "processed_rows": 10000000,
    "elapsed_milli": 30000,
    "cpu_sec": 0.2,
    "cpu_cores": 10,
    "progress": "Complete",
    "keys": [
      "[\"name\", \"age\", \"gender\"]"
    ]
  },
  "rows": [
    [
      "[\"Jimmy\", \"20\", \"male\"]"
    ]
  ],
  "error_code": "InvalidQuery",
  "error_message": "line 37:14: Column 'xyz' cannot be resolved"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.