Вземи база знания
curl --request GET \
--url https://call.aiployees.com/api/user/knowledgebases \
--header 'Authorization: Bearer <token>'import requests
url = "https://call.aiployees.com/api/user/knowledgebases"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://call.aiployees.com/api/user/knowledgebases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://call.aiployees.com/api/user/knowledgebases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://call.aiployees.com/api/user/knowledgebases"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://call.aiployees.com/api/user/knowledgebases")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://call.aiployees.com/api/user/knowledgebases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 1,
"name": "Product Documentation",
"description": "Technical documentation for our products",
"status": "active",
"status_label": "Active",
"documents_count": 5,
"assistants_count": 2,
"created_at": "2025-01-05T10:30:00.000000Z",
"updated_at": "2025-01-08T14:20:00.000000Z"
},
{
"id": 2,
"name": "FAQ Knowledge",
"description": "Frequently asked questions and answers",
"status": "processing",
"status_label": "Processing",
"documents_count": 1,
"assistants_count": 0,
"created_at": "2025-01-08T09:00:00.000000Z",
"updated_at": "2025-01-08T09:05:00.000000Z"
}
]
}
{
"data": []
}
Бази от знания
Вземи база знания
Вземи всички бази знания за удостоверения потребител
GET
/
user
/
knowledgebases
Вземи база знания
curl --request GET \
--url https://call.aiployees.com/api/user/knowledgebases \
--header 'Authorization: Bearer <token>'import requests
url = "https://call.aiployees.com/api/user/knowledgebases"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://call.aiployees.com/api/user/knowledgebases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://call.aiployees.com/api/user/knowledgebases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://call.aiployees.com/api/user/knowledgebases"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://call.aiployees.com/api/user/knowledgebases")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://call.aiployees.com/api/user/knowledgebases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 1,
"name": "Product Documentation",
"description": "Technical documentation for our products",
"status": "active",
"status_label": "Active",
"documents_count": 5,
"assistants_count": 2,
"created_at": "2025-01-05T10:30:00.000000Z",
"updated_at": "2025-01-08T14:20:00.000000Z"
},
{
"id": 2,
"name": "FAQ Knowledge",
"description": "Frequently asked questions and answers",
"status": "processing",
"status_label": "Processing",
"documents_count": 1,
"assistants_count": 0,
"created_at": "2025-01-08T09:00:00.000000Z",
"updated_at": "2025-01-08T09:05:00.000000Z"
}
]
}
{
"data": []
}
Този endpoint връща списък с всички бази знания, свързани с вашия акаунт. Базите знания се използват за съхраняване на документи, които предоставят контекст и информация на вашите AI асистенти.
Отговор
array
Масив от обекти база знания
Show knowledgebase properties
Show knowledgebase properties
integer
Уникалният идентификатор на базата знания
string
Името на базата знания
string
Опционално описание на базата знания
string
Текущо състояние:
empty, processing, active, или failedstring
Етикет за състоянието, четлив от човек
integer
Брой документи в тази база знания
integer
Брой асистенти, използващи тази база знания
string
ISO 8601 времева отметка на създаване
string
ISO 8601 времева отметка на последна актуализация
{
"data": [
{
"id": 1,
"name": "Product Documentation",
"description": "Technical documentation for our products",
"status": "active",
"status_label": "Active",
"documents_count": 5,
"assistants_count": 2,
"created_at": "2025-01-05T10:30:00.000000Z",
"updated_at": "2025-01-08T14:20:00.000000Z"
},
{
"id": 2,
"name": "FAQ Knowledge",
"description": "Frequently asked questions and answers",
"status": "processing",
"status_label": "Processing",
"documents_count": 1,
"assistants_count": 0,
"created_at": "2025-01-08T09:00:00.000000Z",
"updated_at": "2025-01-08T09:05:00.000000Z"
}
]
}
{
"data": []
}
Състояния на базата знания
| Състояние | Описание |
|---|---|
empty | Базата знания няма документи |
processing | Един или повече документи се обработват |
active | Всички документи са обработени и готови |
failed | Един или повече документи не успяха да се обработят |
⌘I

