Policy
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.
| Method | URL |
|---|---|
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.
| Method | URL |
|---|---|
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.
| Method | URL |
|---|---|
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.
| Method | URL |
|---|---|
GET | /pty/federated-guardrails/v1/admin/policy/profiles |
Input Fields
None.
Output Fields
Configured policy profiles and their scanner configuration.
Response Codes
| Code | Description |
|---|---|
200 | Request completed successfully. |
401 | Authentication is missing or invalid. |
403 | The authenticated user is not authorized. |
404 | The requested resource or policy was not found. |
422 | Request validation failed. |
500 | The policy operation failed. |
Feedback
Was this page helpful?