Skip to main content

delete_policy

Function delete_policy 

Source
async fn delete_policy(
    __arg0: State<Arc<SharedState>>,
    __arg1: Path<String>,
) -> impl IntoResponse
Expand description

DELETE /api/policies/{name} — removes the named policy, then revalidates and recompiles. Returns {"status": "deleted"} on success.

Errors: 404 Not Found if the policy does not exist; 400 Bad Request if recompilation fails (e.g. a route still references the policy).