Skip to main content
GET
Get a scenario's rules as rules text

Authorizations

x-api-key
string
header
required

Raw API key shown once when created in the Allocait app (Settings > API keys). Send it verbatim in this header; the server stores and compares only its SHA-256 hash. Allocait generates every key: alc_ followed by 64 lowercase hex characters. Keys issued before 2026-10-10 are 64 hex characters with no prefix and keep working. A key may carry an expiry (90 days or 1 year, or never). A malformed, unknown, revoked or expired key gets 401 with no further detail, and a malformed one is refused before any lookup. Keys cannot be created through this API.

Path Parameters

id
string<uuid>
required

scenario_id

Response

The scenario's rules as rules text

A scenario's current rules, as canonical rules text and as structured rules, in class display order.

scenario_id
string<uuid>
scenario_name
string
rules_text
string | null

The canonical rules text for this scenario's current rules: copy it, download it, paste it into an AI, or send it straight back to POST /scenarios/{id}/rules unchanged (it reports every class unchanged). Null when the scenario has no rules (rules is then []); there is no valid rules text for zero classes, so this is left unset rather than returning text that would fail its own re-import.

rules
object[]
rule_changes
object[]

Past values of this scenario's class rules, newest first (ADR-262): up to 20 entries, kept as the newest 20 per class rule. Facts only: no reason and no actor. A rule that was never changed has no entry, and an entry for a rule added before history was kept may be missing. Left out when the history cannot be read.