To retrieve the data associated with custom widgets and the reports of a bot.
Method | GET |
Endpoint | https://{{host}}/api/public/bot/{{BotID}}/dashboard/ Note: A POST API call is now supported to include the additional filters for querying the data. See Custom Dashboard Filters to know more about additional filters. |
Content Type | application/json |
Authorization | auth: {{JWT}}
|
API Scope |
|
Path 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. |
Sample Request for GET call
curl -X GET \ "https://{{host}}/api/public/bot/{{bot_id}}/dashboard/{{dashboardName}}/widget/{{widgetName}}?startDate={{startDate}}&endDate={{endDate}}" \ -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ -H 'content-type: application/json' \
Sample Request for POST call
curl --location --request POST 'https://{{host}}/api/public/bot/{{bot_id}}/dashboard/{{dashboardName}}/widget/{{widgetName}}?startDate={{startDate}}&endDate={{endDate}}' \ --header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ --header 'Content-Type: application/json' \ --data-raw '{ "customFilters": [ { "filterSource": "userType", "fieldName": "user", "values": [ "newuser" ] } ] }
Body Parameters
Parameter | Required/Optional | Description |
---|---|---|
dashboardName | Required | Name of the Custom Dashboard containing the required Widget. |
widgetName | Required | Name of the Widget whose data needs to be retrieved. |
limit | Optional | The number of records to fetch. The maximum applicable limit is 50. |
startDate | Required | The start date from which you want to see the changes. Enter the date in ISO date format. For example, March 30, 2020 would be 2020-03-30. |
endDate | Required | The end date up to which you want to see the changes. Enter the date in ISO date format. For example, March 30, 2020 would be 2020-03-30. |
customFilters:
filterSource |
Required | To understand about the custom dashboard filters, see Create Custom Dashboard Filters. |
Sample Response for GET and POST calls
{ "_id": "wg-xxxx-xxx-xxx-xxx-xxxxx", "overlay": [], "name": "dasaDSA", "type": "table", "sqlQuery": { "dataSet": "Analytics", "select": "metricType", "startDate": "2019-08-31T18:30:00.000Z", "endDate": "2019-10-01T18:30:00.000Z", "botId": "st-xxxxx-xxx-xxx-xxx-xxxxx" }, "dimensions": [ { "fieldName": "metricType", "displayName": "metricType", "type": "string" } ], "metrics": [], "row": [], "properties": {}, "queryResponse": { "metaData": { "metricType": "string" }, "queryResponse": [ { "metricType": "successintents" }, { "metricType": "successtasks" }, { "metricType": "successintents" }, { "metricType": "successintents" }, { "metricType": "successtasks" }, { "metricType": "failedintents" } ] } }