봇에 추가된 특정 맞춤형 대시보드에서 위젯의 데이터 결과를 가져옵니다.
이 API를 사용하려면 맞춤형 보고서의 봇 빌더 API 범위가 필요합니다.
GET https://{{host}}/api/public/bot/{{BotID}}/dashboard/{{dashboardName}}/widget/{{widgetName}}?startDate={{startDate}}&endDate={{endDate}}&limit=-1
경로 매개 변수
| 매개 변수 | 필수/선택 사항 | 설명 |
|---|---|---|
| host | 필수 | 환경 URL(예: https://bots.kore.ai) |
| BotID | 필수 | 봇 ID 또는 스트림 ID. 봇의 일반 설정 페이지에서 이를 액세스할 수 있습니다. |
| dashboardName | 필수 | 필요한 위젯이 포함된 맞춤형 대시보드의 이름입니다. |
| widgetName | 필수 | 데이터를 검색해야 하는 위젯의 이름입니다. |
| limit | 선택 사항 | 가져올 레코드 수입니다. 적용할 수 있는 최대 한도는 50입니다. |
| startDate | 선택 사항 | 변경 내용을 확인할 시작 날짜입니다. 지정되지 않았다면 봇 생성 날짜가 자동으로 설정됩니다. ISO 날짜 형식으로 날짜를 입력합니다. 예를 들어 1998년 3월 30일은 1998-03-30이 될 것입니다. |
| endDate | 선택 사항 | 변경 내용을 보고자 하는 종료 날짜입니다. ISO 날짜 형식으로 날짜를 입력합니다. 예를 들어 1998년 3월 30일은 1998-03-30이 될 것입니다. |
권한 부여
다음 구문을 포함한 헤더에 JWT를 포함한 API를 호출합니다. auth: {{JWT}}
콘텐츠 유형 응답
application/json
샘플 요청
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' \
샘플 응답
{
"_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"
}
]
}
}