Used to Upload the botdefinition, botconfig, and botfunction file (if any) as well as the bot icon to the local server and get the file ID to be used in Import Bot API. You need to upload the files separately.
POST https://{{host}}/api/public/uploadfile
Query Parameters
Parameter | Description |
---|---|
host | Environment URL, for example, https://bots.kore.ai |
Body Parameters
The Parameters to be passed would vary depending upon the file id that is required.
For Bot Definition File ID
Parameter | Description |
---|---|
file | Upload the Botdefinition.json |
fileContext | bulkImport |
fileExtension | json |
For Bot Config File ID
Parameter | Description |
---|---|
file | Upload the Botconfig.json |
fileContext | bulkImport |
fileExtension | json |
For Bot Function File ID
Parameter | Description |
---|---|
file | Upload the Bot function file |
fileContext | bulkImport |
fileExtension | js |
For Bot icon File ID
Parameter | Description |
---|---|
file | Upload the Bot icon |
fileContext | bulkImport |
fileExtension | json |
For ML Utterances File ID
Parameter | Description |
---|---|
file | Upload the ML Utterance file (.json or CSV) |
fileContext | bulkImport |
fileExtension | json or csv |
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {JWT}
Response content type
application/json
Sample Request
curl -X POST \ https://{{host}}/api/public/uploadfile \ -H 'auth: YOUR_JWT_ACCESS_TOKEN' \ -H 'content-type: multipart/form-data' \ -F file=@botDefinition.json \ -F fileContext=bulkImport \ -F fileExtension=json
Sample Response
{ "fileId": "5c077d28d28e06c112681656", "hash": "c275df72765efb7de332e7d54300cb12de66b78e" }