View execution status¶
View the current status of a SQL query. When the query is successful, the response returns the result ID required to read or download the result.
POST $CLOUDSIGMA_API_BASE/query/describe
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region.
Prepare personal access token and target workspace ID that can access the target workspace.
Execute SQL and record the query ID (
query_id) in the response.
Request body¶
Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID and $QUERY_ID with actual values.
curl -X POST "$CLOUDSIGMA_API_BASE/query/describe" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d "{\"query_id\": \"$QUERY_ID\"}"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Successful response¶
{
"code": 200,
"data": {
"query_id": "query_01",
"created_at": "2026-08-18T10:00:00Z",
"statement_id": "00000000-0000-4000-8000-000000000001",
"db_name": "sales",
"status": "success",
"rows_affected": 1
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
object |
response data. |
|
string |
Query ID. |
|
string |
The creation time of the execution record. |
|
string |
The result ID used to read or download results. |
|
string |
The database specified during execution. |
|
string |
execution status. Values: |
|
string |
Execute error description. May be omitted if not set. |
|
integer |
Number of rows affected. |
Error response¶
{
"code": 404,
"message": "SQL 查询不存在"
}
Field |
Type |
Description |
|---|---|---|
|
integer or string |
SQL processing errors may be numeric status codes. Authentication or general service errors may be string error codes. |
|
string |
error message. |
Errors are encapsulated in two ways: The SQL processing path uses {“code”:400,”message”:”…”}. Authentication or general service error using {“code”:”ErrServer”,”msg”:”…”}. Both message and msg are readable error messages, which should be read based on the actual fields and cannot be judged only by the numerical code.