Knowledge Bases API
Endpoints
Knowledge Bases
Base path: /apiops/projects/{projectName}/knowledge-bases
- List Knowledge Bases - List all knowledge bases in a project
- Get Knowledge Base - Get a single knowledge base by name
- Create Knowledge Base - Create or update a knowledge base (upsert)
- Update Knowledge Base - Update an existing knowledge base
- Delete Knowledge Base - Delete a knowledge base and its documents
- Reindex Knowledge Base - Trigger a full reindex
Knowledge Base Documents
Base path: /apiops/projects/{projectName}/knowledge-bases/{kbName}/documents
- Upload Document - Upload a document (multipart) to a knowledge base
- List Documents - List documents in a knowledge base
- Get Document - Get a single document by id
- Delete Document - Delete a document and its vectors
- Reindex Document - Reindex a single document without rebuilding the whole knowledge base
Reference Model
- Knowledge bases are name-based: a knowledge base is addressed by its
name, which is unique per project. Runtime IDs are never required in the path. - Documents are addressed by
id— a deliberate exception: documents have no natural unique name within a knowledge base (two files may share a filename), so document sub-resources are referenced by theirdocumentId. The parent knowledge base is still resolved bynamefirst, and the document service enforces a two-layer ownership check (documentIdANDknowledgeBaseIdANDprojectId) so a document id from another knowledge base or project is unreachable. - Upsert:
POST /{name}/creates the knowledge base, or updates it in place if a knowledge base with that name already exists in the project. - No secrets in these payloads:
AiKnowledgeBaseDTOandAiKnowledgeDocumentDTOcarry no secret fields.vectorDbRefandembeddingProviderRefare name-based references to other configured assets, not credentials. The document's internal storage reference (gridFsFileId) is intentionally excluded from responses.
Authentication
All endpoints require authentication using a Personal API Access Token (Authorization: Bearer {token}). JHipster JWTs do not work on APIops.
Permissions
- Reads (
GET) requireAI_DEVELOPMENT+VIEWpermission in the project. - Writes (
POST,PUT,DELETE, upload, reindex) requireAI_DEVELOPMENT+MANAGEpermission in the project.
Related Documentation
- AI Gateway API - Full AI Gateway APIops configuration surface
- Authentication Guide - How to obtain and use API tokens
- Error Handling - Error response formats