Import/Export a Chatbot
Last updated
Last updated
In this tutorial we will talk about importing/exporting bots, this is a very useful feature that will allow our bots to be very portable and easy to re-use in other machines/instances of EDDI and of course to backup and restore our bots and maintain them and keep them shiny.
Exporting a bot is a fairly simple process, send a POST
request to the following API endpoint and you will receive the location of the exported zip file on the response headers, specifically the location
header.
Export Chatbot REST API Endpoint
POST
http://localhost:7070/backup/export/:botId?botVersion=:botVersion
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Request URL:
http://localhost:7070/backup/export/5aaf90e29f7dd421ac3c7dd4?botVersion=1
Response Body: no content
Response Code: 200
Response Headers:
Same process as exporting; send a POST
request to the following API endpoint , you will receive the id of the imported bot on the response headers.
For the sake of simplifying things you can use Postman to upload the zip file of the exported bot just don't forget to add the http header of content type : application/zip
.
Take a look at he image below to understand how can you upload the zip file in Postman:
Important: The bot will not be deployed after import you will have to deploy it yourself by using the corresponding API endpoint, please referrer to Deploying a bot.
botId
string
Id of the bot you wish to export
botVersion
string
Version of the bot
Element
Value
Http Method
POST
API endpoint
/backup/import
HTTP Content Type Header
application/zip
Request body
the zip
file binary.