ACTIVE for that context.
Lifecycle
| Status | Meaning |
|---|---|
DRAFT | Editable working copy. Created with POST /api/admin/rulesets. Only drafts can be edited. |
ACTIVE | The live ruleset used for decisions in its context. Exactly one ruleset per context is active. |
INACTIVE | A previously active ruleset that was superseded. Can be reactivated by rollback. |
- Activate (
POST /api/admin/rulesets/{id}/activate) transitions aDRAFTtoACTIVEand automatically moves the previous active ruleset for that context toINACTIVE. - Rollback (
POST /api/admin/rulesets/{id}/rollback) reactivates anINACTIVEruleset, reverting to a known-good configuration.
The single-active-per-context guarantee is enforced, so two rulesets can
never be active for the same context simultaneously.
Contexts
Contexts let you run different rule strategies for different flows — for examplecheckout, subscription, or
default. The decision request’s context field selects which active ruleset applies. If a request names a
context that has no active ruleset, Specter falls back to the active ruleset for the default context. If
neither exists, no rules are evaluated and the decision is ALLOW.
Editing
Because onlyDRAFT rulesets are editable, the safe change workflow is:
Activate
POST /api/admin/rulesets/{id}/activate to make it live. The previous
active ruleset becomes inactive.Related
Rule engine
The rule types and evaluation model inside a ruleset.