Ana içeriğe geç

List Knowledge Bases

Endpoint

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

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject 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
resultListarrayList of knowledge base objects
resultCountintegerTotal number of knowledge bases returned

Knowledge Base Object Fields

FieldTypeDescription
idstringServer-generated identifier of the knowledge base
projectIdstringInternal id of the owning project
namestringKnowledge base name (unique per project; used for name-based addressing)
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": "Project (name: MyProject) was not found!"
}

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/" \
-H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings

  • Name-Based: Knowledge bases are addressed by name, unique per project. Runtime IDs are never required in the path.
  • No Secrets: The knowledge base payload carries no secret fields. vectorDbRef and embeddingProviderRef are name-based references to other configured assets, not credentials.
  • Read-Only Counters: docCount, chunkCount and status are server-maintained and cannot be set through write endpoints.
  • Empty List: If the project has no knowledge bases, an empty resultList is returned.
  • Permissions: Requires AI_DEVELOPMENT + VIEW permission in the project.