Chatbot Generative Answers Source
  • 30 May 2024
  • 3 Minutes to read
  • Dark
    Light

Chatbot Generative Answers Source

  • Dark
    Light

Article summary

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:

NameTypeDescription
idguidId of the chatbot generative answers source.
chatbotIdguidId of the chatbot.
crawlingStartTimedatetimeCrawling Start Time.
crawlingEndTimedatetimeCrawling End Time.
isEnabledboolIf the chatbot generative answers source is enabled.
pageCountintegerIt is an expression that users one or more conditions, example: (1 or 2) and 3.
statusenumAllowed values are CREATED, PENDING,PROCESSING, CANCELING, ERROR,CANCEL, FINISHED .
urlstringThe URL of the website where the crawler starts.
urlMatchingRulestring[]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:

NameTypeinRequiredDescription
siteIdintqueryyesId of the site.
chatbotIdguidqueryyesId 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:

NameTypeinRequiredDescription
siteIdintqueryyesId 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:

NameTypeinRequiredDescription
chatbotIdguidbodyyesId of the chatbot.
urlstringbodyyesThe URL of the website where the crawler starts.
urlMatchingRulestring[]bodyyesuse 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:

NameTypeinRequiredDescription
chatbotIdguidbodyyesId of the chatbot.
idguidbodyyesId of the chatbot generative answers source.
isEnabledboolbodynoIf the chatbot generative answers source is enabled.
statusenumbodynoAllowed values are CREATED.
urlstringbodynoThe URL of the website where the crawler starts.
urlMatchingRulestring[]bodynostring 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:

NameTypeinRequiredDescription
siteIdintqueryyesId 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

© 2021 | Comm100

Was this article helpful?