Retrieves a list of documents from a document library. This operation supports paged queries and filtering by document status.
Operation description
Prerequisites
- Alibaba Cloud Model Studio and the Tongyi Gold service are activated.
- Obtain the workspaceId: get the workspace identity.
Try it now
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Debug
RAM authorization
The following table lists the authorization information for this API. You can use the Action element of RAM permission policy statements to grant RAM users or RAM roles the permission to call this API. Details:
- Action: the specific permission point.
- Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types that support authorization for the operation. Details:
- For required resource types, an asterisk (*) is prefixed.
- For operations that do not support resource-level authorization,
All resourcesis used.
- Condition key: the condition keys defined by the cloud service itself.
- Dependent action: the other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| dianjin:GetDocumentList | get | *All resources * |
| None |
Request syntax
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | Path parameter, workspace ID. | llm-xxxx |
| page | integer | No | Page number | 1 |
| pageSize | integer | No | Page size | 10 |
| status | string | No | Document status | Soon to be available |
| libraryId | string | Yes | Document library ID | 3akzl28vap |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | The returned result. | ||
| cost | long | Time consumed | null |
| data | object | Response data | |
| currentPage | long | Current page number (paging parameter). | 1 |
| pageSize | long | Page size (paging parameter). | 10 |
| records | array<object> | Records | |
| record | object | ||
| docId | string | Document ID | 8326748346 |
| documentMeta | object | Document metadata | |
| fileType | string | Document type | |
| gmtCreate | string | Creation time | 2024-01-01 00:00:00 |
| gmtModified | string | Modification time | 2024-01-01 00:00:00 |
| libraryId | string | The ID of the library to which the document belongs. | skjdhshbv |
| statusCode | string | Document status (WaitRefresh: waiting for refresh, InQueue: pending, FetchingData: retrieving data, Embedding: processing document, Error: error, Completed: available, Null: unknown) | WaitRefresh |
| title | string | Document title | test |
| url | string | The document URL (this field will be deprecated). The value is empty. To get the document URL, use the GetDocumentUrl operation. | null |
| totalPages | long | Total number of pages (paging parameter). | 10 |
| totalRecords | long | Total number of records. | 100 |
| dataType | string | Data type | null |
| errCode | string | Error code | 0 |
| message | string | Error message | ok |
| requestId | string | Request ID | 5E3FBAF1-17AF-53B7-AF0A-CDCEEB6DE658 |
| success | boolean | Whether the request is successful | true |
| time | string | Timestamp | 2024-04-24 11:54:34 |
Examples
Success response
JSON format