Lists the documents in a knowledge base.
Try it now
Test
RAM authorization
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| KbUuid |
string |
Yes |
The ID of the knowledge base. |
kb-*** |
| NextToken |
string |
No |
The pagination token to retrieve the next page of results. Omit this parameter to retrieve the first page. A |
zCXSmY0CJbybp6FZV7vo0Wjw64X-***** |
| MaxResults |
integer |
No |
The maximum number of documents to return per page. Valid values: 1 to 100. Default value: 20. |
20 |
| NamePattern |
string |
No |
The document name filter. Returns only documents whose names contain this value. |
test |
| SortFieldName |
string |
No |
The sort field. Valid values:
|
hits |
| SortOrder |
string |
No |
The sort order. Valid values:
|
DESC |
| Filters |
string |
No |
The document property filter. The following properties are supported:
|
{"fileExt":"pdf","state":0} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response structure. |
||
| RequestId |
string |
The unique request ID. Use this ID to troubleshoot issues. |
67E910F2-4B62-5B0C-ACA3-7547695C**** |
| TotalCount |
integer |
The total number of documents that meet the specified criteria. This parameter is not currently supported and always returns 0. |
0 |
| Data |
array |
A list of documents. |
|
| OneMetaKnowledgeBaseDocument |
The response structure. |
||
| NextToken |
string |
The pagination token. |
zCXSmY0CJbybp6FZV7vo0Wjw64X-***** |
| MaxResults |
integer |
The page size. |
20 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| ErrorCode |
string |
The error code, returned only when the request fails. |
KnowledgeBaseNotFound |
| ErrorMessage |
string |
The error message, returned only when the request fails. |
Resource not found kb-*** |
Examples
Success response
JSON format
{
"RequestId": "67E910F2-4B62-5B0C-ACA3-7547695C****",
"TotalCount": 0,
"Data": [
{
"KbUuid": "",
"Name": "",
"Description": "",
"FileExt": "",
"DocumentLoaderName": "",
"TextSplitterName": "",
"GmtCreate": "",
"GmtModified": "",
"FileSize": 0,
"DocsCount": 0,
"State": 0,
"Summary": "",
"Keywords": ""
}
],
"NextToken": "zCXSmY0CJbybp6FZV7vo0Wjw64X-*****",
"MaxResults": 20,
"Success": true,
"ErrorCode": "KnowledgeBaseNotFound",
"ErrorMessage": "Resource not found kb-***"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.