Retrieves a list of documents from a document library. This operation supports paged queries and filtering by document status.
Operation description
Prerequisites
- You have activated Alibaba Cloud Model Studio and the Tongyi Gold Point service.
- You have obtained a workspace ID. For more information, see Get a workspace ID.
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 |
|---|---|---|---|---|
dianjin:GetDocumentList | get | *All Resource
| None | None |
Request syntax
Path Parameters
Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | A path parameter that specifies the workspace ID. | llm-xxxx |
Request parameters
Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| page | integer | No | The page number. | 1 |
| pageSize | integer | No | The page number. | 10 |
| status | string | No | The document status. | Soon to be available |
| libraryId | string | Yes | The document library ID. | 3akzl28vap |
Response elements
Element | Type | Description | Example |
|---|---|---|---|
object | The returned result. | ||
| cost | integer | The time consumed. | null |
| data | object | The response data. | |
| currentPage | integer | The current page number. This is a paging parameter. | 1 |
| pageSize | integer | The number of entries per page. This is a paging parameter. | 10 |
| records | array<object> | The records. | |
array<object> | |||
| docId | string | The document ID. | 8326748346 |
| documentMeta | object | The document metadata. | |
| fileType | string | The document type. | |
| gmtCreate | string | The creation time. | 2024-01-01 00:00:00 |
| gmtModified | string | The modification time. | 2024-01-01 00:00:00 |
| libraryId | string | The ID of the library to which the document belongs. | skjdhshbv |
| statusCode | string | The document status. Valid values: WaitRefresh (waiting for refresh), InQueue (pending), FetchingData (retrieving data), Embedding (processing document), Error (error), Completed (available), and Null (unknown). | WaitRefresh |
| title | string | The 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 | integer | The total number of pages. This is a paging parameter. | 10 |
| totalRecords | integer | The total number of records. | 100 |
| dataType | string | The data type. | null |
| errCode | string | The error code. | 0 |
| message | string | The error message. | ok |
| requestId | string | The request ID. | 5E3FBAF1-17AF-53B7-AF0A-CDCEEB6DE658 |
| success | boolean | Indicates whether the request was successful. | true |
| time | string | The timestamp. | 2024-04-24 11:54:34 |
Examples
Success response
JSON format