CreateDataAgentSession
Create a DataAgent session
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:CreateDataAgentSession |
create |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DMSUnit |
string |
No |
The current DMS unit. |
cn-hangzhou |
| Title |
string |
No |
The session title. Supports Chinese and English. Maximum length: 128 characters. |
帮我分析一下这份数据,给出报告。 |
| File |
string |
No |
The file ID. |
f-8*******01m |
| SessionConfig |
object |
No |
The session configuration. |
|
| Language |
string |
No |
The language. Valid values:
|
CHINESE |
| CustomAgentId |
string |
No |
The custom agent ID. |
ca-e*******ckd |
| CustomAgentStage |
string |
No |
The custom agent stage. Valid values:
|
debug |
| Mode |
string |
No |
The mode. Valid values:
|
ANALYSIS |
| EnableSearch |
boolean |
No |
Specifies whether to enable web search. |
false |
| McpServerIds |
array |
No |
A list of MCP server IDs. |
|
|
string |
No |
The MCP server ID. |
2q1tu90**********6uttu2nw |
|
| KbUuidList |
array |
No |
||
|
string |
No |
|||
| UserOssBucket |
string |
No |
The OSS bucket name.
|
user-oss-bucket |
| EncryptType |
string |
No |
||
| EncryptKey |
string |
No |
||
| ReportWaterMark |
string |
No |
||
| ReportPageWidth |
integer |
No |
||
| WorkspaceId |
string |
No |
The workspace ID. |
12**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| RequestId |
string |
The request ID. |
1CB***********3F1A |
| Data |
object |
The response structure. |
|
| SessionId |
string |
The agent session ID. |
976*********p |
| SessionStatus |
string |
The session status. |
RUNNING |
| AgentId |
string |
The agent ID. |
cu0cs*******mf |
| AgentStatus |
string |
The agent status. |
RUNNING |
| Title |
string |
The session title. |
帮我分析一下这份数据,给出报告。 |
| File |
string |
The ID of the associated file. |
f-8*******01m |
| SessionConfig |
object |
The session configuration. |
|
| Language |
string |
The language. Valid values:
|
CHINESE |
| CustomAgentId |
string |
The custom agent ID. |
ca-e*******ckd |
| CustomAgentStage |
string |
The stage of the custom agent. Valid values:
|
debug |
| Mode |
string |
The mode. Valid values:
|
ANALYSIS |
| EnableSearch |
boolean |
Indicates whether web search is enabled. |
true |
| McpServerIds |
array |
A list of MCP server IDs. |
|
|
string |
An MCP server ID. |
2q1tu90**********6uttu2nw |
|
| KbUuidList |
array |
||
|
string |
|||
| UserOssBucket |
string |
The name of the user's OSS bucket.
|
user-oss-bucket |
| EncryptType |
string |
||
| EncryptKey |
string |
||
| ReportWaterMark |
string |
||
| ReportPageWidth |
integer |
||
| CreateTime |
integer |
The time when the session was created, in Unix milliseconds. |
1765262307992 |
| Saved |
boolean |
Indicates whether the current user has favorited the session. |
false |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| ErrorCode |
string |
The error code. |
success |
| ErrorMessage |
string |
The error message returned if the request fails. |
UnknownError |
Examples
Success response
JSON format
{
"RequestId": "1CB***********3F1A",
"Data": {
"SessionId": "976*********p",
"SessionStatus": "RUNNING",
"AgentId": "cu0cs*******mf",
"AgentStatus": "RUNNING",
"Title": "帮我分析一下这份数据,给出报告。",
"File": "f-8*******01m",
"SessionConfig": {
"Language": "CHINESE",
"CustomAgentId": "ca-e*******ckd",
"CustomAgentStage": "debug",
"Mode": "ANALYSIS",
"EnableSearch": true,
"McpServerIds": [
"2q1tu90**********6uttu2nw"
],
"KbUuidList": [
""
],
"UserOssBucket": "user-oss-bucket",
"EncryptType": "",
"EncryptKey": "",
"ReportWaterMark": "",
"ReportPageWidth": 0
},
"CreateTime": 1765262307992,
"Saved": false
},
"Success": true,
"ErrorCode": "success",
"ErrorMessage": "UnknownError"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.