Poll to query the analysis execution status and results for a specified question.
Interface Description
After submitting a question via Text2InsightQuery, the client must call this interface in a loop to retrieve the analysis progress and final results. Each call returns all responses messages produced so far.
Polling Strategy
Parameter
Recommended Value
Polling interval
2 seconds
Single request timeout
60 seconds
Total timeout
360 seconds
Termination Condition
On each poll, check the dataType of the last message in the responses array. Stop polling when the value is one of the following:
finish — Analysis completed normally
finish_stop — User actively stopped the analysis
error — Execution error occurred
Request Method
POST /open/safe_question_poll?tenantId={tenantId}&userId={userId}&loginToken={loginToken}
💡 Note: tenantId, userId, and loginToken must appear both in the URL query parameters and in the request body. Missing query parameters will cause the request to fail.
Request Parameters
Parameter
Location
Type
Required
Description
tenantId
Query + Body
Integer
Yes
Tenant ID
userId
Query + Body
Integer
Yes
User ID
domainId
Body
Integer
Yes
Data domain ID
questionId
Body
Integer
Yes
Question ID, obtained via Text2InsightQuery
loginToken
Query + Body
String
Yes
Authentication Token
Response Parameters
Parameter
Type
Description
success
Boolean
Whether the request was successful
data.responses
Array
Message list containing all messages produced during the analysis
data.responses[].id
String
Message ID
data.responses[].dataType
String
Message type, see description below
data.responses[].message
String
Message text content
data.responses[].modelRes
Object
Raw structure returned by the model
data.responses[].modelRes.code
Integer
Model response code
data.responses[].modelRes.data
Object
Business data returned by the model
Message Type Description (dataType)
Type
Description
Key Fields
message
General message; may contain knowledge details or execution logs
message, knowledgeData
notify
Progress notification (e.g., "Thinking")
message
summary
Analysis summary containing the final answer
summaryData
metric
Metric calculation result
message, metricDsl, physicalMetricDsl
echarts_plus
Chart data
message, chartType, columns, calculateSql
code
Code block (e.g., generated SQL)
message, codeType, code
finish
Analysis ended normally
message
finish_stop
User actively stopped
message
error
Execution error
message
Field Read Priority
Business fields in each responses message may appear at different levels. Read in the following priority order:
Top level: response[fieldName]
modelRes: response.modelRes.data[fieldName]
rawRes: parse response.rawRes (JSON string) and retrieve data[fieldName]