latestOpenAPI 3.1.02026-08-197104501.1 MB
8fbaab4fc7c5
Policies
Test Pipeline
Test a guardrail pipeline with sample messages.
Executes the pipeline steps against the provided test messages and returns step-by-step results showing which guardrails passed/failed, actions taken, and timing information.
Example Request:
curl -X POST "http://localhost:4000/policies/test-pipeline" \
-H "Authorization: Bearer <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"pipeline": {
"mode": "pre_call",
"steps": [
{"guardrail": "pii-guard", "on_pass": "next", "on_fail": "block"}
]
},
"test_messages": [{"role": "user", "content": "My SSN is 123-45-6789"}]
}'
post/policies/test-pipeline
Request body
Response
Successful Response
{"stackTrail":"paths:/policies/test-pipeline:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}