---
search:
  tags:
    - Deploys
    - POST
seo:
  description: >-
    Says what deploying an app would do, without deploying it: every change,
    what blocks the… Reference for the POST /_luna/preflight endpoint in the
    Luna API.
sidebar:
  label: Preview a deploy
  badge: POST
title: Preview a deploy
type: openapi-operation
---
Says what deploying an app would do, without deploying it: every change, what blocks the deploy, what needs your say-so and what data it would leave behind. Where the new version migrates data, Luna also tries the migration on copies of a sample of real lunas.

`POST /_luna/preflight`

**Request body** (`application/json`, required)

- `tenant` (string, required) — The tenant to deploy to, by its full name.
- `entries` (string[], required) — The entry modules, relative to the app's root. At most one for each language. One path as a string works too, and so does the name \`entry\`.
- `manifests` (object) — The manifest of each entry module, by its path, as the SDK's build reports it.
- `files` (object) — The files of a small app: each path, relative and separated by \`/\`, with its contents as UTF-8 text.
- `tree` (object) — The files of an app that were uploaded before this request, each path with its hash and size.

Request body example:

```json
{
  "tenant": "string",
  "entries": [
    "string"
  ],
  "manifests": {
    "property1": {},
    "property2": {}
  },
  "files": {
    "property1": "string",
    "property2": "string"
  },
  "tree": {
    "property1": {
      "sha256": "string",
      "size": 0
    },
    "property2": {
      "sha256": "string",
      "size": 0
    }
  }
}
```

**Responses**

- `200` — What the deploy would do.
- `default` — The request failed. The status says how and \`error.message\` says why.

Response example, 200:

```json
{
  "changes": [
    "string"
  ],
  "blocked": [
    "string"
  ],
  "confirm": [
    "string"
  ],
  "deletes": [
    "string"
  ],
  "dryRun": [
    {
      "type": "string",
      "report": {
        "sampled": 0,
        "failures": [
          {
            "key": {},
            "error": "string"
          }
        ],
        "pendingMessages": 0,
        "pendingSchedules": 0
      }
    }
  ],
  "changedHandlers": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  }
}
```
