---
title: "Get a Runbook Run Preview for a Runbook Snapshot"
method: GET
path: "/{spaceId}/projects/{projectId}/runbookSnapshots/{id}/runbookRuns/preview/{environmentId}/{tenant}"
tags: ["RunbookSnapshots"]
---

# Get a Runbook Run Preview for a Runbook Snapshot

`GET /{spaceId}/projects/{projectId}/runbookSnapshots/{id}/runbookRuns/preview/{environmentId}/{tenant}`

## Request

- Base URL: `https://demo.octopus.app/api`
- URL: `https://demo.octopus.app/api/{spaceId}/projects/{projectId}/runbookSnapshots/{id}/runbookRuns/preview/{environmentId}/{tenant}`
- Auth: one of:
  - API key in header `X-Octopus-ApiKey`
  - API key in query parameter `ApiKey`
  - API key in header `X-NuGet-ApiKey`

Gets a document that describes what steps will/won't be run during a run to a given environment (and tenant if supplied)

## Path parameters

- `spaceId` string, required
- `projectId` string, required
- `id` string, required
- `environmentId` string, required
- `tenant` string, required

## Query parameters

- `includeDisabledSteps` boolean

## Response `200`

The requested Runbook Run preview

- RunbookRunPreviewResource
  - `Form` Form
    - `Elements` FormElement[]: Elements of the form.
      - `Control` Control
        - `Type` 'Checkbox' | 'TextArea' | 'Paragraph' | 'SubmitButtonGroup' | 'VariableValue'
      - `IsValueRequired` boolean: If true, the receiver of the form expects that a value will be provided for the element.
      - `Name` string: The name of the element. Must be unique within the form.
    - `Values` object: Values supplied for the form elements.
  - `Id` string: Gets or sets a unique identifier for this resource.
  - `LastModifiedBy` string: Gets or sets the username of the user who last modified this resource.
  - `LastModifiedOn` string, date-time: Gets or sets the date/time that this resource was last modified.
  - `Links` object: Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  - `StepsToExecute` DeploymentTemplateStep[]
    - `ActionId` string
    - `ActionName` string
    - `ActionNumber` string
    - `AvailableTagSets` TagSetPreview[]
      - `AvailableTags` TargetTagPreview[]
        - `SortOrder` integer
        - `TagId` string, required
        - `TagName` string, required
      - `SortOrder` integer
      - `TagSetId` string, required
      - `TagSetName` string, required
      - `TagSetType` string, required
    - `CanBeSkipped` boolean
    - `ExcludedMachines` ReferenceDataItem[]
      - `Id` string
      - `Name` string
    - `HasNoApplicableMachines` boolean
    - `IsDisabled` boolean
    - `MachineNames` string[]
    - `Machines` MachineDeploymentPreview[]
      - `HasLatestCalamari` boolean
      - `HealthStatus` 'Healthy' | 'HasWarnings' | 'Unhealthy' | 'Unavailable'
      - `Id` string
      - `Name` string
    - `Roles` string[]
    - `UnavailableMachines` ReferenceDataItem[]
      - `Id` string
      - `Name` string
  - `UseGuidedFailureModeByDefault` boolean

## Other responses

- `400`: Bad request. Either the payload was not structurally valid or business rules did not permit the operation.
- `404`: Not found. One or more of the entities involved in the operation was not found.

---

[API](https://skmtc.dev/octopus/apis/octopus-server-api.md) - [All operations](https://skmtc.dev/octopus/apis/octopus-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/octopus/apis/octopus-server-api/revisions/fe937c07da34?raw)
