Get Knowledge Base Item
curl --request GET \
--url https://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id}', 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://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Knowledge Bases
Get Knowledge Base Item
Get a specific knowledge base item by ID.
GET
/
api
/
v1
/
knowledge-base
/
{kb_id}
/
items
/
{item_id}
Get Knowledge Base Item
curl --request GET \
--url https://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id}', 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://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kollie.ai/api/v1/knowledge-base/{kb_id}/items/{item_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get Knowledge Base Item
This endpoint retrieves a specific item from a knowledge base by its ID.Request
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token for authentication |
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| kb_id | string | Yes | The ID of the knowledge base |
| item_id | string | Yes | The ID of the item to retrieve |
Response
200 OK
{
"data": {
"id": "string",
"name": "string",
"file_type": "string",
"status": "string",
"created_at": "string",
"updated_at": "string",
"knowledge_base_id": "string",
"content": "string"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the item |
| name | string | Name of the item |
| file_type | string | Type of the file (PDF or TXT) |
| status | string | Current status of the item |
| created_at | string | Timestamp when the item was created |
| updated_at | string | Timestamp when the item was last updated |
| knowledge_base_id | string | ID of the knowledge base this item belongs to |
| content | string | The content of the item (if applicable) |
Example
curl -X GET 'https://api.kollie.ai/api/v1/knowledge-base/123e4567-e89b-12d3-a456-426614174000/items/987fcdeb-51a2-4b3c-9d4e-5f6g7h8i9j0k' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
⌘I

