Domain name for API request: lke.intl.tencentcloudapi.com.
This API is used to save a knowledge base document Q&As.
Three steps to store a file in the knowledge library of the application:
A maximum of 100 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: SaveDoc. |
| Version | Yes | String | Common Params. The value used for this API: 2023-11-30. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-jakarta. |
| BotBizId | Yes | String | Application ID. |
| FileName | Yes | String | File name. |
| FileType | Yes | String | File type (md|txt|docx|pdf|xlsx). |
| CosUrl | Yes | String | The cos path of the platform, consistent with the UploadPath parameter queried by the DescribeStorageCredential api. |
| ETag | Yes | String | ETag, short for entity tag, is an information tag that identifies the content of an object when it is created and can be used to check whether the content of the object has changed. |
| CosHash | Yes | String | Verify the consistency of the uploaded file on the cloud and the local file by validating the crc64 encoding in the cos_hash x-cos-hash-crc64ecma header. After the COS is successfully uploaded, obtain it from the response header. |
| Size | Yes | String | File size. |
| AttrRange | No | Integer | Applicable scope of labels: 1: all; 2: by conditional range. |
| Source | No | Integer | Source (0: source file import; 1: web page import). |
| WebUrl | No | String | Web page (or custom link) address. |
| AttrLabels.N | No | Array of AttrLabelRefer | Label reference. |
| ReferUrlType | No | Integer | External reference link type: 0: system link; 1: custom link. When the value is 1, the weburl field cannot be empty; otherwise, it will not take effect. |
| ExpireStart | No | String | Effective start time, unix timestamp. |
| ExpireEnd | No | String | Effective end time, unix timestamp. 0 indicates permanent validity. |
| IsRefer | No | Boolean | Whether to reference a link. |
| Opt | No | Integer | Document operation type: 1: batch import (import Q&A pairs in batches); 2: document import (normally import a single document). The default value is 1. Please note that when opt = 1, please download the Excel template from the Tencent Cloud Agent Development Platform/ADP page. |
| CateBizId | No | String | Category ID. |
| IsDownload | No | Boolean | |
| DuplicateFileHandles.N | No | Array of DuplicateFileHandle | |
| SplitRule | No | String | |
| UpdatePeriodInfo | No | UpdatePeriodInfo |
| Parameter Name | Type | Description |
|---|---|---|
| DocBizId | String | Document ID. |
| ErrorMsg | String | Import error message. |
| ErrorLink | String | Error link. |
| ErrorLinkText | String | Error link text. |
| DuplicateFileCheckType | Integer | |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: lke.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: SaveDoc
<Common request parameters>
{
"BotBizId": "1727231073371148288",
"FileName": "test.docx",
"FileType": "docx",
"CosUrl": "/corp/23432432/233432/doc/zeSOHIBjwcWoEmlMMXOp-1796022574489010176.docx",
"ETag": "\"58e88ad7665f11c4f66eba0eada383a5\"",
"CosHash": "xxxxxxxxx",
"Size": "643000",
"Source": 0,
"WebUrl": "",
"AttrRange": 1,
"AttrLabels": [],
"ReferUrlType": 0
}{
"Response": {
"DocBizId": "1694921462777761792",
"ErrorMsg": "",
"ErrorLink": "",
"ErrorLinkText": "",
"RequestId": "e3338103-3165-49c0-b218-245be865cca5"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
Feedback