# Query Evaluator Revisions

Source: https://agenta.ai/docs/reference/api/query-evaluator-revisions

`POST /evaluators/revisions/query`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Query evaluator revisions with filters, reference scoping, and pagination.

Returns revision payloads. Use `evaluator_refs`,
`evaluator_variant_refs`, or `evaluator_revision_refs` to scope
the query.

## Request body schema

Content type: `application/json` (required)

- `evaluator_revision` (object, nullable): Filter on revision attributes.
  - `flags` (object, nullable)
    - `is_application` (boolean, nullable)
    - `is_evaluator` (boolean, nullable)
    - `is_snippet` (boolean, nullable)
    - `is_managed` (boolean, nullable)
    - `is_custom` (boolean, nullable)
    - `is_llm` (boolean, nullable)
    - `is_hook` (boolean, nullable)
    - `is_code` (boolean, nullable)
    - `is_match` (boolean, nullable)
    - `is_feedback` (boolean, nullable)
    - `is_agent` (boolean, nullable)
    - `is_skill` (boolean, nullable)
    - `is_chat` (boolean, nullable)
    - `has_url` (boolean, nullable)
    - `has_script` (boolean, nullable)
    - `has_handler` (boolean, nullable)
    - `is_static` (boolean, nullable)
  - `tags` (object, nullable)
  - `meta` (object, nullable)
  - `name` (string, nullable)
  - `description` (string, nullable)
  - `slug` (string, nullable)
  - `slugs` (array of string, nullable)
  - `author` (string (uuid), nullable)
  - `authors` (array of string (uuid), nullable)
  - `date` (string (date-time), nullable)
  - `dates` (array of string (date-time), nullable)
  - `message` (string, nullable)
- `evaluator_refs` (array of object, nullable): Restrict to revisions under these evaluators.
  - `version` (string, nullable)
  - `slug` (string, nullable)
  - `id` (string (uuid), nullable)
- `evaluator_variant_refs` (array of object, nullable): Restrict to revisions under these variants.
  - `version` (string, nullable)
  - `slug` (string, nullable)
  - `id` (string (uuid), nullable)
- `evaluator_revision_refs` (array of object, nullable): Restrict to these specific revisions.
  - `version` (string, nullable)
  - `slug` (string, nullable)
  - `id` (string (uuid), nullable)
- `include_archived` (boolean, nullable): When true, include soft-deleted revisions.
- `grouping` (object, nullable): Divide matching revisions by artifact or variant and select one revision from each group.
  - `by` (string, one of: "artifact", "variant", required)
  - `get` (string, required)
- `windowing` (object, nullable): Cursor-based pagination controls.
  - `newest` (string (date-time), nullable)
  - `oldest` (string (date-time), nullable)
  - `next` (string (uuid), nullable)
  - `limit` (integer, nullable)
  - `order` (string, one of: "ascending", "descending", nullable)
  - `interval` (integer, nullable)
  - `rate` (number, nullable)

## Response schemas

### 200: Successful Response

- `count` (integer): Number of revisions in `evaluator_revisions`. Default: `0`.
- `evaluator_revisions` (array of object): Matching evaluator revisions.
  - `evaluator_variant_slug` (string, nullable)
  - `workflow_variant_slug` (string, nullable)
  - `evaluator_slug` (string, nullable)
  - `workflow_slug` (string, nullable)
  - `evaluator_variant_id` (string (uuid), nullable)
  - `workflow_variant_id` (string (uuid), nullable)
  - `evaluator_id` (string (uuid), nullable)
  - `workflow_id` (string (uuid), nullable)
  - `variant_slug` (string, nullable)
  - `artifact_slug` (string, nullable)
  - `variant_id` (string (uuid), nullable)
  - `artifact_id` (string (uuid), nullable)
  - `author` (string (uuid), nullable)
  - `date` (string (date-time), nullable)
  - `message` (string, nullable)
  - `flags` (object, nullable)
    - `is_application` (boolean) Default: `false`.
    - `is_evaluator` (boolean) Default: `false`.
    - `is_snippet` (boolean) Default: `false`.
    - `is_managed` (boolean) Default: `false`.
    - `is_custom` (boolean) Default: `false`.
    - `is_llm` (boolean) Default: `false`.
    - `is_hook` (boolean) Default: `false`.
    - `is_code` (boolean) Default: `false`.
    - `is_match` (boolean) Default: `false`.
    - `is_feedback` (boolean) Default: `false`.
    - `is_agent` (boolean) Default: `false`.
    - `is_skill` (boolean) Default: `false`.
    - `is_chat` (boolean) Default: `false`.
    - `has_url` (boolean) Default: `false`.
    - `has_script` (boolean) Default: `false`.
    - `has_handler` (boolean) Default: `false`.
    - `is_static` (boolean) Default: `false`.
  - `tags` (object, nullable)
  - `meta` (object, nullable)
  - `name` (string, nullable)
  - `description` (string, nullable)
  - `created_at` (string (date-time), nullable)
  - `updated_at` (string (date-time), nullable)
  - `deleted_at` (string (date-time), nullable)
  - `created_by_id` (string (uuid), nullable)
  - `updated_by_id` (string (uuid), nullable)
  - `deleted_by_id` (string (uuid), nullable)
  - `version` (string, nullable)
  - `slug` (string, nullable)
  - `id` (string (uuid), nullable)
  - `data` (object, nullable)
    - `uri` (string, nullable)
    - `url` (string, nullable)
    - `headers` (object, nullable)
    - `runtime` (string, one of: "python", "typescript", "javascript", nullable)
    - `script` (string, nullable)
    - `schemas` (object, nullable)
    - `parameters` (object, nullable)
- … more fields: see the OpenAPI specification.

### 422: Validation Error

- `detail` (array of object)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (Context)
