Skip to main content
PATCH
Update

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

data_id
string<uuid>
required

UUID of the existing document to update (returned by GET /api/v1/datasets/{dataset_id}/data).

Example:

"9c4e4a4b-2b1a-4f6e-9d3a-1c2b3d4e5f6a"

dataset_id
string<uuid>
required

UUID of the dataset containing the document to update.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

chunk_level_diff
boolean
default:true

Diff the new content against the stored text and re-ingest only the affected chunks. Falls back to the full rebuild (memory dropped, row refreshed) when chunk-level preconditions are not met.

Body

multipart/form-data
data
file[]
required

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_set
string[] | null

Node identifiers used to organize and filter data points in the graph.

Example:

Response

Successful Response

Per-document outcome of update().

status says what happened: the chunk-level path replaced chunks (incremental) or found nothing to change (unchanged), the whole document was rebuilt (full_rebuild), or the rebuild's cognify run errored (failed, with error naming the cause so the call can be retried). A rebuild always carries fallback, naming why the chunk-level path did not run or that the caller switched it off, and duration_seconds makes a slow update visible next to its reason.

The chunk counters are work done by the chunk-level path — added can exceed the net change when a re-cut chunk with unchanged content is re-extracted in place — and total_chunks is the count after the update. redated_chunks are kept chunks whose text did not change but whose date context did (an edit upstream changed the year a year-less date inherits), so they were re-extracted at their final position under their own id; they are included in added_chunks and excluded from reindexed_chunks, which counts only kept chunks renumbered in place. The counters are None on a rebuild, which has no diff. The document keeps its data_id on every path.

status
enum<string>
required
Available options:
incremental,
unchanged,
full_rebuild,
failed
data_id
string<uuid>
required
dataset_id
string<uuid>
required
duration_seconds
number
required
regions
integer | null
deleted_chunks
integer | null
added_chunks
integer | null
reused_chunks
integer | null
redated_chunks
integer | null
kept_chunks
integer | null
reindexed_chunks
integer | null
total_chunks
integer | null
pipeline_run_id
string<uuid> | null
fallback
Fallback · object | null

Why the full rebuild ran instead of the chunk-level update.

error
UpdateError · object | null

Why the rebuild's cognify run failed.