- 30 May 2024
- 3 Minutes to read
- Print
- DarkLight
Chatbot Generative Answers Source
- Updated on 30 May 2024
- 3 Minutes to read
- Print
- DarkLight
Chatbot Generative Answers Source
Chatbot Generative Answers Source
- Generative Answers Source ManageGET bot/chatbotGenerativeAnswersSources
- Get the list of Chatbot Generative Answers SourcesGET bot/chatbotGenerativeAnswersSources/{id}
- Get a single Chatbot Generative Answers SourcePOST bot/chatbotGenerativeAnswersSources
- Create a new Chatbot Generative Answers SourcePUT bot/chatbotGenerativeAnswersSources/{id}
- Update the Chatbot Generative Answers SourceDELETE bot/chatbotGenerativeAnswersSources/{id}
- Remove the Chatbot Generative Answers Source
Chatbot Generative Answers Source JSON Format
Chatbot Generative Answers Source is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id | guid | Id of the chatbot generative answers source. |
chatbotId | guid | Id of the chatbot. |
crawlingStartTime | datetime | Crawling Start Time. |
crawlingEndTime | datetime | Crawling End Time. |
isEnabled | bool | If the chatbot generative answers source is enabled. |
pageCount | integer | It is an expression that users one or more conditions, example: (1 or 2) and 3. |
status | enum | Allowed values are CREATED , PENDING ,PROCESSING , CANCELING , ERROR ,CANCEL , FINISHED . |
url | string | The URL of the website where the crawler starts. |
urlMatchingRule | string[] | string Array, use several regular expressions to filter out the pages you want to sync. |
Get the list of Chatbot Generative Answers Sources
GET bot/chatbotGenerativeAnswersSources?chatbotId={chatbotId}&siteId={siteId}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
siteId | int | query | yes | Id of the site. |
chatbotId | guid | query | yes | Id of the chatbot. |
Response:
An array of Chatbot Generative Answers Source
Example
Sample Request:
curl https://api11.comm100.io/v4/bot/chatbotGenerativeAnswersSources?chatbotId=cdc1d295-bf57-4cb3-b84f-8244e668ab29&siteId=10000 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
[
{
"chatbotId": "cdc1d295-bf57-4cb3-b84f-8244e668ab29",
"isEnabled": true,
"url": "https://www.comm100.com/",
"urlMatchingRule": [],
"status": "CANCELED",
"pageCount": 163,
"crawlingStartTime": "2024-05-30T09:31:09.353Z",
"crawlingEndTime": "2024-05-30T09:31:40.44Z",
"id": "22ea24dd-1b74-469a-b237-0263795a3442"
},
{
"chatbotId": "cdc1d295-bf57-4cb3-b84f-8244e668ab29",
"isEnabled": true,
"url": "https://ace-allegedly-polecat.ngrok-free.app",
"urlMatchingRule": [],
"status": "FINISHED",
"pageCount": 0,
"crawlingStartTime": "2024-05-29T11:52:59.423Z",
"crawlingEndTime": "2024-05-29T11:54:26.99Z",
"id": "b7792bc8-e823-4eb2-9d71-594fbf6d8164"
}
]
Get a single Chatbot Generative Answers Source
GET bot/chatbotGenerativeAnswersSources/{id}?siteId={siteId}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
siteId | int | query | yes | Id of the site. |
Response:
Chatbot Generative Answers Source
Example
Sample Request:
curl https://api11.comm100.io/v4/bot/chatbotGenerativeAnswersSources/22ea24dd-1b74-469a-b237-0263795a3442?siteId=10000 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"chatbotId": "cdc1d295-bf57-4cb3-b84f-8244e668ab29",
"isEnabled": true,
"url": "https://www.comm100.com/",
"urlMatchingRule": [],
"status": "CANCELED",
"pageCount": 163,
"crawlingStartTime": "2024-05-30T09:31:09.353Z",
"crawlingEndTime": "2024-05-30T09:31:40.44Z",
"id": "22ea24dd-1b74-469a-b237-0263795a3442"
}
Create a new Chatbot Generative Answers Source
POST bot/chatbotGenerativeAnswersSources?siteId={siteId}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
chatbotId | guid | body | yes | Id of the chatbot. |
url | string | body | yes | The URL of the website where the crawler starts. |
urlMatchingRule | string[] | body | yes | use several regular expressions to filter out the pages you want to sync. |
Response:
Chatbot Generative Answers Source
Example
Sample Request:
curl https://api11.comm100.io/v4/bot/chatbotGenerativeAnswersSources?siteId=10000 \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"chatbotId":"cdc1d295-bf57-4cb3-b84f-8244e668ab29","url":"https://www.comm100.com","urlMatchingRule":[]}
'
Response:
HTTP/1.1 201 Created
{
"id": "8062aa75-06a3-4c60-aae7-601baeeefb47",
"chatbotId": "cdc1d295-bf57-4cb3-b84f-8244e668ab29",
"isEnabled": true,
"url": "https://www.comm100.com",
"urlMatchingRule": [],
"status": "CREATED",
"pageCount": 0
}
Update the Chatbot Generative Answers Source
PUT bot/chatbotGenerativeAnswersSources/{id}?siteId={siteId}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
chatbotId | guid | body | yes | Id of the chatbot. |
id | guid | body | yes | Id of the chatbot generative answers source. |
isEnabled | bool | body | no | If the chatbot generative answers source is enabled. |
status | enum | body | no | Allowed values are CREATED . |
url | string | body | no | The URL of the website where the crawler starts. |
urlMatchingRule | string[] | body | no | string Array, use several regular expressions to filter out the pages you want to sync. |
Response:
Chatbot Generative Answers Source
Example
Sample Request:
- Disable Chatbot Generative Answers Source
curl https://api11.comm100.io/v4/bot/chatbotGenerativeAnswersSources/22ea24dd-1b74-469a-b237-0263795a3442?siteId=10000 \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"chatbotId":"cdc1d295-bf57-4cb3-b84f-8244e668ab29","isEnabled":false,"id":"22ea24dd-1b74-469a-b237-0263795a3442"}'
Response:
HTTP/1.1 200 OK
{
"chatbotId": "cdc1d295-bf57-4cb3-b84f-8244e668ab29",
"isEnabled": false,
"url": "https://www.comm100.com/",
"urlMatchingRule": [],
"status": "PROCESSING",
"pageCount": 163,
"crawlingStartTime": "2024-05-30T10:20:00.29Z",
"crawlingEndTime": "2024-05-30T09:31:40.44Z",
"id": "22ea24dd-1b74-469a-b237-0263795a3442"
}
- Enable Chatbot Generative Answers Source
curl https://api11.comm100.io/v4/bot/chatbotGenerativeAnswersSources/22ea24dd-1b74-469a-b237-0263795a3442?siteId=10000 \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"chatbotId":"cdc1d295-bf57-4cb3-b84f-8244e668ab29","isEnabled":true,"id":"22ea24dd-1b74-469a-b237-0263795a3442"}'
Response:
HTTP/1.1 200 OK
{
"chatbotId": "cdc1d295-bf57-4cb3-b84f-8244e668ab29",
"isEnabled": true,
"url": "https://www.comm100.com/",
"urlMatchingRule": [],
"status": "PROCESSING",
"pageCount": 163,
"crawlingStartTime": "2024-05-30T10:20:00.29Z",
"crawlingEndTime": "2024-05-30T09:31:40.44Z",
"id": "22ea24dd-1b74-469a-b237-0263795a3442"
}
- Start to Sync
curl https://api11.comm100.io/v4/bot/chatbotGenerativeAnswersSources/22ea24dd-1b74-469a-b237-0263795a3442?siteId=10000 \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"chatbotId":"cdc1d295-bf57-4cb3-b84f-8244e668ab29","status":"CREATED","id":"22ea24dd-1b74-469a-b237-0263795a3442"}'
Response:
HTTP/1.1 200 OK
{
"chatbotId": "cdc1d295-bf57-4cb3-b84f-8244e668ab29",
"isEnabled": false,
"url": "https://wifi.rainbird.com/",
"urlMatchingRule": [],
"status": "CREATED",
"pageCount": 163,
"crawlingStartTime": "2024-05-30T10:20:00.29Z",
"crawlingEndTime": "2024-05-30T10:28:01.357Z",
"id": "22ea24dd-1b74-469a-b237-0263795a3442"
}
Remove the Chatbot Generative Answers Source
DELETE bot/chatbotGenerativeAnswersSources/{id}?siteId={siteId}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
siteId | int | query | yes | Id of the site. |
Response:
No Content
Example
Sample Request:
curl https://api11.comm100.io/v4/bot/chatbotGenerativeAnswersSources/8062aa75-06a3-4c60-aae7-601baeeefb47?siteId=10000 \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 204 No Content