---
title: "Get a Runbook Run Preview for a Runbook"
method: GET
path: "/runbooks/{id}/runbookRuns/preview/{environment}"
tags: ["Runbooks"]
---

# Get a Runbook Run Preview for a Runbook

`GET /runbooks/{id}/runbookRuns/preview/{environment}`

Gets a Runbook Run Preview that describes what steps will/won't be run during a Runbook Run on a given environment (and tenant if supplied) for a Runbook.

## Path parameters

- `id` string, required
- `environment` string, required

## Query parameters

- `includeDisabledSteps` boolean
- `projectId` string
- `tenant` string

## Response `200`

Success

- RunbookRunPreviewResource
  - `Form` Form
    - `Elements` FormElement[]
      - `Control` Control
        - `Type` 'Checkbox' | 'TextArea' | 'Paragraph' | 'SubmitButtonGroup' | 'VariableValue'
      - `IsValueRequired` boolean
      - `Name` string
    - `Values` object
  - `Id` string
  - `LastModifiedBy` string
  - `LastModifiedOn` string, date-time
  - `Links` object
  - `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.net/octopus/apis/octopus-server-api.md) · [All operations](https://skmtc.net/octopus/apis/octopus-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/octopus/octopus-server-api/versions/bc9158facfc7/schema)
