Skip to main content
Session & Event

运行时挂载资源

在会话运行期间动态挂载文件

POST
/api/v1/agentstudio/sessions/{session_id}/resources
cURL
curl --request POST \
  --url 'https://{workspace_id}.{region}.maas.aliyuncs.com/api/v1/agentstudio/sessions/{session_id}/resources' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "file",
  "file_id": "file_xxx",
  "mount_path": "/uploads/workspace/late.csv"
}
'
{
  "id": "sesrsc_xxx",
  "type": "file",
  "file_id": "file_xxx",
  "mount_path": "/mnt/session/uploads/workspace/late.csv",
  "created_at": "2026-05-28T08:25:00Z",
  "updated_at": "2026-05-28T08:25:00Z",
  "request_id": "xxx"
}

Authorizations

string
header
required

DashScope API Key

Path Parameters

string
required

会话 ID,格式 sesn_<ULID>

Body

application/json
enum<string>
required

资源类型,固定为 file

file
string
required

已上传的文件 ID

string
required

挂载路径,以 /uploads 开头

Response

200-application/json
string

资源 ID,格式 sesrsc_<ULID>

string

资源类型,固定为 file

string

内部副本的文件 ID,与请求中的 file_id 不同

string

会话内的完整挂载路径

string

创建时间,ISO 8601

string

最近更新时间,ISO 8601

string

本次请求的唯一标识

Sandbox API
Token Plan API
Security API
记忆库 API
Flow Agent API
RAG API
Connector API
ParseX API
框架集成
  • 框架
Assistant API(下线中)
  • 概览