Skip to main content

run_sandbox

Function run_sandbox 

Source
async fn run_sandbox(
    __arg0: State<Arc<SharedState>>,
    __arg1: Json<SandboxRequest>,
) -> impl IntoResponse
Expand description

POST /api/debug/sandbox — run ad-hoc nodes or a named policy against a synthetic context.

Plugins execute for real: outbound callouts are made, rate-limit counters decrement, breakers trip, loggers fire. That is the point (a key-auth node that did not resolve real consumers would be a lie), but it is why the endpoint is gated behind debug.enabled + debug.sandbox on top of admin auth, and why every response carries a warning.

Errors: 400 for a malformed request or a plugin config the compiler rejects; 404 for an unknown policy; 504 if the run exceeds debug.sandbox_timeout_seconds.