Bulk update document metadata
PATCH/v2/corpora/:corpus_key/documents
Initiates an asynchronous bulk metadata update for documents in a corpus.
Select documents with either document_ids or metadata_filter. If document_ids is provided, metadata_filter is ignored.
The same metadata object (from the request body) is applied to every matched document, using the chosen strategy.
merge (default) adds or overwrites only the supplied fields and leaves the rest intact; replace overwrites the entire metadata object.
Important: This is a best-effort operation.
See the response schema documentation for details on the behavior differences between metadata_filter and document_ids parameters.
Use the returned job_id to track progress via the Jobs API.
Request
Responses
- 200
- 202
- 400
- 403
- 404
- 504
Bulk metadata update completed successfully (synchronous mode).
Bulk metadata update accepted and queued.
Invalid request.
Permissions do not allow bulk updating document metadata.
Corpus not found.
Synchronous operation timed out. The error message contains the job_id to track status via Jobs API. The operation continues running in the background.