Ana içeriğe geç

Get Knowledge Base

Endpoint

GET /apiops/projects/{projectName}/knowledge-bases/{name}/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
namestringYesKnowledge 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

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
resultListarraySingle-element list containing the knowledge base object
resultCountintegerNumber of knowledge bases returned (1)

Knowledge Base Object Fields

FieldTypeDescription
idstringServer-generated identifier of the knowledge base
projectIdstringInternal id of the owning project
namestringKnowledge base name (unique per project)
descriptionstringFree-text description
vectorDbRefstringName reference to the VectorDB connection backing this knowledge base
embeddingProviderRefstringName reference to the LLM provider used for embeddings
collectionNamestringVector store collection/index name
chunkSizeintegerToken count per chunk (default 1000)
chunkOverlapintegerOverlap tokens between consecutive chunks (default 200)
embeddingModelIdstringEmbedding model identifier
statusstringLifecycle status (server-controlled): ACTIVE, INDEXING, ERROR
docCountintegerNumber of documents (read-only, server-maintained)
chunkCountintegerNumber of indexed chunks (read-only, server-maintained)
createdAtstringISO-8601 creation timestamp
updatedAtstringISO-8601 last-update timestamp

Knowledge Base Status Values

  • ACTIVE - Operational; can answer queries
  • INDEXING - An async index/reindex job is running
  • ERROR - The last index job failed

EnumStatus

  • SUCCESS - Operation successful
  • FAILURE - 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 Request with resultMessage "Knowledge base (name: ...) was not found!".
  • No Secrets: The knowledge base payload carries no secret fields; vectorDbRef and embeddingProviderRef are name-based references, not credentials.
  • Read-Only Counters: docCount, chunkCount and status are server-maintained.
  • Permissions: Requires AI_DEVELOPMENT + VIEW permission in the project.