---
title: "Query Query Variants"
method: POST
path: "/queries/variants/query"
tags: ["Queries"]
---

# Query Query Variants

`POST /queries/variants/query`

## Request body

- QueryVariantQueryRequest
  - `query_variant` QueryVariantQuery
    - `flags` object, nullable
    - `tags` object, nullable
    - `meta` object, nullable
    - `name` string, nullable
    - `description` string, nullable
    - `slug` string, nullable
    - `slugs` string[], nullable
  - `query_refs` Reference[], nullable
    - `version` string, nullable
    - `slug` string, nullable
    - `id` string, uuid, nullable
  - `query_variant_refs` Reference[], nullable
    - `version` string, nullable
    - `slug` string, nullable
    - `id` string, uuid, nullable
  - `include_archived` boolean, nullable
  - `windowing` Windowing
    - `newest` string, date-time, nullable
    - `oldest` string, date-time, nullable
    - `next` string, uuid, nullable
    - `limit` integer, nullable
    - `order` 'ascending' | 'descending', nullable
    - `interval` integer, nullable
    - `rate` number, nullable

## Response `200`

Successful Response

- QueryVariantsResponse
  - `count` integer
  - `query_variants` QueryVariant[]
    - `query_slug` string, nullable
    - `artifact_slug` string, nullable
    - `query_id` string, uuid, nullable
    - `artifact_id` string, uuid, nullable
    - `flags` object, nullable
    - `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
    - `slug` string, nullable
    - `id` string, uuid, nullable

## Other responses

- `422` — Validation Error

## Changes

> 359 revisions in range; 45 could not be searched.

- **2025-06-27** `e3e84db47198` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/queries/variants/query/post.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/revisions/713e4f3b7519/schema)
