Queries the basic information of a file in application data, including the file name, type, and status.
Operation description
-
A Resource Access Management (RAM) user must first obtain API permissions for Model Studio (
AliyunBailianDataFullAccessorAliyunBailianDataReadOnlyAccess, both of which include the sfm:DescribeFile permission), and join a workspace before invoking this operation. An Alibaba Cloud account can invoke this operation directly without authorization. Use the latest Model Studio SDK to invoke this operation. -
This operation is idempotent.
Throttling: This operation is throttled if called too frequently. Do not exceed 10 calls per second. If you are throttled, retry later.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sfm:DescribeFile |
none |
*All Resource
|
None | None |
Request syntax
GET /{WorkspaceId}/datacenter/file/{FileId}/ HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| WorkspaceId |
string |
Yes |
The ID of the workspace to which the file belongs. For more information about how to obtain the workspace ID, see How to use a workspace. |
llm-3shx2gu255oqxxxx |
| FileId |
string |
Yes |
The file ID, which is the |
file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Code |
string |
The error status code. |
Success |
| Data |
object |
The data field returned by the operation. |
|
| CategoryId |
string |
The ID of the category to which the file belongs. |
cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx |
| CreateTime |
string |
The timestamp when the file was added to Model Studio. Format: yyyy-MM-dd HH:mm:ss. Time zone: UTC+8. |
2024-09-09 12:45:43 |
| FileId |
string |
The file ID. |
file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx |
| FileName |
string |
The file name. |
XXX产品介绍.pdf |
| FileType |
string |
The file type (extension). Possible values: pdf, docx, doc, txt, md, pptx, ppt, xlsx, xls, html, png, jpg, jpeg, bmp, and gif. |
|
| Parser |
string |
The parser type used to parse the file. Possible values:
|
DASHSCOPE_DOCMIND |
| SizeInBytes |
integer |
The file size, in bytes. |
1234 |
| Status |
string |
For files used in unstructured knowledge bases (type: UNSTRUCTURED), possible values:
|
PARSE_SUCCESS |
| Tags |
array |
The list of tags associated with the file. A file can be associated with multiple tags. |
|
|
string |
The tag of the file. |
产品介绍 |
|
| ParseResultDownloadUrl |
string |
||
| ParseErrorMessage |
string |
The reason for the parsing failure. |
Error Message |
| Message |
string |
The error message. |
Requests throttling triggered. |
| RequestId |
string |
The request ID. |
17204B98-xxxx-4F9A-8464-2446A84821CA |
| Status |
string |
The status code returned by the operation. |
200 |
| Success |
boolean |
Indicates whether the call was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"Code": "Success",
"Data": {
"CategoryId": "cate_cdd11b1b79a74e8bbd675c356a91ee3xxxxxxxx",
"CreateTime": "2024-09-09 12:45:43",
"FileId": "file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx",
"FileName": "XXX产品介绍.pdf",
"FileType": "pdf",
"Parser": "DASHSCOPE_DOCMIND",
"SizeInBytes": 1234,
"Status": "PARSE_SUCCESS",
"Tags": [
"产品介绍"
],
"ParseResultDownloadUrl": "",
"ParseErrorMessage": "Error Message"
},
"Message": "Requests throttling triggered.",
"RequestId": "17204B98-xxxx-4F9A-8464-2446A84821CA",
"Status": "200",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.