Uploading FAQs in Batches
Function
This API is used to upload an XLSX or XLS file for importing FAQs in batches.
URI
POST /v1/{project_id}/applications/{application_id}/uni-search/{repo_id}/faq/batch/upload
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. Constraints: N/A Value range: The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Default value: N/A |
application_id |
Yes |
String |
Definition: Application ID. For details about how to obtain the application ID, see Obtaining an Application ID. Constraints: Character string Value range: The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Default value: N/A |
repo_id |
Yes |
String |
Definition: Knowledge base ID. How to obtain: Log in to the KooSearch experience platform. In the navigation tree on the left, choose Knowledge Bases to view knowledge base IDs. Each knowledge base has a unique ID stored in the vector database. Constraints: N/A Value range: Length: 1 to 64 characters. The value can contain only digits, letters, hyphens (-), and underscores (_). Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition: Token used for API authentication. For details about how to obtain the token, see Obtaining an IAM User Token. Constraints: N/A Value range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
file |
Yes |
File |
Definition: Upload documents. Constraints: Only files in XLSX, XLS, DOCX, or DOC format are supported. The maximum size of a single file is 128 MB. For details about the file content, see the Excel or Word sample. An Excel document can contain a maximum of 100,000 records. Blank lines are not allowed because any data following a blank line will be ignored. If the document size exceeds 60 MB, you are advised to upload it via an API. Value range: N/A Default value: N/A |
rule |
No |
String |
Definition: Question matching rule. Constraints: N/A Value range: N/A Default value: N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
file_id |
String |
Definition: Document ID. Value range: N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition: Value range: N/A |
error_msg |
String |
Definition: Error message. Value range: N/A |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition: Value range: N/A |
error_msg |
String |
Definition: Error message. Value range: N/A |
Example Requests
Batch FAQ upload instance.
/v1/729cbd739854470da5426ed26bd900ca/unisearch-dev/v1/1ed40ceefc8d40f8b884edb6a84e7768/applications/fb9731ab-7085-474f-b6c7-64473586f0f3/uni-search/e8196714-3e6b-454e-8c23-61baff601ec9/faq/batch/upload file
Example Responses
Status code: 200
Response body of the API for uploading documents.
{ "file_id" : "60fa0fbf-a809-4e4e-8d26-ec389a497bf4" }
Status Codes
Status Code |
Description |
---|---|
200 |
Response body of the API for uploading documents. |
400 |
Invalid parameter. |
500 |
Internal error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot