Update Extraction Rule
PATCH merges only requested fields — omit a field to leave it unchanged. Supported optional fields: name, description, source, and mappings. When mappings is provided, it replaces the entire mappings list for the rule (there is no patch-by-entry). When source is provided, it replaces the rule source. Optimistic concurrency: pass etag from Get or List; mismatch returns HTTP 409 Conflict.
Responses
A successful response.
Patchable fields. Send any subset of name, description, source, and mappings. The other rule fields are not patch-eligible: id, created_at, updated_at, etag, and archived are server-managed (use the archive/unarchive endpoints to change archive state); scope is immutable on PATCH — to change scope, archive the rule and create a new one with the desired scope.
Whole-field replacement for source and mappings. When mappings is set, the entire mappings list is replaced — sending one mapping does not append, it overwrites. When source is set, the entire source is replaced. To edit inside those structures, Get the current rule, mutate the field locally, then send the whole rule back via PUT (or send the updated source / mappings value back via PATCH).
Clearing description. Omit description to leave it unchanged; send "description": "" to clear it.
Optimistic concurrency. Updates use the etag returned in the response of any Get or List call. Pass it on the next update; the server returns HTTP 409 Conflict if the rule has been modified by someone else in the meantime — re-fetch, reconcile, and retry.
PATCH vs PUT. Use this PATCH endpoint to change a few fields and leave the rest as-is. Use the sibling PUT /v2beta/extraction/rules/{id} (Replace Extraction Rule) when you have the full rule and want to overwrite every editable field.