All Products
Search
Document Center

PolarDB:RegisterKnowledgeBaseFile

Last Updated:Sep 10, 2026

Registers an OSS file in a knowledge base.

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.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where the knowledge base resides.

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, which is generated by the server based on the ETL rules for native OSS files.

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:

  • true: An existing idempotent record is matched.

  • false: No existing idempotent record is matched.

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.