Knowledge Bases V2

Delete Knowledge Base

Changed on

Soft delete a knowledge base and clean up associated vector data.

This endpoint:

  1. Verifies KB exists and user has permission, locking the KB row
  2. In one transaction, soft deletes all chunks (lightrag_doc_chunks), all documents (knowledge_documents) and the knowledge base (is_deleted=True)
  3. Deletes the KB's vectors from Weaviate, best-effort, after the transaction commits: the legacy tenant collections (by workspace) and this tenant's objects in the v2 Doc_kb_<id>_chunks collection
  4. Preserves chunk access logs for analytics
  5. Leaves S3 files intact (for audit/recovery purposes)

Note: The knowledge base can be restored by setting is_deleted=False, but vector data will need to be re-ingested from the preserved chunks.

delete/knowledge_bases/v2/{kb_id}

Request

  • Base URL
    https://api.myaltimate.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.myaltimate.com/knowledge_bases/v2/{kb_id}
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

kb_idinteger required

Response

Successful Response

unknown required

Changes