OPA logo

The Rego Playground

Strict

When enabled, the Rego compiler has an expanded set of constraints, which will be treated as errors when violated. E.g. duplicate imports, unused local variable assignments, shadowing of reserved 'input' and 'data' keywords, and use of some deprecated built-in functions.

Coverage

Coverage explains which statements were evaluated. Red expressions were never evaluated. Red rule heads were never defined. Green expressions were evaluated at least once. Green rule heads were defined at least once.

Built-in Error Behaviour

By default, built-in function errors are ignored, results will be from non-erroring code paths.

If Strict is selected, execution will exit early when the first built-in function error is encountered. If Show All is selected, all built-in errors from all code paths will be returned as an errors.

INPUT
DATA
OUTPUT
Built by Styra logo
OPA v??.??.??

Share

Install OPA

OPA installation docs
  • Linux
  • macOS
  • Windows

              
            

Run OPA with playground policy

Heads up! The Rego playground is intended for development. Don't rely on it for your production deployments.

              
            

Query OPA with playground input

Test by piping your playground's JSON input into your OPA served playground policy