Add a chunk text's hash to the source's owner allowlist, or remove it
Mark a flagged chunk safe from prompt-injection screening for agents using this source, or undo that. Needs chunk-edit access. Keyed by the chunk text, so editing the chunk drops the mark. At most 1000 chunks per source. Returns {success, content_hash, allowed, count}.
Args:
source_id: The source.
Returns:
Response: {"success", "content_hash", "allowed", "count"}, a
400 for a bad body or a full allowlist, or the access error.
Personal access token scope: sources:write.
bearerAuthorizationBearer <token>A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).
source_id*stringapplication/json- body
content_hash*stringThe chunk's injection.content_hash (sha256 of its text)
decision*stringallow marks the chunk safe from prompt-injection screening; clear undoes it
"allow""clear"Success
curl -X POST 'http://localhost:7091/api/sources/string/injection_review' \ -H 'Content-Type: application/json' \ -d '{ "content_hash": "string", "decision": "allow"}'POST /api/sources/{source_id}/graphrag/enable POST
Enable GraphRAG on a source: flips its config to graphrag mode and enqueues graph extraction over its embedded chunks. Requires VECTOR_STORE=pgvector and GRAPHRAG_ENABLED. Write access required (owner/editor). The config kind cannot be set to graphrag via the config PATCH endpoint. [Personal access token](/API/personal-access-tokens) scope: `sources:write`.
POST /api/manage_source_files POST
Add files, remove files, remove directories, or replace the whole file set (sync) of an existing source. The source is then re-ingested: only added, removed and edited files are re-embedded. [Personal access token](/API/personal-access-tokens) scope: `sources:write`.