---
title: "Unarchive Simple Query"
method: POST
path: "/simple/queries/{query_id}/unarchive"
tags: ["Queries"]
---

# Unarchive Simple Query

`POST /simple/queries/{query_id}/unarchive`

## Path parameters

- `query_id` string, uuid, required

## Response `200`

Successful Response

- SimpleQueryResponse
  - `count` integer
  - `query` SimpleQuery
    - `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
    - `flags` QueryFlags
    - `tags` object, nullable
    - `meta` object, nullable
    - `data` QueryRevisionDataOutput
      - `formatting` Formatting
        - `focus` 'trace' | 'span'
        - `format` 'agenta' | 'opentelemetry'
      - `filtering` FilteringOutput
        - `operator` 'and' | 'or' | 'not' | 'nand' | 'nor'
        - `conditions` union[]
          - union
            - Condition
              - …
            - FilteringOutput — recursive
      - `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
      - `trace_ids` string[], nullable
      - `traces` TraceOutput[], nullable
        - `spans` object, nullable
        - `trace_id` string, nullable
    - `variant_id` string, uuid, nullable
    - `revision_id` string, uuid, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-03** `fc532d6dc820` — 6 info
  - added the optional property `query/anyOf[subschema #1: SimpleQuery]/data/anyOf[subschema #1: QueryRevisionData]/traces/anyOf[subschema #1]/items/spans/anyOf[subschema #1]/additionalProperties/anyOf[subschema #1: SpansNode]/agent_id` to the response with the `200` status
  - added the optional property `query/anyOf[subschema #1: SimpleQuery]/data/anyOf[subschema #1: QueryRevisionData]/traces/anyOf[subschema #1]/items/spans/anyOf[subschema #1]/additionalProperties/anyOf[subschema #1: SpansNode]/session_id` to the response with the `200` status
  - added the optional property `query/anyOf[subschema #1: SimpleQuery]/data/anyOf[subschema #1: QueryRevisionData]/traces/anyOf[subschema #1]/items/spans/anyOf[subschema #1]/additionalProperties/anyOf[subschema #1: SpansNode]/user_id` to the response with the `200` status
  - added the optional property `query/anyOf[subschema #1: SimpleQuery]/data/anyOf[subschema #1: QueryRevisionData]/traces/anyOf[subschema #1]/items/spans/anyOf[subschema #1]/additionalProperties/anyOf[subschema #2]/items/agent_id` to the response with the `200` status
  - …2 more
- **2026-05-19** `a7f9a6823230` — 2 warning
  - removed the optional property `support_id` from the response with the `200` status
  - removed the optional property `support_ts` from the response with the `200` status
- …earlier changes not shown

[Full history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/simple/queries/:query_id/unarchive/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)
