Retrieves the details of one or more documents in a specified category.
Operation description
-
Resource Access Management (RAM) users must first obtain API permissions for Alibaba Cloud Model Studio (requires
AliyunBailianDataFullAccess, which includes the sfm:ListFile permission), and join a workspace before invoking this operation. Alibaba Cloud accounts can invoke this operation directly without authorization. Invoke this operation by using the latest Alibaba Cloud Model Studio SDK. -
For paging on the first page, only set
MaxResultsto limit the number of entries returned. TheNextTokenin the response serves as the credential for querying subsequent pages. When querying subsequent pages, set theNextTokenparameter to theNextTokenvalue obtained from the previous response (ifNextTokenis empty, all results have been returned and no further requests are needed), and setMaxResultsto limit the number of entries returned. -
This operation is idempotent.
Rate limit: This operation is throttled if called too frequently. Do not exceed 5 calls per second. If throttled, retry later.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sfm:ListFile |
list |
*All Resource
|
None | None |
Request syntax
GET /{WorkspaceId}/datacenter/files HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| WorkspaceId |
string |
Yes |
The workspace ID to which the category belongs. For information about how to obtain the workspace ID, see How to use a workspace. |
llm-3shx2gu255oqxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CategoryId |
string |
Yes |
The category ID, which is the . |
cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx |
| NextToken |
string |
No |
The pagination token. Set this to the NextToken value returned by the previous API call. |
AAAAAdH70eOCSCKtacdomNzak4U= |
| MaxResults |
integer |
No |
The number of entries per page for paging. Valid values: 1 to 200. Default value: If no value is set or the value is less than 1, the default value is 20. If the value is set to greater than 200, the default value is 200. |
20 |
| FileName |
string |
No |
The file name (without extension). Only exact match is supported. Fuzzy search is not supported. |
product-overview |
| FileIds |
array |
No |
The list of file IDs to query. A maximum of 20 files can be queried at a time. |
|
|
string |
No |
The file ID. |
file_xxxx |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Code |
string |
The error code. |
success |
| Data |
object |
The data field returned by the operation. |
|
| FileList |
array<object> |
The list of files in the category. |
|
|
object |
The file object. |
||
| CategoryId |
string |
The ID of the category to which the file belongs. |
cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx |
| CreateTime |
string |
The timestamp when the file was added to Alibaba Cloud Model Studio. Format: yyyy-MM-dd HH:mm:ss. Time zone: UTC+8. |
2024-09-09 11:03:35 |
| FileId |
string |
The file ID, which is the |
file_5ff599b3455a45db8c41b0054b361518_xxxxxxxx |
| FileName |
string |
The file name. |
product-overview.pdf |
| FileType |
string |
The file format type. Valid values: pdf, docx, doc, txt, md, pptx, ppt, xlsx, xls, html, png, jpg, jpeg, bmp, and gif. |
docx |
| Parser |
string |
The document parser. Valid values:
|
DASHSCOPE_DOCMIND |
| SizeInBytes |
integer |
The file size in bytes. |
512 |
| Status |
string |
The file parsing status. Valid values:
|
PARSE_SUCCESS |
| ParseErrorMessage |
string |
Error Message |
|
| Tags |
array |
The list of tags associated with the file. A document can be associated with multiple tags. |
|
|
string |
The file tag. |
tag-A |
|
| HasNext |
boolean |
Indicates whether there is a next page of category data that matches the query conditions. Valid values:
|
true |
| MaxResults |
integer |
The number of entries per page for paging. |
20 |
| NextToken |
string |
The pagination token returned by this call. |
4jzbJk9J6lNeuXD9hP0viA== |
| TotalCount |
integer |
The total number of entries in the returned results. |
48 |
| Message |
string |
The error message. |
Requests throttling triggered. |
| RequestId |
string |
The request ID. |
8F97A63B-xxxx-527F-9D6E-467B6A7E8CF1 |
| Status |
string |
The status code returned by the operation. |
200 |
| Success |
boolean |
Indicates whether the operation was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"Code": "success",
"Data": {
"FileList": [
{
"CategoryId": "cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx",
"CreateTime": "2024-09-09 11:03:35",
"FileId": "file_5ff599b3455a45db8c41b0054b361518_xxxxxxxx",
"FileName": "product-overview.pdf",
"FileType": "docx",
"Parser": "DASHSCOPE_DOCMIND",
"SizeInBytes": 512,
"Status": "PARSE_SUCCESS",
"ParseErrorMessage": "Error Message",
"Tags": [
"tag-A"
]
}
],
"HasNext": true,
"MaxResults": 20,
"NextToken": "4jzbJk9J6lNeuXD9hP0viA==",
"TotalCount": 48
},
"Message": "Requests throttling triggered.",
"RequestId": "8F97A63B-xxxx-527F-9D6E-467B6A7E8CF1",
"Status": "200",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.