---
title: "Partially evaluate a query"
method: POST
path: "/v1/compile/{path}"
---

# Partially evaluate a query

`POST /v1/compile/{path}`

## Path parameters

- `path` string, urlPath, required

## Query parameters

- `pretty` boolean
- `explain` 'notes' | 'fails' | 'full' | 'debug'
- `metrics` boolean
- `instrument` boolean

## Headers

- `Accept-Encoding` 'gzip'
- `Content-Encoding` 'gzip'

## Request body

- object
  - `options` CompileOptions — Additional options to use during partial evaluation. Only the disableInlining option is currently supported in OPA. EOPA may support additional options.
    - `disableInlining` string[] — A list of paths to exclude from partial evaluation inlining.
    - `targetDialects` string[] — The output targets for partial evaluation. Different targets will have different constraints.
    - `targetSQLTableMappings` object
      - `sqlserver` object
      - `mysql` object
      - `postgresql` object
      - `sqlite` object
    - `maskRule` string — The Rego rule to evaluate for generating column masks.
  - `unknowns` string[] — The terms to treat as unknown during partial evaluation.
  - `input` union — Arbitrary JSON used within your policies by accessing `input`
    - boolean
    - string
    - number
    - unknown[]
      - unknown
    - object

## Response `200`

Successful response

- CompileResultJSON — The partially evaluated result of the query. Result will be empty if the query is never true.
  - `result` object — The partially evaluated result of the query.
    - `query` object
    - `support` object

## Other responses

- `400` — Bad Request
- `500` — Server Error

---

[API](https://skmtc.dev/open-policy-agent/apis/eopa-rest-api.md) · [All operations](https://skmtc.dev/open-policy-agent/apis/eopa-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/open-policy-agent/eopa-rest-api/revisions/040f3d9e6786/schema)
