Update
Update data in a dataset.
This endpoint updates existing documents in a specified dataset by providing the data_id of the existing document to update and the new document with the changes as the data. The document is updated, analyzed, and the changes are integrated into the knowledge graph.
Request Parameters
- data_id (UUID, required, query): UUID of the existing document to update (returned by GET /api/v1/datasets/{dataset_id}/data)
- dataset_id (UUID, required, query): UUID of the dataset containing the document to update
- data (List[UploadFile]): New version of the document that replaces the existing one.
- node_set (Optional[List[str]]): List of node identifiers for graph organization and access control. Used for grouping related data points in the knowledge graph.
- chunk_level_diff (bool, query, default true): Replace only the chunks affected by the edit instead of re-ingesting the whole document.
Response
With chunk_level_diff, a summary of the incremental operation (same keys for
either status):
{"status": "incremental" | "unchanged", "regions": n, "deleted_chunks": n, "added_chunks": n, "reused_chunks": n, "kept_chunks": n, "reindexed_chunks": n}.
When the full flow runs (chunk_level_diff disabled, or its preconditions not met),
pipeline run information for the delete + re-add + cognify operation.
Error Codes
- 422 Unprocessable Entity: data_id or dataset_id missing or not a valid UUID
- 403 Forbidden: User lacks write permission on the dataset
- 500 Internal Server Error: Pipeline run errored or an unexpected error occurred during the update
Notes
- Chunk-level updates keep unaffected chunks, their entities, and their summaries untouched; only the edited region is re-extracted.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
UUID of the existing document to update (returned by GET /api/v1/datasets/{dataset_id}/data).
"9c4e4a4b-2b1a-4f6e-9d3a-1c2b3d4e5f6a"
UUID of the dataset containing the document to update.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Diff the new content against the stored text and re-ingest only the affected chunks. Falls back to the full delete + re-add + cognify flow when chunk-level preconditions are not met.
Body
New version of the document that replaces the existing one. With chunk_level_diff enabled (default) only the chunks affected by the edit are replaced; otherwise the document is deleted and re-ingested.
Node identifiers for graph organization and access control.
Response
Successful Response