Upsert a batch of rules.
Each entry carries an optional [Precondition]. Setting it to
DoesNotExist makes the entry a strict insert; Matches(v) rejects
the batch unless the rule’s current version is v; omitting it
(None) is unconditional. The whole batch is atomic: any failed
precondition or cap-exceeded condition rolls back the rest.
Body
The pattern that selects which scope/limit-key combinations the
rule applies to. Examples: "*", "scope1/*", "scope1/foo/bar".
Free-form description shown in the rule book; not consulted at runtime.
Soft-tombstone toggle. true parks the rule (the runtime treats
it as absent) without removing it.
Per-rule effective limits.
None on a field means "unlimited" (no rule constrains this dimension).
Under the bilrost feature this type is also the wire shape persisted
inside [crate::PersistedRule]; under serde it's the JSON wire shape
for the admin REST model — adding a new limit kind here means allocating
a fresh bilrost(tag(...)) next to the new field.
Optimistic-concurrency guard. { "type": "matches", "version": v }
requires the rule's current version to be v;
{ "type": "does_not_exist" } requires the rule to be absent
(strict insert); { "type": "none" } (or omitted) is
unconditional.
- Option 1
- Option 2
- Option 3
Response
Rules upserted
Millis since UNIX epoch.
x >= 0Per-rule effective limits.
None on a field means "unlimited" (no rule constrains this dimension).
Under the bilrost feature this type is also the wire shape persisted
inside [crate::PersistedRule]; under serde it's the JSON wire shape
for the admin REST model — adding a new limit kind here means allocating
a fresh bilrost(tag(...)) next to the new field.
Per-rule version: bumped on runtime-relevant changes.
x >= 0