Queries the list of files in a knowledge base.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:DescribeKnowledgeBaseFiles |
get |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. |
cn-beijing |
| KnowledgeBaseId |
string |
Yes |
The unique identifier of the knowledge base. |
pkb-xxxxx |
| PageNumber |
integer |
No |
The page number. |
1 |
| PageSize |
integer |
No |
The number of records per page. |
20 |
| SourceType |
string |
No |
The source type. |
OSS |
| Keyword |
string |
No |
The keyword for the file name. |
FinancialReport |
| FileIds |
string |
No |
The list of file IDs, separated by commas. |
doc_a,doc_b |
| LinkId |
string |
No |
The unique identifier of the synchronization link. |
pkbl-2ze123456789abc |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
CED079B7-A408-41A1-BFF1-EC608E****** |
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of records per page. Valid values: 30, 50, and 100. Default value: 30. |
30 |
| TotalRecordCount |
integer |
The total number of records. |
9 |
| PageRecordCount |
integer |
The number of records on the current page. |
9 |
| Items |
array<object> |
The list of files. |
|
|
array<object> |
The file details. |
||
| FileId |
string |
The file ID. |
5b2dbb13-xxxx-xxxx-xxxx-a55fe8daec8f |
| KnowledgeSpaceId |
string |
The knowledge space ID. |
pks-xxxxxx |
| KnowledgeBaseId |
string |
The knowledge base ID. |
pkb-xxxxxx |
| FileName |
string |
The file name. |
FinancialReport.pdf |
| OSSPath |
string |
The OSS file path. |
oss://test-bucket-example/pks-xxxx/pkb-xxxx/FinancialReport.pdf |
| FileSize |
integer |
The file size in bytes. |
318881 |
| FileType |
string |
The file type. |
|
| ShardCount |
integer |
The number of shards. |
10 |
| ShardingStrategyConfig |
object |
The chunking strategy configuration currently in effect for the document. This value may be empty if the complete configuration was not saved for existing instances. |
|
| DefaultStrategy |
object |
The default chunking strategy type. Valid values: hybrid and hierarchical. |
|
| Type |
string |
The default chunking strategy type. Valid values: hybrid and hierarchical. |
hybrid |
| Parameters |
object |
The parameter list. |
|
| MaxTokens |
integer |
The maximum number of tokens per shard. |
512 |
| MergePeers |
boolean |
Specifies whether to merge adjacent small shards under the same heading. |
true |
| Rules |
array<object> |
The list of override rules matched in order. |
|
|
array<object> |
The rule details. |
||
| Match |
object |
The content type. Currently, table is supported. |
|
| ContentType |
string |
The content type. Currently, table is supported. |
table |
| Strategy |
object |
The chunking strategy. |
|
| Type |
string |
The chunking strategy type after a rule is matched. |
hierarchical |
| Parameters |
object |
The parameter list. |
|
| MaxTokens |
integer |
The maximum number of tokens per shard for matched content. |
512 |
| MarkdownTables |
string |
The Markdown table processing mode. Valid values: auto, on, and off. |
auto |
| InheritSpaceStrategy |
boolean |
Indicates whether the knowledge space chunking strategy is inherited. |
true |
| Status |
string |
The status. |
COMPLETED |
| ErrorMessage |
string |
The error message. |
Not Support. |
| Metadata |
object |
The document metadata. |
{} |
| SourceType |
string |
The source type. |
OSS |
| UploadTime |
string |
The upload time. The time is in ISO 8601 format in UTC (format: YYYY-MM-DDTHH:mm:ssZ). |
2026-06-15T22:28:53Z |
| UpdatedAt |
string |
The update time. The time is in ISO 8601 format in UTC (format: YYYY-MM-DDTHH:mm:ssZ). |
2026-06-15T22:28:53Z |
Examples
Success response
JSON format
{
"RequestId": "CED079B7-A408-41A1-BFF1-EC608E******",
"PageNumber": 1,
"PageSize": 30,
"TotalRecordCount": 9,
"PageRecordCount": 9,
"Items": [
{
"FileId": "5b2dbb13-xxxx-xxxx-xxxx-a55fe8daec8f",
"KnowledgeSpaceId": "pks-xxxxxx",
"KnowledgeBaseId": "pkb-xxxxxx",
"FileName": "Financial_report.pdf",
"OSSPath": "oss://test-bucket-example/pks-xxxx/pkb-xxxx/Financial_report.pdf",
"FileSize": 318881,
"FileType": "pdf",
"ShardCount": 10,
"ShardingStrategyConfig": {
"DefaultStrategy": {
"Type": "hybrid",
"Parameters": {
"MaxTokens": 512,
"MergePeers": true
}
},
"Rules": [
{
"Match": {
"ContentType": "table"
},
"Strategy": {
"Type": "hierarchical",
"Parameters": {
"MaxTokens": 512,
"MarkdownTables": "auto"
}
}
}
]
},
"InheritSpaceStrategy": true,
"Status": "COMPLETED",
"ErrorMessage": "Not Support.",
"Metadata": {},
"SourceType": "OSS",
"UploadTime": "2026-06-15T22:28:53Z",
"UpdatedAt": "2026-06-15T22:28:53Z"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.