---
title: "Query Simple Environments"
method: POST
path: "/simple/environments/query"
tags: ["Environments"]
---

# Query Simple Environments

`POST /simple/environments/query`

## Request body

- SimpleEnvironmentQueryRequest
  - `environment` SimpleEnvironmentQuery
    - `flags` EnvironmentQueryFlags
      - `is_guarded` boolean, nullable
    - `tags` object, nullable
    - `meta` object, nullable
    - `name` string, nullable
    - `description` string, nullable
    - `slug` string, nullable
    - `slugs` string[], nullable
  - `environment_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

- SimpleEnvironmentsResponse
  - `count` integer
  - `environments` SimpleEnvironment[]
    - `flags` EnvironmentFlags
      - `is_guarded` boolean
    - `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
    - `data` EnvironmentRevisionData — Per-app references for environment revision data. Keys are app-scoped identifiers (e.g., ``"pre.revision"``). Values are dicts of entity-type → Reference, providing full traceability:: { "pre.revision": { "application": Reference(id=..., slug=..., version=...), "application_variant": Reference(id=..., slug=..., version=...), "application_revision": Reference(id=..., slug=..., version=...), }, ... }
      - `references` object, nullable
    - `variant_id` string, uuid, nullable
    - `revision_id` string, uuid, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.net/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/versions/ea6421d829f1/schema)
