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

DataAgent (OnPremise)

Copy page
Download PDF
Session
Create a Session
Copy page
Download PDF
Create a Session

Request description
  • Request method: POST
  • Request URL: /dataAgent/llm/openApi/v2/signed/agent/createSession
  • Content-Type:application/json

Request parameters

The body parameters are as follows:

Parameter

Type

Required

Example value

Description

agentId

int

Yes

123

Agent ID. For information on how to obtain the agent ID, see agentId.

appId

int

Yes

123**4

DataWind project ID. If you do not use a scenario with joint deployment with DataWind, you can fill in 0.

source

string

Yes

openapi

Request source. Enter the fixed value "openapi".

sessionType

string

No (default is normal)

normal

Type of session to be created. Supported enumeration values:

  • normal: Intelligent data query
  • deep_research: In-depth analysis

Response parameters

The data in the response mainly contains parameters related to the created session (sessionInfo). Detailed parameter descriptions are as follows.

Parameter

Type

Example value

Description

sessionInfo.emailPrefix

string

admin

The account name of the session creator.

sessionInfo.id

int

12886164

The ID of the created session (session id). You can record the session ID, as subsequent interfaces for retrieving session information, conversation results, and other related interfaces require the session ID.

sessionInfo.lastActiveTime

string

2025-10-24 16:03:54

The latest active time of the session. Date format: yyyy-MM-dd HH:mm:ss

sessionInfo.name

string

New session

Session name. The default is "New session" when first created. To modify the session name, you need to call updateSession to update.

Response example
{
    "JSONIFY_PRETTYPRINT_REGULAR": false,
    "code": "llm/ok",
    "data": {
        "sessionInfo": {
            "createTime": "2025-10-24 16:03:54",
            "emailPrefix": "admin",
            "id": 12886164,  // Session ID, the most important field. You can record it for use in subsequent interfaces such as retrieving session information and other related interfaces.
            "isExpired": false,
            "lastActiveTime": "2025-10-24 16:03:54",
            "name": "新的会话"
        }
    },
    "msg": {}
}
Last updated: 2026.06.02 14:53:16