Used to export the ML utterances of a bot. It creates a request ID from which we can generate the Download link of the bot using ML Utterance Export Status API.
To use this API, app needs the Bot Builder API scope of Utterances Export.
OR the Admin API Scope of Utterances Export under Test and Train.
POST https://{{host}}/api/public/bot/{{BotID}}/mlimport
Query Parameters
Parameter | Required/Optional | Description |
---|---|---|
host | Required | Environment URL, for example, https://bots.kore.ai |
BotID | Required | Bot ID or Stream ID. You can access it from the General Settings page of the bot. |
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/bot/{{bot_id}}/mlexport?state=configured&=&type=csv' \ -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ -H 'content-type: application/json' \ -d '{ "fileName":"MLUtterances.json", "fileId":"5d1457dc3f68234b40161f9e" } '
Sample Response
{ "status": "pending", "streamId": "st-6ecb5ba2-5e31-5a40-b918-8cbee40f3fdb", "createdBy": "u-5dad2ccd-b271-5c00-a338-2e6e25e1ec91", "requestType": "MLimport", "_id": "bir-17d16f79-4c91-5463-bd66-68861fc0df82", "statusLogs": [], "createdOn": "2019-06-27T12:05:58.543Z", "__v": 0 }