List the URL sources of a knowledge base
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://blackbox.dasha.ai/api/v1/rag/kb/{kbId}/sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://blackbox.dasha.ai/api/v1/rag/kb/{kbId}/sources \
--header 'Authorization: Bearer <token>'import requests
url = "https://blackbox.dasha.ai/api/v1/rag/kb/{kbId}/sources"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"knowledgeBaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "url",
"url": "<string>",
"scope": "section",
"pageLimit": 123,
"includePaths": [
"<string>"
],
"excludePaths": [
"<string>"
],
"pageCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"recrawlIntervalHours": 123,
"crawlerName": "<string>",
"nextRunAt": "2023-11-07T05:31:56Z",
"lastRun": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"trigger": "initial",
"counts": {
"discovered": 123,
"fetched": 123,
"unchanged": 123,
"failed": 123,
"removed": 123,
"covered": 123
},
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"errorCode": "not_configured",
"warning": "<string>"
}
}
]
}List the URL sources of a knowledge base
GET
/
api
/
v1
/
rag
/
kb
/
{kbId}
/
sources
List the URL sources of a knowledge base
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://blackbox.dasha.ai/api/v1/rag/kb/{kbId}/sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://blackbox.dasha.ai/api/v1/rag/kb/{kbId}/sources \
--header 'Authorization: Bearer <token>'import requests
url = "https://blackbox.dasha.ai/api/v1/rag/kb/{kbId}/sources"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"knowledgeBaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "url",
"url": "<string>",
"scope": "section",
"pageLimit": 123,
"includePaths": [
"<string>"
],
"excludePaths": [
"<string>"
],
"pageCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"recrawlIntervalHours": 123,
"crawlerName": "<string>",
"nextRunAt": "2023-11-07T05:31:56Z",
"lastRun": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"trigger": "initial",
"counts": {
"discovered": 123,
"fetched": 123,
"unchanged": 123,
"failed": 123,
"removed": 123,
"covered": 123
},
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"errorCode": "not_configured",
"warning": "<string>"
}
}
]
}Was this page helpful?