ListMaterialDocuments
Retrieve the list of materials from the Material Library.
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 |
|---|---|---|---|---|
aimiaobi:ListMaterialDocuments | list | *All Resource
| None | None |
Request parameters
Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| AgentKey | string | Yes | Unique identifier for the workspace: AgentKey | 33a2658aaabf4c24b45d50e575125311_p_beebot_public |
| Query | string | No | Supports comprehensive queries for title, content, and content. | 小猫 |
| Id | integer | No | Material primary key ID. | 69 |
| Title | string | No | Performs a full-text search on material titles. | 新闻标题 |
| DocType | string | No | Document type (html: web page, plainText: plain text, image: image, pdf: pdf, word: word, excel: excel, csv: csv, jsonLine: jsonLine) | jsonLine |
| DocTypeList | array | No | Document type list (html: web page, plainText: plain text, image: image, pdf: pdf, word: word, excel: excel, csv: csv, jsonLine: jsonLine) | excel |
string | No | File type object. | html | |
| Content | string | No | Full-text search of document content | 新闻内容 |
| ShareAttr | integer | No | Share property: 0: personal private, 1: shared within the workspace. | 1 |
| Keywords | array | No | Document keywords. | |
string | No | Keyword. | 关键词 | |
| CreateTimeStart | string | No | Creation time - start range. Format: yyyy-MM-dd HH:mm:ss | 2023-02-19 07:28:11 |
| CreateTimeEnd | string | No | Creation time - end range. Format: yyyy-MM-dd HH:mm:ss | 2023-03-18 02:00:00 |
| UpdateTimeStart | string | No | Update time - start range. Format: yyyy-MM-dd HH:mm:ss | 2023-03-18 02:00:00 |
| UpdateTimeEnd | string | No | Update time - end range. Format: yyyy-MM-dd HH:mm:ss | 2023-03-18 03:00:00 |
| GeneratePublicUrl | boolean | No | Generate a public URL for the file. | true |
| Current | integer | No | Current page number. | 1 |
| Size | integer | No | Number of items per page. Default is 10. | 10 |
Response elements
Element | Type | Description | Example |
|---|---|---|---|
object | Returns the paginated list of materials. | ||
| Code | string | Status code. | DataNotExists |
| Current | integer | Current page number. | 1 |
| Data | array<object> | List object. | |
array<object> | Material object. | ||
| Author | string | Author. | 作者 |
| CreateTime | string | Creation time. | 2023-03-18 02:00:00 |
| CreateUser | string | Creator user ID. | "1" |
| CreateUserName | string | Creator username. | 创建用户名 |
| DocKeywords | array | Document tags used for categorization. Separate keywords with commas. | |
string | Keyword. | 关键词 | |
| DocType | string | Document type: pdf, word, url, or image. | |
| ExternalUrl | string | URL uploaded by an external customer, used only for record keeping. | |
| HtmlContent | string | Web page content. | 网页内容 |
| Id | integer | Primary key. | 35 |
| PubTime | string | Publish time. Format: yyyy-MM-dd HH:mm:ss | 2023-03-18 02:00:00 |
| PublicUrl | string | Temporary public URL. | |
| ShareAttr | integer | Public property, stored by bit. The first bit indicates if it is shared within the workspace, the second bit indicates if it is shared within the tenant, and the third bit indicates if it is shared system-wide. | 1 |
| SrcFrom | string | Document source: user_upload, search, or viewpoint. | user_upload |
| Summary | string | Document summary. | 摘要 |
| TextContent | string | Parsed text content. This is empty for images. | 文档内容 |
| ThumbnailInBase64 | string | Base64 thumbnail for image document types. | base64编码的图像二进制数据 |
| Title | string | Document title. | 文档标题 |
| UpdateTime | string | Modification time. | 2023-03-18 02:00:00 |
| UpdateUser | string | Modifier user ID. | "1" |
| UpdateUserName | string | The name of the user who updated the document. | 更新用户名 |
| Url | string | URL for internal document storage. Supports multiple protocols (http://, file://, ftp://). This URL is saved to internal storage when a customer uploads a file, stored long-term, and deleted upon expiration. | |
| FileKey | string | Unique file identity. | oss://default/oss-bucket-name/aimiaobi/2021/07/01/1625126400000/1.docx |
| FileAttr | object | Media file properties. | |
| Duration | number | Duration. | 120 |
| FileName | string | File name. | xxx.mp4 |
| Width | integer | Video width. | 100 |
| MimeType | string | File MIME type. | image/png |
| FileLength | integer | File content length. | 1048576 |
| Height | integer | Video height. | 1024 |
| HttpStatusCode | integer | HTTP status code. | 200 |
| Message | string | Error description. | 数据不存在 |
| RequestId | string | Unique request identity. | 3f7045e099474ba28ceca1b4eb6d6e21 |
| Size | integer | Number of records per page. | 10 |
| Success | boolean | Is successful: true for success, false for failure. | false |
| Total | integer | Total number of records. | 100 |
Examples
Success response
JSON format
{
"Code": "DataNotExists",
"Current": 1,
"Data": [
{
"Author": "作者\n\n",
"CreateTime": "2023-03-18 02:00:00\n",
"CreateUser": "\"1\"",
"CreateUserName": "创建用户名",
"DocKeywords": [
"关键词"
],
"DocType": "pdf",
"ExternalUrl": "https://www.example.com\n",
"HtmlContent": "网页内容",
"Id": 35,
"PubTime": "2023-03-18 02:00:00\n",
"PublicUrl": "https://www.example.com\n",
"ShareAttr": 1,
"SrcFrom": "user_upload",
"Summary": "摘要",
"TextContent": "文档内容",
"ThumbnailInBase64": "base64编码的图像二进制数据",
"Title": "文档标题\n\n",
"UpdateTime": "2023-03-18 02:00:00\n",
"UpdateUser": "\"1\"",
"UpdateUserName": "更新用户名",
"Url": "https://www.example.com",
"FileKey": "oss://default/oss-bucket-name/aimiaobi/2021/07/01/1625126400000/1.docx",
"FileAttr": {
"Duration": 120,
"FileName": "xxx.mp4",
"Width": 100,
"MimeType": "image/png",
"FileLength": 1048576,
"Height": 1024
}
}
],
"HttpStatusCode": 200,
"Message": "数据不存在",
"RequestId": "3f7045e099474ba28ceca1b4eb6d6e21",
"Size": 10,
"Success": false,
"Total": 100
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.