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
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.
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
Actionelement 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
Resourceelement of the policy. - For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the
Resourceelement of the policy.
- For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the
-
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 |
|---|---|---|---|---|
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 Product Introduction.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. | Product introduction | |
| 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.