http
DELETE https://services.leadconnectorhq.com/knowledge-bases/crawlerAuthorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
knowledgeBaseId | string | Yes | tDtDnQdgm2LXpyiqYvZ6 | knowledge base ID as string |
locationId | string | Yes | tDtDnQdgm2LXpyiqYvZ6 | account ID as string |
urlIds | string[] | Yes | [tDtDnQdgm2LXpyiqYvZ6] | List of trained urls ids ( fetched from the Get all trained page links by knowledge base endpoint) |
Responses
200 - Selected pages deleted successfully
success(boolean, required): Indicates if the operation was successful Example:True
json
{
"success": true
}400 - Bad Request
statusCode(number): Example:400message(string): Example:Bad Request
json
{
"statusCode": 400,
"message": "Bad Request"
}422 - Unprocessable Entity
statusCode(number): Example:422message(string[])error(string): Example:Unprocessable Entity
json
{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}500 - Internal Server Error
statusCode(number): Example:500message(string): Example:Internal Server Error
json
{
"statusCode": 500,
"message": "Internal Server Error"
}Example
curl -X DELETE 'https://services.leadconnectorhq.com/knowledge-bases/crawler' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"knowledgeBaseId": "tDtDnQdgm2LXpyiqYvZ6",
"locationId": "tDtDnQdgm2LXpyiqYvZ6",
"urlIds": "[tDtDnQdgm2LXpyiqYvZ6]"
}'const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/crawler', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"knowledgeBaseId": "tDtDnQdgm2LXpyiqYvZ6", "locationId": "tDtDnQdgm2LXpyiqYvZ6", "urlIds": "[tDtDnQdgm2LXpyiqYvZ6]"}),
});
const data = await response.json();import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/knowledge-bases/crawler',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"knowledgeBaseId": "tDtDnQdgm2LXpyiqYvZ6", "locationId": "tDtDnQdgm2LXpyiqYvZ6", "urlIds": "[tDtDnQdgm2LXpyiqYvZ6]"},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/knowledge-bases/crawler');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'knowledgeBaseId': 'tDtDnQdgm2LXpyiqYvZ6', 'locationId': 'tDtDnQdgm2LXpyiqYvZ6', 'urlIds': '[tDtDnQdgm2LXpyiqYvZ6]'}),
]);
$data = json_decode(curl_exec($ch), true);