List Knowledge Entries
List all knowledge entries in the workspace with pagination and filtering.
Request
curl -X GET "https://platform.protobox.ai/api/v1/knowledge?page=1&limit=20" \
-H "Authorization: Bearer <access_token>"curl -X GET "https://platform.protobox.ai/api/v1/knowledge?source=document&category=policies&page=1&limit=10" \
-H "Authorization: Bearer <access_token>"const params = new URLSearchParams({
page: '1',
limit: '20',
source: 'document'
});
const response = await fetch(`https://platform.protobox.ai/api/v1/knowledge?${params}`, {
headers: {
'Authorization': 'Bearer ' + accessToken,
}
});
const { data } = await response.json();
console.log(`Found ${data.total} entries`);
data.items.forEach(entry => {
console.log(`- ${entry.title} (${entry.source})`);
});import requests
response = requests.get(
'https://platform.protobox.ai/api/v1/knowledge',
headers={'Authorization': f'Bearer {access_token}'},
params={
'page': 1,
'limit': 20,
'source': 'document'
}
)
data = response.json()['data']
print(f"Found {data['total']} entries")
for entry in data['items']:
print(f"- {entry['title']} ({entry['source']})")Response
{
"success": true,
"data": {
"items": [
{
"id": "695c71705a8b2ca8d9016050",
"workspaceId": "674e1234567890abcdef0001",
"title": "Return Policy",
"content": "Our return policy allows returns within 30 days...",
"source": "manual",
"metadata": {
"category": "policies",
"tags": ["returns", "refunds"]
},
"searchableText": "return policy our return policy allows...",
"isEnabled": true,
"tokenCount": 42,
"createdBy": "694f0bbbd73f06b928da6825",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
{
"id": "695c71705a8b2ca8d9016051",
"workspaceId": "674e1234567890abcdef0001",
"title": "Product Manual",
"content": "...",
"source": "document",
"metadata": {
"category": "products",
"tags": ["manual"]
},
"isEnabled": true,
"tokenCount": 1250,
"createdAt": "2024-01-14T08:00:00Z",
"updatedAt": "2024-01-14T08:00:00Z"
}
],
"total": 24,
"pagination": {
"page": 1,
"limit": 20,
"total": 24,
"totalPages": 2,
"hasNext": true,
"hasPrev": false
}
}
}Query Parameters
pagenumberdefault: 1Page number (1-indexed).
limitnumberdefault: 20Items per page. Range: 1-100.
sourcestringFilter by source type: manual, document, webpage, faq, api_docs, transcript.
categorystringFilter by category.
tagstringFilter by tag.
folderIdstringFilter by folder ID.
isEnabledbooleanFilter by enabled status.
searchstringSearch by title (partial match).
Response
| Field | Type | Description |
|---|---|---|
items | array | Array of knowledge entries |
total | number | Total matching entries |
pagination | object | Pagination metadata |
Pagination Object
| Field | Type | Description |
|---|---|---|
page | number | Current page |
limit | number | Items per page |
total | number | Total items |
totalPages | number | Total pages |
hasNext | boolean | Has next page |
hasPrev | boolean | Has previous page |