---
title: "Resolve Environment Revision Endpoint"
method: POST
path: "/environments/revisions/resolve"
tags: ["Environments"]
---

# Resolve Environment Revision Endpoint

`POST /environments/revisions/resolve`

Resolve embedded references in an environment revision configuration.

This endpoint:
1. Fetches the environment revision
2. Resolves all @ag.references tokens in the configuration
3. Returns the revision with resolved configuration + metadata

## Request body

- EnvironmentRevisionResolveRequest
  - `environment_ref` Reference
    - `version` string, nullable
    - `slug` string, nullable
    - `id` string, uuid, nullable
  - `environment_variant_ref` Reference
    - `version` string, nullable
    - `slug` string, nullable
    - `id` string, uuid, nullable
  - `environment_revision_ref` Reference
    - `version` string, nullable
    - `slug` string, nullable
    - `id` string, uuid, nullable
  - `max_depth` integer, nullable
  - `max_embeds` integer, nullable
  - `error_policy` 'exception' | 'placeholder' | 'keep'

## Response `200`

Successful Response

- EnvironmentRevisionResolveResponse
  - `support_id` string, nullable
  - `support_ts` string, date-time, nullable
  - `count` integer
  - `environment_revision` EnvironmentRevision
    - `environment_variant_id` string, uuid, nullable
    - `variant_id` string, uuid, nullable
    - `environment_id` string, uuid, nullable
    - `artifact_id` string, uuid, nullable
    - `author` string, uuid, nullable
    - `date` string, date-time, nullable
    - `message` string, 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
    - `version` string, 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
  - `resolution_info` ResolutionInfo
    - `references_used` object[], required
    - `depth_reached` integer, required
    - `embeds_resolved` integer, required
    - `errors` string[]

## Other responses

- `422` — Validation Error

## Changes

- **2026-05-07** `dc41a70e3ad8` — 3 breaking, 3 info
  - removed `#/components/schemas/agenta__sdk__models__shared__Reference` from the `environment_ref` request property `anyOf` list
  - removed `#/components/schemas/agenta__sdk__models__shared__Reference` from the `environment_revision_ref` request property `anyOf` list
  - removed `#/components/schemas/agenta__sdk__models__shared__Reference` from the `environment_variant_ref` request property `anyOf` list
  - added `#/components/schemas/Reference` to the `environment_ref` request property `anyOf` list
  - …2 more
- **2026-04-23** `925e8b901a26` — 2 info
  - added the optional property `support_id` to the response with the `200` status
  - added the optional property `support_ts` to the response with the `200` status
- **2026-04-18** `c469c2f6cdba` — 1 info
  - endpoint added
- **2025-06-27** `e3e84db47198` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/environments/revisions/resolve/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.dev/agenta-ai/apis/agenta-api/revisions/911adb12ae11?raw)
