2.4-QA Knowledge Batch Upload, in Excel
1. Overview
Interface name: QA batch import, in the form of excel file
Version number: v1.0.0
2. Information
Request method: POST
Request URL: https://DOMAIN/openapi/v1/knowledge/qa-batch/
Domain: Refer to "Service address description"
3. Request parameters
Note: The request is in form, application/form-data
Request header http header field:
Parameter name
Type
Required
Description
cybertron-robot-key
string
Yes
Robot key
cybertron-robot-token
string
Yes
Robot token
Request body field:
Parameter name
Type
Required
Description
username
string
Yes
User account
file
file
yes
excel or csv file
knowledge_base_id
string
Yes
Knowledge Base id
folder_id
string
No
Id of Folder to upload
4. Response field description
HTTP status code: 200 OK
Response field description:
Field Name
Type
Description
code
string
"000000" is normal, other exceptions
message
string
Status description
data
object
message body
5. Example
Request Example:
curl 'https://_DOMAIN_/openapi/v1/knowledge/qa-batch/' \
-H 'cybertron-robot-key: l8ia2IOc************Z724%2BU%3D' \
-H 'cybertron-robot-token: MTc0Mzk5************************************************cGRCUTg9' \
-X POST \
-F 'username=me@host.com' \
-F 'file=@path/to/file.csv' \
-F 'knowledge_base_id=324' \
-F 'folder_id=2936'Response example:
{
"code": "000000",
"message": "The file upload was successful! Learning...",
"data": null
}