지식 작업에서 질문 및 노드 목록을 가져옵니다.
이 API를 사용하려면 앱에 KnowlegedGraph의 관리자 API 범위가 필요합니다.
GET https://{{host}}/api/public/bot/{{botId}}/faqs?ktId=&limit=&offset=&parentId=&withallchild=&type=&language=en
경로 매개 변수
| 매개 변수 | 필수/선택 사항 | 설명 |
|---|---|---|
| host | 필수 | 환경 URL(예: https://bots.kore.ai) |
| botId | 필수 | 봇 ID입니다. 봇의 일반 설정 페이지에서 이를 액세스할 수 있습니다. |
Query Parameters
| Parameter | Required/Optional | Description |
|---|---|---|
| ktId | Required | Knowledge task id from where the FAQs are required to be listed.
Note: You can retrieve the ktId from the request of the FAQs API call. To know more, go to Using GetFAQs API. The ktId values are different for both in-development and published bots. |
| limit | Optional | Number of records to be fetched, if not provided set to 50.
Note: The maximum limit that can be set is 50. |
| offset | Optional | Number of records to be skipped, if not provided set to 0 |
| parentId | Required | The Id of the nodes in the Knowledge tasks section.
Note: You can retrieve the parentId from the response of the FAQs API call. To know more, go to Using GetFAQs API. |
| withallchild | Optional | Whether child nodes need to be included |
| type | Optional | Type of FAQs to be fetched. |
| language | Required | The bot language, for example, “en” for English and “de” for German. |
| search | Optional | Can be reference id or display name. |
권한 부여
다음 구문을 포함한 헤더에 JWT를 포함한 API를 호출합니다. auth: {{JWT}}
콘텐츠 유형 응답
application/json
Sample Request
curl -X GET \
https://{{host}}/api/public/bot/{{bot_id}}/faqs?ktId=5afxxxxxf&limit=30&offset=0&parentId=xxxxx-xxx-xxx-xxx-xxxxx&withallchild=true&type=all&language=en \
-H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
-H 'content-type: application/json'
Sample Response
{
"faqs": [
{
"_id": "5e0ef00f41c79c0a7c3a729a",
"subAnswers": [],
"editLocked": false,
"isPublished": true,
"questionPayload": {
"question": "What is Bank Internet Banking?",
"tagsPayload": []
},
"answerPayload": [
{
"_id": "mt-95deca18-9b2a-5c5e-970e-566ef678e270",
"channel": "default",
"streamId": "st-xxxxx-xxx-xxx-xxx-xxxxx",
"lModBy": "u-xxxxx-xxx-xxx-xxx-xxxxx",
"lMod": "Fri Jan 03 2020 13:11:03 GMT+0530 (India Standard Time)",
"createdBy": "u-xxxxx-xxx-xxx-xxx-xxxxx",
"createdOn": "Fri Jan 03 2020 13:11:03 GMT+0530 (India Standard Time)",
"text": "Bank Internet banking is a convenient way to bank anytime, anywhere even from the comfort of your home using your PC or Tab.",
"type": "basic"
}
],
"knowledgeTaskId": "5afa79639466e4369e3c809f",
"subQuestions": [],
"responseType": "message",
"referenceId" :"12xxx32",
"label" :"displayname",
"streamId": "st-xxxxx-xxx-xxx-xxx-xxxxx",
"parent": "pa-xxxxx-xxx-xxx-xxx-xxxxx",
"leafterm": "yes",
"language": "en",
"createdBy": "u-xxxxx-xxx-xxx-xxx-xxxxx",
"lastModifiedBy": "u-xxxxx-xxx-xxx-xxx-xxxxx",
"createdOn": "2020-01-03T07:41:03.017Z",
"modifiedOn": "2020-01-03T07:41:03.017Z",
"sortId": 1578037263017,
"botName": "BankingBot",
"refId": "re-xxxxx-xxx-xxx-xxx-xxxxx",
"__v": 0
}]
}