documents

Delete a document (requires explicit confirmation).

Deletes a document from the tenant's knowledge graph.

Without confirm=true (default): Returns 409 Conflict with a deletion_impact preview so the caller can make an informed decision about orphaned entities.

With confirm=true: Runs the cascade (chunks → relations → optionally exclusive entities → vectors → document row) inside a single RLS-scoped transaction and returns 204 No Content with an X-Deletion-Impact header carrying the pre-deletion counters (chunks, edges, entities_removed, entities_preserved).

Cross-tenant: returns 404 uniformly (RLS-transparent, no tenant leak).

delete/v1/documents/{document_id}

Request

  • Base URL: https://api.andish.ru (the document declares no server; this is the origin it was published from)
  • URL: https://api.andish.ru/v1/documents/{document_id}
  • Auth: none declared

Path parameters

document_idstring uuid required

Document UUID.

Query parameters

confirmboolean

Must be true to proceed with deletion. Omit (or false) to receive a 409 with deletion impact preview.

remove_orphansboolean

When confirm=true: if true (default), exclusive-to-this-doc entities are deleted along with their graph nodes and edges; if false, VDB entities are preserved as orphans (graph nodes/edges are still cleaned regardless, as they always become stale after document deletion).

Response

Deletion complete; X-Deletion-Impact header carries the pre-cascade counters.

Changes

No recorded changes to this operation across all 1 revision of this API.