Ana içeriğe geç

Knowledge Bases API

Endpoints

Knowledge Bases

Base path: /apiops/projects/{projectName}/knowledge-bases

Knowledge Base Documents

Base path: /apiops/projects/{projectName}/knowledge-bases/{kbName}/documents

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 their documentId. The parent knowledge base is still resolved by name first, and the document service enforces a two-layer ownership check (documentId AND knowledgeBaseId AND projectId) 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: AiKnowledgeBaseDTO and AiKnowledgeDocumentDTO carry no secret fields. vectorDbRef and embeddingProviderRef are 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) require AI_DEVELOPMENT + VIEW permission in the project.
  • Writes (POST, PUT, DELETE, upload, reindex) require AI_DEVELOPMENT + MANAGE permission in the project.