首页 DescribeDataAgentSession

DescribeDataAgentSession

更新时间: 2026-06-26 06:25:00

Retrieves the description of a DataAgent session.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dms:DescribeDataAgentSession

create

*全部资源

*

None None

Request parameters

Parameter

Type

Required

Description

Example

DMSUnit

string

No

The current DMS unit.

cn-hangzhou

SessionId

string

No

The DataAgent session ID. You can obtain this ID by calling CreateDataAgentSession.

c61n7gm******rj

WorkspaceId

string

No

The workspace ID.

12****

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

18****-*****-*******7A3122F

Data

object

The response struct.

SessionId

string

The agent session ID.

976*********p

SessionStatus

string

The session status.

RUNNING

AgentId

string

The current agent ID.

cu0cs*******mf

AgentStatus

string

The current agent status.

RUNNING

Title

string

The title.

分析一下这份文件,给出报告。

ChatHistoryLocations

array<object>

The chat replay history.

object

The chat replay element.

Key

string

The key of the chat replay history.

testKey1

Url

string

The OSS download URL of the chat replay history.

****

File

string

The file ID.

f-8*******01m

SessionConfig

object

The session configuration item.

Language

string

The language. Valid values:

  • CHINESE: Chinese.

  • ENGLISH: English.

CHINESE

CustomAgentId

string

The custom Agent ID.

ca-e*******ckd

CustomAgentStage

string

The stage of the custom Agent. Valid values:

  • debug: Debug stage.

  • prod: Production stage.

debug

Mode

string

The mode. Valid values:

  • ASK_DATA: Ask data mode.

  • ANALYSIS: Analysis mode.

  • INSIGHT: Insight mode.

ANALYSIS

EnableSearch

boolean

Specifies whether to enable web search.

True

McpServerIds

array

The list of MCP server IDs in the session configuration.

string

The MCP server ID in the session configuration.

2q1tu90**********6uttu2nw

KbUuidList

array

本次会话的知识库 ID 列表

string

单个知识库 ID

asdf****zsdv

UserOssBucket

string

The name of the user OSS bucket.

  • Analysis process files and report artifacts can be uploaded to the user-specified OSS bucket.

user-oss-bucket

EncryptType

string

产物存放到 OSS(含内置和用户)的加密类型

null

EncryptKey

string

产物存放到 OSS(含内置和用户)的加密秘钥,通常在 CreateDataAgentSession 中指定

ay***1Te

ReportWaterMark

string

报告水印

""

ReportPageWidth

integer

报告页面宽度

300mm

CreateTime

integer

The time when the session was created.

1731645908000

Saved

boolean

Indicates whether the session is saved to favorites by the current user.

true

FavoriteInWorkspace

string

Indicates whether the session is saved to favorites in the workspace by the current user.

true

UserId

string

The ID of the session owner.

2096******

Artifacts

array<object>

The list of artifacts produced by the session. Currently, only reports are included.

object

Id

string

产物 ID,全局唯一。如果是通过 SendChatMessage 指定 MessageType 为 REPORT 产出的报告,则产物 ID 会和 SendChatMessage 接口返回值中的 MessageId 保持一致。

bab******33e1

Type

string

产物类型。当前可能为:[TextReport, WebReport]

WebReport

Status

string

产物状态。当前可能为如下枚举之一:

  • PENDING,表示后端已收到任务,尚未启动

  • RUNNING,表示后端已启动任务,尚未完成

  • SUCCESS,表示任务已成功,可在 LIstFileUpload 接口中查询到文件信息

  • FAILED,表示任务已失败

PENDING

Name

string

产物名称,通常为工程拼接的字符串,会和 LIstFileUpload 接口的 name 字段对齐,可以通过该字段关联查询到产物文件的下载链接。

report_****_2026****

Description

string

产物的简要描述,可能为空。

a simple report

ReceiveTime

string

后端收到该产物请求的时间,UNIX 时间戳,精确到秒

1778743587

StartTime

string

后端实际开始运行该产物任务的时间。UNIX 时间戳,精确到秒

1778743587

FinishTime

string

后端完成该产物任务的时间。UNIX 时间戳,精确到秒

1778743587

DataSources

array<object>

The list of data sources used in the current session.

object

Category

string

数据源来源。当前包含如下枚举

  • CHAT: 来自对话中通过 CreateDataAgentSession 或 SendChatMessage 接口指定

  • CUSTOM_AGENT: 来自自定义 Agent 中预设的分析数据范围

CHAT

Detail

string

数据源详情。

当 Category 是 CHAT 或者 CUSTOM_AGENT 的时候,Detail 的结构和 SendChatMessage 接口的 DataSources 中单个元素的结构是对齐的。

{}

RecallResults

array<object>

The recall results from the knowledge base and memory for this session.

object

Type

string

召回知识类别

memory

Content

string

召回知识块内容

sky is blue

Score

number

此条数据的相似度分数,其分数算法和创建索引时指定的算法(l2/ip/cosine)相关。

0.65

Success

boolean

The return value. Valid values:

  • true: The operation was successful.

  • false: The operation failed.

true

ErrorCode

string

The error code.

success

ErrorMessage

string

The error message returned if the call failed.

UnknownError

Examples

Success response

JSON format

{
  "RequestId": "18****-*****-*******7A3122F",
  "Data": {
    "SessionId": "976*********p",
    "SessionStatus": "RUNNING",
    "AgentId": "cu0cs*******mf",
    "AgentStatus": "RUNNING",
    "Title": "分析一下这份文件,给出报告。",
    "ChatHistoryLocations": [
      {
        "Key": "testKey1",
        "Url": "****"
      }
    ],
    "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": 1731645908000,
    "Saved": true,
    "FavoriteInWorkspace": "true",
    "UserId": "2096******",
    "Artifacts": [
      {
        "Id": "",
        "Type": "",
        "Status": "",
        "Name": "",
        "Description": "",
        "ReceiveTime": "",
        "StartTime": "",
        "FinishTime": ""
      }
    ],
    "DataSources": [
      {
        "Category": "",
        "Detail": ""
      }
    ],
    "RecallResults": [
      {
        "Type": "",
        "Content": "",
        "Score": 0
      }
    ]
  },
  "Success": true,
  "ErrorCode": "success",
  "ErrorMessage": "UnknownError"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.

阿里云首页 数据管理 相关技术圈