ForkKnowledgeFile

Updated at:
Copy as MD

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 parameters

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

The ADB instance ID.

am-bp19aaaaaa****

FileId

string

No

The ID of the knowledge base file. You must specify either this parameter or FileLocation, but not both. Use a decimal positive integer string without leading zeros. Valid values: 1 to 9223372036854775807.

123

FileLocation

string

No

The address of a single file in the knowledge base. You must specify either this parameter or FileId, but not both. You cannot specify a directory. The address must uniquely locate an active file.

oss://bucket/doc.pdf

UploadUser

string

No

The initial authorized user for the new record. You can pass a JSON string of a single user identifier or a user array. If omitted, no initial user authorization is applied, and the source authorization is not inherited.

["alice","bob"]

Tags

string

No

The initial business tags for the new record. Use a JSON string of a JSON object or an array of tag_key/tag_value objects. If omitted, the source tags are not inherited.

{"biz.game":"yys"}

Response elements

Element

Type

Description

Example

object

Schema of Response

Data

object

The returned data.

FileId

string

The ID of the newly created reference record, represented as a decimal string. Use this ID for subsequent management of the record. This parameter is returned only when the operation is successful.

456

FileLocation

string

The address of the new reference record, in the format of fork:///. This parameter is returned only when the operation is successful.

fork://123/456

Message

string

The description of the operation result. If the business operation fails, this parameter indicates the cause or the security error code.

Fork succeeded

OwnerFileId

string

The ID of the content host file, represented as a decimal string. Currently, this value is the same as the source file ID. This parameter is returned only when the operation is successful.

123

ProcessStatus

string

The status of the new reference record. The value is fixed to DUPLICATED. This parameter is returned only when the operation is successful.

DUPLICATED

SourceFileId

string

The ID of the source file, represented as a decimal string. This parameter is returned only when the operation is successful.

123

Success

boolean

Indicates whether the business operation is successful. If the operation fails, the Data parameter contains only Success and Message.

true

RequestId

string

Id of the request

1AD222E9-E606-4A42-BF6D-8A4442913CEF

Examples

Success response

JSON format

{
  "Data": {
    "FileId": "456",
    "FileLocation": "fork://123/456",
    "Message": "Fork 成功",
    "OwnerFileId": "123",
    "ProcessStatus": "DUPLICATED",
    "SourceFileId": "123",
    "Success": true
  },
  "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF"
}

Error codes

HTTP status code

Error code

Error message

Description

400 MDS.IllegalArgument Invalid argument. An invalid parameter is used.
400 MDS.InvalidPrivilege No permissions. You are not authorized to perform this operation.
500 MDS.InternalError An internal MDS error occurred. An internal error occurred.
500 MDS.MetaVisitError Failed to access metadata. Failed to access the metadata.
403 MDS.RamAuthAccessDenied ram auth access denied. RAM authentication failed
404 MDS.InstanceNotExist ADB instance does not exist. ADB instance does not exist

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.