---
title: "Preview release targets for a resource"
method: POST
path: "/v1/workspaces/{workspaceId}/release-targets/resource-preview"
---

# Preview release targets for a resource

`POST /v1/workspaces/{workspaceId}/release-targets/resource-preview`

Simulates which release targets would be created if the given resource were added to the workspace. This is a dry-run endpoint — no resources or release targets are actually created.

## Path parameters

- `workspaceId` string, required

## Query parameters

- `limit` integer
- `offset` integer

## Request body

- ResourcePreviewRequest
  - `config` object, required
  - `identifier` string, required
  - `kind` string, required
  - `metadata` object, required
  - `name` string, required
  - `version` string, required

## Response `200`

Paginated list of items

- object
  - `items` ReleaseTargetPreview[], required
    - `deployment` Deployment, required
      - `description` string
      - `id` string, required
      - `jobAgentConfig` object, required
      - `jobAgentSelector` string, required — CEL expression to match job agents
      - `metadata` object
      - `name` string, required
      - `resourceSelector` string — CEL expression to determine if the deployment should be used
      - `slug` string, required
    - `environment` Environment, required
      - `createdAt` string, date-time, required
      - `description` string
      - `id` string, required
      - `metadata` object
      - `name` string, required
      - `resourceSelector` string — CEL expression to determine if the environment should be used
    - `system` System, required
      - `description` string
      - `id` string, required
      - `metadata` object
      - `name` string, required
      - `slug` string, required
      - `workspaceId` string, required
  - `limit` integer, required — Maximum number of items returned
  - `offset` integer, required — Number of items skipped
  - `total` integer, required — Total number of items available

## Other responses

- `400` — Invalid request

## Changes

> 50 revisions in range; 1 could not be searched.

- **2026-04-08** `6199a729d4a1` — 2 warning
  - removed the optional property `items/items/deployment/jobAgentId` from the response with the `200` status
  - removed the optional property `items/items/deployment/jobAgents` from the response with the `200` status
- **2026-04-08** `e8cfb6371d5e` — 1 info
  - the response property `items/items/deployment/jobAgentSelector` became required for the status `200`
- **2026-04-07** `cd9427a233bc` — 1 info
  - added the optional property `items/items/deployment/jobAgentSelector` to the response with the `200` status
- **2026-03-11** `ac4f338f40a7` — 2 breaking, 2 info
  - the `items/items/deployment/resourceSelector` response's property type/format changed from ``/`` to `string`/`` for status `200`
  - the `items/items/environment/resourceSelector` response's property type/format changed from ``/`` to `string`/`` for status `200`
  - removed `#/components/schemas/JsonSelector, #/components/schemas/CelSelector` from the `items/items/deployment/resourceSelector` response property `oneOf` list for the response status `200`
  - removed `#/components/schemas/JsonSelector, #/components/schemas/CelSelector` from the `items/items/environment/resourceSelector` response property `oneOf` list for the response status `200`
- …earlier changes not shown

[Full history](https://skmtc.dev/ctrlplanedev/apis/ctrlplane-api/changes/v1/workspaces/:workspaceId/release-targets/resource-preview/post.md)

---

[API](https://skmtc.dev/ctrlplanedev/apis/ctrlplane-api.md) · [All operations](https://skmtc.dev/ctrlplanedev/apis/ctrlplane-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ctrlplanedev/ctrlplane-api/revisions/156e0d264995/schema)
