Skip to main content

Get File

Retrieve file metadata

GET
/api/v1/agentstudio/files/{file_id}
cURL
curl --request GET \
  --url 'https://{workspace_id}.{region}.maas.aliyuncs.com/api/v1/agentstudio/files/{file_id}' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
{
  "id": "file_xxx",
  "type": "file",
  "filename": "sales_2025.csv",
  "downloadable": false,
  "mime_type": "text/csv",
  "size_bytes": 524288,
  "status": "available",
  "created_at": "2026-06-16T14:51:39+08:00",
  "requestId": "xxx"
}
Returns metadata such as filename, size_bytes, mime_type, created_at, and status; content is not included. Commonly used to confirm whether the post-upload safety review status has transitioned to available. The scope field is returned only for internal copies inside the session sandbox.

File status

status indicates the safety review result. Only files with the available status can be mounted to a session or referenced as message content.
statusDescription
availableReview passed; can be mounted or used as message content
checkingUnder review
rejectedContent failed the review
type_rejectedFile type not supported

Authorizations

string
header
required

DashScope API Key

Path Parameters

string
required

文件 ID

Response

200-application/json
string

文件 ID,格式如 file_kyu8k8lut4d4x47ii7qf92yk

string

固定为 file

string

文件名

boolean

是否支持下载,当前接口直传与会话沙箱拷贝均为 false

string

服务端检测的 MIME 类型

integer

文件大小,单位字节

enum<string>

安全审核状态:available / checking / rejected / type_rejected

available,checking,rejected,type_rejected
object

仅会话沙箱内部拷贝返回,结构 {"type": "session", "id": "sesn_..."};普通上传文件不返回该字段

string

上传时间,ISO 8601

string

本次请求的唯一标识