List guardrails
const url = 'https://example.com/v1/guardrails?limit=25&scopeKind=tenant&inherit=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/guardrails?limit=25&scopeKind=tenant&inherit=true' \ --header 'Authorization: Bearer <token>'Cursor-paginated list of registered guardrails. Optional ?name= filters by prefix on guardrail id.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”1..100. Default 25.
Where the previous page ended: its nextCursor, as it came. A runtime that seals cursors takes one only for the same list, filters and caller, within a day; otherwise 400 bad-input, and the list starts again without it. Absent → first page.
Prefix match on the resource id.
Discriminator for the ?scopeKind + ?scopeId + ?inherit triplet. Tenant carries no id (implicit from session); org/project require scopeId.
Optional scope discriminator. If absent, no scope filter is applied.
Required IF scopeKind is org or project. MUST be absent if scopeKind=tenant (tenant is implicit from the session). Malformed combinations return 400 scope-invalid.
Default true. false = literal-at-this-scope only (admin/audit view). Load-bearing for policy/config-scoped resources (mcp-endpoints); documented no-op for content-scoped resources (agents/flows/tools/…).
Responses
Section titled “Responses”Page of guardrails.
object
object
The guardrail’s project. Absent when the runtime doesn’t record it: a pack kindgi dev serves from disk, or a runtime before Kindgi 0.1.6.
How the guardrail is checked. Open string: the built-in kinds are listed in examples; adapters register strategies for their own kinds.
Reference to the concrete check implementation registered server-side.
object
object
What a failed check does to the agent turn. Open string: the built-in actions are listed in examples, and any other non-empty name is accepted. In 0.1 the runtime acts only on halt: the turn fails with guardrail-violation and its response is not stored. Any other value is recorded as a violation, as log-only is, and the turn completes: nothing runs the turn again, escalates or calls a compensating tool.
The attempts a retry asks for. In 0.1 nothing acts on it: there’s no second attempt.
object
Where an escalate goes. In 0.1 nothing escalates.
The tool id a compensate names. In 0.1 that tool isn’t called.
object
object
object
Opaque cursor for the next page. Absent when hasMore: false.
Example
{ "data": [ { "kind": "zero-llm", "action": { "on-violation": "halt" }, "severity": "info", "scope": { "when": "always" } } ]}Malformed query parameter.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}