Registers an OSS file for a knowledge base.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:RegisterKnowledgeBaseFile |
update |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the knowledge base. |
cn-beijing |
| KnowledgeBaseId |
string |
Yes |
The knowledge base ID. |
pkb-2ze123456789abcd |
| FilePath |
string |
Yes |
The OSS object key of the uploaded file, excluding the oss://BucketName/ prefix. |
pks-2ze123456789abcd/pkb-2ze123456789abcd/example.pdf |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| FileId |
string |
The file ID generated by the server. |
3566626f-3cc5-57a3-904c-e777b39baa3d |
| FileName |
string |
The file name. |
example.pdf |
| FilePath |
string |
The OSS object key of the registered file. |
pks-2ze123456789abcd/pkb-2ze123456789abcd/example.pdf |
| Idempotent |
boolean |
Indicates whether an existing idempotent record is matched. Valid values:
|
false |
| RequestId |
string |
The request ID. |
9C3E5A7B-12D4-4F68-9A01-2B3C4D5E6F70 |
| Status |
string |
The file processing status. |
DISPATCHED |
Examples
Success response
JSON format
{
"FileId": "3566626f-3cc5-57a3-904c-e777b39baa3d",
"FileName": "example.pdf",
"FilePath": "pks-2ze123456789abcd/pkb-2ze123456789abcd/example.pdf",
"Idempotent": false,
"RequestId": "9C3E5A7B-12D4-4F68-9A01-2B3C4D5E6F70",
"Status": "DISPATCHED"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.