Text2InsightStop - Stop a Question

Stop a data analysis task that is currently running.

Interface Description

When an analysis task is taking too long or the user wants to interrupt the current analysis, this interface can be called to stop the execution of a specified question. After stopping, the dataType of the last message in the polling results will become finish_stop.

Usage Notes

  • Only effective for questions with a status of running.
  • The stop operation cannot be undone.
  • Intermediate results already produced are still available via the polling interface.

Request Method

POST /open/text2insight/stop?tenantId={tenantId}&userId={userId}&loginToken={loginToken}

Request Parameters

ParameterLocationTypeRequiredDescription
tenantIdQuery + BodyIntegerYesTenant ID
userIdQuery + BodyIntegerYesUser ID
sessionIdBodyIntegerYesConversation session ID
questionIdBodyIntegerYesID of the question to stop
loginTokenQuery + BodyStringYesAuthentication Token

Response Parameters

ParameterTypeDescription
successBooleanWhether the request was successful

Request Example

POST /open/text2insight/stop Content-Type: application/json { "tenantId": 10, "userId": 1, "sessionId": 4729, "questionId": 34339, "loginToken": "eyJhbGciOiJIUzI1NiJ9..." }

Response Example

Successful response:

{ "success": true }

Error Codes

Error CodeDescription
success=falseToken is invalid, question does not exist, question has already completed, or insufficient permissions
  • Text2InsightQuery — Submit an analysis request to obtain a questionId
  • SafeQuestionPoll — After stopping, polling can continue; the last message dataType will be finish_stop
  • Quick Start — Complete end-to-end example