Get Knowledge Base
Endpoint
GET /apiops/projects/{projectName}/knowledge-bases/{name}/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| name | string | Yes | Knowledge base name |
Query Parameters
None
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"resultList": [
{
"id": "6650a1f2e4b0c3a2d1f09876",
"projectId": "6650a1f2e4b0c3a2d1f01234",
"name": "product-docs",
"description": "Product documentation knowledge base",
"vectorDbRef": "qdrant-main",
"embeddingProviderRef": "openai-embeddings",
"collectionName": "product_docs",
"chunkSize": 1000,
"chunkOverlap": 200,
"embeddingModelId": "text-embedding-3-small",
"status": "ACTIVE",
"docCount": 12,
"chunkCount": 340,
"createdAt": "2026-07-01T09:15:00Z",
"updatedAt": "2026-07-10T14:32:00Z"
}
],
"resultCount": 1
}
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Response status: SUCCESS or FAILURE |
| resultList | array | Single-element list containing the knowledge base object |
| resultCount | integer | Number of knowledge bases returned (1) |
Knowledge Base Object Fields
| Field | Type | Description |
|---|---|---|
| id | string | Server-generated identifier of the knowledge base |
| projectId | string | Internal id of the owning project |
| name | string | Knowledge base name (unique per project) |
| description | string | Free-text description |
| vectorDbRef | string | Name reference to the VectorDB connection backing this knowledge base |
| embeddingProviderRef | string | Name reference to the LLM provider used for embeddings |
| collectionName | string | Vector store collection/index name |
| chunkSize | integer | Token count per chunk (default 1000) |
| chunkOverlap | integer | Overlap tokens between consecutive chunks (default 200) |
| embeddingModelId | string | Embedding model identifier |
| status | string | Lifecycle status (server-controlled): ACTIVE, INDEXING, ERROR |
| docCount | integer | Number of documents (read-only, server-maintained) |
| chunkCount | integer | Number of indexed chunks (read-only, server-maintained) |
| createdAt | string | ISO-8601 creation timestamp |
| updatedAt | string | ISO-8601 last-update timestamp |
Knowledge Base Status Values
ACTIVE- Operational; can answer queriesINDEXING- An async index/reindex job is runningERROR- The last index job failed
EnumStatus
SUCCESS- Operation successfulFAILURE- Operation failed
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Knowledge base (name: product-docs) was not found!"
}
or
{
"status": "FAILURE",
"resultMessage": "Knowledge base name can not be empty!"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/knowledge-bases/product-docs/" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Name-Based: The knowledge base is resolved by
name(case-insensitive exact match) within the project. - Not Found: A non-existent name returns
400 Bad RequestwithresultMessage"Knowledge base (name: ...) was not found!". - No Secrets: The knowledge base payload carries no secret fields;
vectorDbRefandembeddingProviderRefare name-based references, not credentials. - Read-Only Counters:
docCount,chunkCountandstatusare server-maintained. - Permissions: Requires
AI_DEVELOPMENT+VIEWpermission in the project.
Related Documentation
- List Knowledge Bases - List all knowledge bases in a project
- Update Knowledge Base - Update an existing knowledge base
- List Documents - List documents in this knowledge base
- Knowledge Bases API - Resource overview