Bot Export – Status API- Download the Bot Zip

Hi there, I have tried Bot Export status API, it returns the downloadURL, but upon clicking on it, it returns the blank page instead of Zip.

After clicking on the link, it returns nothing.
How can I download the bot zip?

Sample URL : http://127.0.0.1:8081/api/getMediaStream/market/f-ed48dd07-ef14-5f55-9c0f-e69d375cc2ee.zip?e=1598379121&n=933717540&s=IlJLTWpNYnZ6bmF1UEpMNHkvZXpweXFUaFVyby9KSmxiYXpYbStxUFM3d1E9Ig$$&clientfilename=VABot.zip&batchtesting=true"

Hi @ashirvad.s.jain,

As per the following export API definition in Documentation:
https://developer.kore.ai/docs/bots/api-guide/bot-export-api/
The bot export API used to export bot definition and all associated components. This API only initiates the export process. Use Export Status API to view the progress of the export and also to get a link to download the file once the export is completed.

You will need to invoke the export API first and then the Export status API.
Please let us know if you are observing this issue even after executing the export API.

Regards,
Yoga Ramya

Hi Yogaramya, my question is about, to download the bot. I did executed the APIs in the correct order, bot export api & later export status API.

If you see my initial question, I did received the download URL but upon clicking it is returning blank.

I want to know ,

  1. If the returned download URL is correct and how does it work?
  2. Does Kore has separate API to download the bot? what should be the URL to download it?
  3. What is the significance of fileId?

Hello @ashirvad.s.jain,

The execution of the export api and export status API is correct in your case. Just a small modification to the download url, will provide the bot export.

Please replace the “127.0.0.1” with your host url (which you have passed in the curl request) in the generated download url link. (As highlighted in the screenshot).
By default, local URL is being passed. In the screenshot, the host url is “citiissues.kore.ai”.

image

Copy paste the complete download url link (along with the replaced host url) in any browser. It will download the bot export zip file.

In answering your questions,

  1. The returned download URL is correct if you are getting 200 OK status for the request api call. Please copy the download URL and paste it in any browser (after replacing with the host url) and it will automatically download the bot export.
  2. The only API to download the bot export is by using, https://developer.kore.ai/docs/bots/api-guide/bot-export-api/
  3. The significance is that it will build a url with all the fields shared as part of api and will help us in downloading the bot export without using the UI interface.