---
title: "Discard a finished dry run"
method: POST
path: "/v1/entity:discardImport"
tags: ["Import-Export"]
---

# Discard a finished dry run

`POST /v1/entity:discardImport`

## Request

- Base URL: `https://entity.sls.epilot.io`
- URL: `https://entity.sls.epilot.io/v1/entity:discardImport`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-epilot-org-id`

Discards a dry run that has finished (`COMPLETED`), so it is no longer offered for import.
The job becomes `CANCELLED` and `GET /v1/entity:import:latest` stops returning it as ready.
For a file that requires a dry run (more than 50 rows), an import passing it as
`dry_run_job_id` then fails with `dry_run_required`. The dry run wrote nothing, and its
report stays available.

Only the user who ran the dry run can discard it (403 otherwise). Idempotent - discarding an
already discarded dry run answers 200. A running dry run is stopped with
`POST /v1/entity:abortImport` instead.

## Query parameters

- `job_id` string, required: The unique identifier of the import job.
- `schema` string, required

## Response `200`

The dry run is discarded.

- object
  - `status` string: `CANCELLED`
  - `jobPollId` string

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: No such import job
- `409`: The job is not a finished dry run (still running, or a real import)
- `429`: Too many requests

## Changes

- **2026-10-07** `dcab4cb50e1b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/epilot/apis/entity-api/changes/v1/entity:discardImport/post.md)

---

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