curl -X GET "https://your-domain.com/api/v1/knowledge/?page=1" \
-H "Authorization: Bearer YOUR_TOKEN"
import requests
url = "https://your-domain.com/api/v1/knowledge/"
headers = {"Authorization": "Bearer YOUR_TOKEN"}
params = {"page": 1}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(f"Found {data['total']} knowledge bases")
const response = await fetch(
'https://your-domain.com/api/v1/knowledge/?page=1',
{
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
}
);
const data = await response.json();
console.log(`Found ${data.total} knowledge bases`);
{
"items": [
{
"id": "kb_123abc",
"name": "Product Documentation",
"description": "Knowledge base for product documentation and guides",
"user_id": "user_456def",
"data": {},
"write_access": true,
"created_at": 1678901234,
"updated_at": 1678901234
},
{
"id": "kb_789xyz",
"name": "Technical Support",
"description": "Support articles and troubleshooting guides",
"user_id": "user_456def",
"data": {},
"write_access": false,
"created_at": 1678905678,
"updated_at": 1678905678
}
],
"total": 2
}
{
"detail": "Unauthorized"
}
Knowledge
List Knowledge Bases
Retrieve paginated list of knowledge bases with access control
GET
/
api
/
v1
/
knowledge
/
curl -X GET "https://your-domain.com/api/v1/knowledge/?page=1" \
-H "Authorization: Bearer YOUR_TOKEN"
import requests
url = "https://your-domain.com/api/v1/knowledge/"
headers = {"Authorization": "Bearer YOUR_TOKEN"}
params = {"page": 1}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(f"Found {data['total']} knowledge bases")
const response = await fetch(
'https://your-domain.com/api/v1/knowledge/?page=1',
{
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
}
);
const data = await response.json();
console.log(`Found ${data.total} knowledge bases`);
{
"items": [
{
"id": "kb_123abc",
"name": "Product Documentation",
"description": "Knowledge base for product documentation and guides",
"user_id": "user_456def",
"data": {},
"write_access": true,
"created_at": 1678901234,
"updated_at": 1678901234
},
{
"id": "kb_789xyz",
"name": "Technical Support",
"description": "Support articles and troubleshooting guides",
"user_id": "user_456def",
"data": {},
"write_access": false,
"created_at": 1678905678,
"updated_at": 1678905678
}
],
"total": 2
}
{
"detail": "Unauthorized"
}
Retrieve a paginated list of knowledge bases accessible to the authenticated user. Results include metadata about each knowledge base and the user’s write access permissions.
Request
Query Parameters
integer
default:"1"
Page number for pagination (minimum: 1)
Headers
string
required
Bearer token for authentication
Response
array
Array of knowledge base objects with access information
string
Unique identifier for the knowledge base
string
Display name of the knowledge base
string
Description of the knowledge base content
string
ID of the user who created the knowledge base
object
Additional metadata about the knowledge base
boolean
Whether the current user has write permissions
integer
Unix timestamp when the knowledge base was created
integer
Unix timestamp when the knowledge base was last updated
integer
Total number of knowledge bases accessible to the user
curl -X GET "https://your-domain.com/api/v1/knowledge/?page=1" \
-H "Authorization: Bearer YOUR_TOKEN"
import requests
url = "https://your-domain.com/api/v1/knowledge/"
headers = {"Authorization": "Bearer YOUR_TOKEN"}
params = {"page": 1}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(f"Found {data['total']} knowledge bases")
const response = await fetch(
'https://your-domain.com/api/v1/knowledge/?page=1',
{
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
}
);
const data = await response.json();
console.log(`Found ${data.total} knowledge bases`);
{
"items": [
{
"id": "kb_123abc",
"name": "Product Documentation",
"description": "Knowledge base for product documentation and guides",
"user_id": "user_456def",
"data": {},
"write_access": true,
"created_at": 1678901234,
"updated_at": 1678901234
},
{
"id": "kb_789xyz",
"name": "Technical Support",
"description": "Support articles and troubleshooting guides",
"user_id": "user_456def",
"data": {},
"write_access": false,
"created_at": 1678905678,
"updated_at": 1678905678
}
],
"total": 2
}
{
"detail": "Unauthorized"
}
Search Knowledge Bases
You can also search knowledge bases using the search endpoint:GET /api/v1/knowledge/search?query=<search_term>&page=1
Search Query Parameters
string
Search term to filter knowledge bases
string
Filter by view option (e.g., “shared”, “owned”)
integer
default:"1"
Page number for pagination
Notes
- Results are paginated with 30 items per page (PAGE_ITEM_COUNT)
- Only knowledge bases accessible to the user are returned (based on permissions and group membership)
- Admin users with BYPASS_ADMIN_ACCESS_CONTROL can see all knowledge bases
- The
write_accessfield indicates whether the user can modify the knowledge base