Get OPA policy by ID
opa_get_policyRetrieve a policy's Rego source from OPA by ID, with optional AST inclusion.
Instructions
Fetch a single policy by ID from the running OPA server. Returns the Rego source; the parsed AST is omitted unless asked for, since it is roughly forty times the size of the source it came from. Use rego_parse_ast on the source when an AST is what's wanted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Policy ID, e.g. "rbac" or "policies/auth/main". | |
| includeAst | No | Include OPA's parsed AST alongside the source. Off by default. |