Update every trigger matching a metadata pattern

One indexed statement instead of a per-patient walk. matchMetadata is a jsonb containment match on each trigger's own labels — Signals does not interpret the keys, so a caller chooses labels that make the sets it wants to move addressable.

A narrower pattern reaches fewer triggers. That is how one write updates a whole group while leaving per-patient exceptions untouched, provided the caller labelled them differently in the first place.

codes narrows on the trigger's own code column, and is REQUIRED when the update writes logic or constants. Those are written verbatim to every matched row, and a label pattern spans every code the caller has stamped — so an unscoped rule write puts one metric's rule onto every other metric's trigger and still returns a healthy matched. A metadata-only update may omit it, since relabelling is not code-specific.

CHECK matched. Zero means the pattern selected nothing — usually unlabelled triggers rather than a failed write, and it is not reported as an error.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
matchMetadata
object
required

Containment match against each trigger's metadata. Every key given must be
present and equal, so a narrower pattern reaches fewer triggers — that is
how one write updates a whole group while leaving per-patient exceptions
alone, provided the caller labelled them differently.

CHECK the matched count in the response. Zero means the pattern selected
nothing — usually unlabelled triggers rather than a failed write, and it is
not reported as an error.

codes
array of strings
length between 1 and 64

Restrict the update to these codes. code is a first-class column, not a
label, so this is an indexed predicate rather than a containment match.

REQUIRED when update carries logic or constants. A rule belongs to
one code — logic is written verbatim to every matched row, so an unscoped
rule write puts one metric's rule onto every other metric's trigger and
reports it as matched: N success. Metadata-only updates may omit it,
because a label is not code-specific.

Accepts a repeated value or one comma-separated string.

codes
update
object
required
Responses

400

The update carried no changes, or the payload failed validation.

401

Missing, malformed or unrecognised Basic credentials.

403

Authenticated, but the client's role does not permit this, or it is not attached to the patient.

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json