Guardrails
PreviewList a guardrail's versions
The saved versions, newest first: the editor's History.
GET
cookie
better-auth.session_token<token>Better Auth session cookie. Production uses the __Secure- prefixed name.
guardrailId*stringFormat
uuidThe versions.
application/json- response
items*array<>curl -X GET 'https://wardn.example.com/api/v1/guardrails/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions'Example Response
{ "items": [ { "version": 1, "summary": "string", "mode": "enforce", "createdBy": { "id": "string", "name": "string" }, "createdAt": "2019-08-24T14:15:22Z" } ]}Save a guardrail as a new version PUT
The editor's Save version: name, owner, mode, where it applies and what it requires make the next version. `expectedVersion` is the version the editor opened; another answers 409 `guardrail.version_conflict` with `currentVersion`. A built-in guardrail keeps its name and kind.
Archive a guardrail POST
It stops applying. A built-in guardrail cannot be archived; turn it off instead. Its versions and the decisions that used it stay.