Describe File

更新时间: 2026-12-03 10:22:49

Query details of a file, including size, MD5, tags, and creation and update times.

Prerequisites

You have an Alibaba Cloud Model Studio API key (see the API Key page in the console) and authentication configured. For details, see Knowledge (formerly RAG) API overview and Authentication. Data import endpoints use the same base URL and authentication as other Knowledge (formerly RAG) APIs, with the path prefix /api/v1/connector/dash/.

Endpoint

POST /api/v1/connector/dash/describeFile

Query details of a file, including size, MD5, tags, and creation and update times.

Request body

FieldRequiredTypeDescription
fileIdYesstringFile ID. Returned by listFile.

Request example

curl -X POST "$BASE_URL/api/v1/connector/dash/describeFile" \
  -H "Authorization: Bearer $BAILIAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fileId": "file_abc123"
  }'

BASE_URL is https://{workspace_id}.cn-beijing.maas.aliyuncs.com ({workspace_id} is the Workspace ID), and BAILIAN_API_KEY is your Alibaba Cloud Model Studio API key.

Response example

Returns 200 on success.

{
  "code": "Success",
  "message": "",
  "messageUnmodified": false,
  "requestId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "data": {
    "fileId": "file_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
    "status": "PARSE_SUCCESS",
    "fileName": "a.md",
    "fileType": "md",
    "parser": "DOCMIND_DIGITAL",
    "sizeBytes": 21,
    "uploadTime": "2026-04-01 16:03:45",
    "category": "cate_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
    "tags": ["产品", "指南"],
    "aclEnabled": true,
    "aclStatus": "EXPLICIT",
    "sourcePlatform": "FEISHU",
    "aclScope": ["u:feishu:on_9f2c"],
    "aclSyncTime": "2026-11-30T08:00:00Z"
  },
  "status": 200
}

Response fields

FieldTypeDescription
codestringResponse code. Success on success.
messagestringError or informational message; an empty string on success.
requestIdstringUnique request identifier. Include this ID when reporting an issue.
dataobjectFile details. Sub-fields: fileId (string, file ID), fileName (string, file name), fileType (string, file type, such as pdf, md, or docx), category (string, ID of the category the file belongs to), status (string, file status. Enum: INIT, PARSING, PARSE_SUCCESS, FAIL), sizeBytes (integer, file size in bytes; minimum 1), parser (string, parsing method, such as DASHSCOPE_DOCMIND), uploadTime (string, upload time), tags (array<string>, file tag list), aclEnabled (boolean, whether ACL is enabled for the dataset the file belongs to), aclStatus (string, current permission status of the file; uppercase enum values are listed below), sourcePlatform (string, permission source; values are listed below), aclScope (array<string>, current identity tags of the file. Returns [] for historical files without permission records or after manual clearing; returns ["s:public"] when explicitly set to public. Source-side tags may include feishu, dtalk, or sharepoint), aclSyncTime (string, latest sync time when a permission sync record exists, in ISO 8601 UTC format, for example 2026-11-30T08:00:00Z).
statusintegerBusiness status code. 200 on success, 400 for failures such as invalid parameters. Note that the HTTP status code remains 200 even on failure, so rely on this field and code to determine the result.

ACL field values

Identity tags (aclScope)

When you set tags manually, users, departments, and groups all use the bailian source. Up to 2000 tags per call; each tag is at most 512 characters. Subject IDs must not contain whitespace or colons.

ExampleMeaning
u:bailian:10086Allows the specified user to read.
d:bailian:4521Allows the specified department to read.
g:bailian:group123Allows the specified group to read.
s:publicExplicitly public.
[]Empty tags. After import or overwrite, file details show an empty array.

Permission status (aclStatus)

ValueMeaning
UNSETNo permissions set yet, or tags have been cleared.
EXPLICITPermissions have been set; see file details for the tags.
FAILEDFailed to read or parse source-side permissions.
OVERFLOWTag count or length exceeds the limit.
UNSUPPORTEDThe collected result cannot be converted into supported permission tags.
NOT_SUPPORTEDYuque files do not support ACL.

Permission source (sourcePlatform)

ValueSourceBatch editable
LOCAL, OSSManual upload, OSS filesYes
FEISHU, DINGDING, SHAREPOINT, YUQUEFeishu, DingTalk, SharePoint, Yuque syncNo
DASH, UNKNOWNDash source, unrecognized sourceNo

Error codes

HTTP status codeError code codeDescription
400InvalidParameterInvalid request parameters. Example message: Required parameter missing or invalid.
401InvalidApiKeyAuthentication failed; the API key is invalid or missing. Example message: Invalid API-key provided.

On business failures the HTTP status code remains 200. Check status and code in the response body to determine the result.

上一篇: List Files 下一篇: Delete File
阿里云首页 大模型服务平台百炼 相关技术圈