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.
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.
Test
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:ListFile | list | *All Resource
| None | None |
Request syntax
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