You need to enable JavaScript to run this app.
DataAgent (OnPremise)

DataAgent (OnPremise)

Copy page
Download PDF
Intelligent Data Analysis
Execute Intelligent Analysis
Copy page
Download PDF
Execute Intelligent Analysis

After determining the analysis capability to use, call this API to initiate an asynchronous analysis task.

Prerequisites

The Get available analysis capabilities API has been called to obtain details of the analysis capabilities available for the current query result. For more information, see Obtain Available Analysis Capabilities.

Request description
  • Request method: POST
  • Request URL: https://{domain}/dataAgent/llm/openApi/v2/agent/insightExecute

Request parameters

Parameter

Type

Required

Example value

Description

sessionId

int

Yes

12886164

Session ID. For example, when using the new version of the WenShu OpenAPI, configure the session ID returned in the sessionInfo of the create session result. For details, see Create a Session.

historyId

int

Yes

12886163

Session result ID for this instance. For example, when decomposing a vague question into multiple sub-questions for WenShu, each sub-question result will have a session result ID.
For example, when using the new version of the WenShu OpenAPI, configure the historyId in the result field of the event stream returned by the chatCompletion API when type=result and status=success. For details, see Session Completion.

insightAbility

JSON

Yes

For details, see the request example below.

The intelligent analysis capability to be executed. You can configure it as the available analysis capability ("enable": true) returned by the Get available analysis capabilities API.
The ability_params is the parameter object for the corresponding analysis capability. You can use the default settings returned by the Get available analysis capabilities API, or adjust them as needed for your analysis.

Request example

The request body must include the sessionId and historyId obtained from previous steps, as well as the insightAbility object selected in Step 2 where enable is true.

{
  "sessionId": "{步骤一返回的 sessionId}",
  "historyId": "{步骤一返回的 historyId}",
  "insightAbility": {
    "ability_code": "interpret",
    "ability_name": "解读",
    "enable": true,
    "cause": "",
    "ability_params": [
        // ... This is the params object obtained in Step 2 corresponding to the selected ability_code.
    ]
  }
}

Response parameters

Upon successful invocation, the API returns a JSON object containing the data field, whose value is the insightKey used to retrieve the final result.

Parameter

Type

Example value

Description

data

string

INSIGHT_ANALYSIS_V2:XXXXXXXXXXXXXXXX

The insightKey for the final result.

Response example
{
    "code": "llm/ok",
    "data": "INSIGHT_ANALYSIS_V2:XXXXXXXXXXXXXXXX",
    "msg": {}
}
Last updated: 2026.06.02 14:53:16