---
title: "POST /evaluate_query"
method: POST
path: "/evaluate_query"
tags: ["Check API"]
---

# POST /evaluate_query

`POST /evaluate_query`

Query v2: query for any expression.

Unlike `GET /facts`, which only lists facts you've added to Oso Cloud, you can use `POST /evaluate_query` to list derived information about any rule in your policy.

## Request body

- Query — A generic query comprising 1+ predicates conjuncted together.
  - `predicate` unknown[], required — Predicate name and variable names. INVARIANT: all variable names must exist in `constraints`. This ensures that all variables at least have a type.
    - unknown
  - `calls` array[], required — Predicate name and variable names. INVARIANT: all variable names must exist in `constraints`. This ensures that all variables at least have a type.
    - unknown[]
      - unknown
  - `constraints` object, required — Map of variable names to their type and value(s). Every variable is at least typed and may also be constrained to a set of values.
  - `context_facts` ConcreteFact[], required
    - `predicate` string, required
    - `args` TypedId[], required
      - `type` string, required
      - `id` string, required

## Response `200`

- QueryResult
  - `results` object[], required

## Other responses

- `default`

---

[API](https://skmtc.net/osohq/apis/oso-cloud-http-api.md) · [All operations](https://skmtc.net/osohq/apis/oso-cloud-http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/osohq/oso-cloud-http-api/versions/edaea3b218bd/schema)
