Test Firewall Rules
Dry-run a rule set against sample text before you attach it to anything.
POST
Dry-run firewall rules against sample text
Runs a candidate
heuristics array against a sample text and returns what
matched. Nothing is stored and no policy is created.
Two properties make the result trustworthy:
- It compiles through the same validator the writer uses. A rule the tester
refuses is a rule
POST /v1/ai-gateway/firewall-policieswould also refuse, so the tester can never green-light a pattern that could not run. - It reports
skippedrules explicitly. A rule that fails to compile is named rather than silently ignored. On a liveblockpolicy a skipped rule is a fail-closed condition — the gateway refuses the request with503 firewall_policy_degradedrather than serve it under a policy it knows is only partly applied.
read capability on ai_gateway. See the control-plane overview for authentication, the {data, meta} envelope, pagination and error types.Authorizations
OAuth 2.1 authentication — recommended for new integrations. Access tokens
(kc_ prefix) are minted at the root-host token endpoint
https://api.knoxcall.com/oauth/token and passed as Authorization: Bearer <access_token>.
Public clients must use PKCE with the authorization_code grant; confidential
clients may use client_credentials. The first-party SDKs and the
knoxcall login CLI handle token minting, caching, refresh, and DPoP for you.
Body
application/json
The prompt text to scan.
Candidate rules to test alongside the built-ins.