﻿---
title: stack kb security-exceptions-api import-exception-list cli command
description: Import an exception list Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4118/reference/elastic-cli/cli/stack/kb/security-exceptions-api/import-exception-list
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb security-exceptions-api import-exception-list cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb security-exceptions-api import-exception-list [options]
```

Import an exception list
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--overwrite">
    Determines whether existing exception lists with the same `list_id` are overwritten.
  </definition>
  <definition term="--as-new-list">
    Determines whether the list being imported will have a new `list_id` generated.
  </definition>
  <definition term="--file string">
    A `.ndjson` file containing the exception list
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>