Fetch an guardrail
const url = 'https://example.com/v1/guardrails/example';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/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”GuardrailId — unique identifier for the guardrail.
Responses
Section titled “Responses”Guardrail.
object
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 happens when the guardrail fires. Open string: the built-in actions are listed in examples; any other name needs an action handler registered under it where the guardrail is evaluated.
object
object
object
object
Example
{ "kind": "zero-llm", "action": { "on-violation": "halt" }, "severity": "info", "scope": { "when": "always" }}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" }}No guardrail with that id under this tenant.
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" }}