Policy

YAML policy inspection and scanner validation endpoints.

Policy endpoints operate on one gateway instance at a time. A request routed through a load-balanced service may reach any replica. Manage YAML policy through Helm values and the gateway ConfigMap; Cedar policy comes from Policy. When an admin token is configured, send Authorization: Bearer <admin-token>. Mutating requests also require X-Requested-With: XMLHttpRequest.

Get YAML Policy

Retrieve the active YAML policy from the gateway instance handling the request. Use the deployment’s Helm values and ConfigMap to manage policy changes.

MethodURL
GET/pty/federated-guardrails/v1/admin/policy

Input Fields

None. Requires the admin token when configured.

Output Fields

The active YAML policy as JSON, including scanner definitions, profiles, routing, and upstream configuration.


Validate Scanners

Probe each configured remote scanner on the instance handling the request to verify connectivity and response-format compatibility.

MethodURL
POST/pty/federated-guardrails/v1/admin/policy/validate-scanners

Input Fields

None. The gateway sends a probe request to each remote scanner.

Output Fields

Scanner connectivity and response-format validation results for this instance.


List Scanners

Return the scanners configured on the instance handling the request, along with their types.

MethodURL
GET/pty/federated-guardrails/v1/admin/policy/scanners

Input Fields

None.

Output Fields

Configured scanners and their types.


List Profiles

Return the policy profiles configured on the instance handling the request.

MethodURL
GET/pty/federated-guardrails/v1/admin/policy/profiles

Input Fields

None.

Output Fields

Configured policy profiles and their scanner configuration.


Response Codes

CodeDescription
200Request completed successfully.
401Authentication is missing or invalid.
403The authenticated user is not authorized.
404The requested resource or policy was not found.
422Request validation failed.
500The policy operation failed.
Last modified : October 28, 2026