Lists detailed information for one or more documents in a specified category.
Operation description
A RAM user must obtain database permissions for Alibaba Cloud Model Studio and join a workspace before calling this API. The required permission is
AliyunBailianDataFullAccess, which includes the `sfm:ListFile` permission. An Alibaba Cloud account can call this API directly without authorization. To call this API, use the latest version of the Alibaba Cloud Model Studio SDK.To perform a paged query, use the
MaxResultsparameter to specify the number of items to return on each page. The response returns aNextToken. To retrieve the next page of results, include theNextTokenfrom the previous response in your next request. If the response does not return aNextToken, all results have been returned.This API operation is idempotent.
Throttling Frequent calls to this API are throttled. Do not call this operation more than 5 times per second. If a call is throttled, retry the call 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.1Request parameters
Parameter | Type | Required | Description | Example |
WorkspaceId | string | Yes | The ID of the workspace where the category resides. For more information, see How to use workspaces. | llm-3shx2gu255oqxxxx |
CategoryId | string | Yes | The ID of the category. This is the `CategoryId` returned by the AddCategory operation. You can also obtain the ID on the Unstructured Data tab of the Application Data page by clicking the ID icon next to the category name. | cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx |
NextToken | string | No | The token that is used to retrieve the next page of results. Set this parameter to the `NextToken` value that is returned in the previous call. | AAAAAdH70eOCSCKtacdomNzak4U= |
MaxResults | integer | No | The number of entries to return on each page. Valid values: 1 to 200. Default value: If you do not set this parameter or set it to a value less than 1, the default value is 20. If you set it to a value greater than 200, the default value is 200. | 20 |
FileName | string | No | The name of the file, excluding the extension. Only exact matches are supported. Fuzzy searches are not supported. | product-overview |
Response elements
Parameter | Type | Description | Example |
object | The response object. | ||
Code | string | The error code. | success |
| Data | object | The returned data. | |
| FileList | array<object> | A list of documents in the category. | |
object | The document object. | ||
CategoryId | string | The ID of the category to which the document belongs. | cate_cdd11b1b79a74e8bbd675c356a91ee35xxxxxxxx |
CreateTime | string | The time when the document was added to Alibaba Cloud Model Studio. The time is in the `yyyy-MM-dd HH:mm:ss` format. The time zone is UTC+8. | 2024-09-09 11:03:35 |
FileId | string | The ID of the document. This is the `FileId` returned by the AddFile operation. You can also obtain the ID by clicking the icon next to the document name on the Application Data page. | file_5ff599b3455a45db8c41b0054b361518_xxxxxxxx |
FileName | string | The name of the document. | XXXproduct-overview.pdf |
FileType | string | The format of the document. 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 size of the document in bytes. | 512 |
Status | string | The parsing status of the document. Valid values:
| PARSE_SUCCESS |
| Tags | array | A list of tags that are added to the document. You can associate multiple tags with a document. | |
string | The tag of the document. | product-overview | |
HasNext | boolean | Indicates whether a next page of results exists. Valid values:
| true |
MaxResults | integer | The number of entries returned on each page. | 20 |
NextToken | string | The token that is used to retrieve the next page of results. | 4jzbJk9J6lNeuXD9hP0viA== |
TotalCount | integer | The total number of entries returned. | 48 |
Message | string | The error message. | Requests throttling triggered. |
RequestId | string | The ID of the request. | 8F97A63B-xxxx-527F-9D6E-467B6A7E8CF1 |
Status | string | The HTTP status code. | 200 |
Success | boolean | Indicates whether the request 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": "XXXproduct-overview.pdf",
"FileType": "docx",
"Parser": "DASHSCOPE_DOCMIND",
"SizeInBytes": 512,
"Status": "PARSE_SUCCESS",
"Tags": [
"product-overview"
]
}
],
"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.