﻿---
title: stack kb cases get-cases-by-alert cli command
description: Get cases for an alert Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4116/reference/elastic-cli/cli/stack/kb/cases/get-cases-by-alert
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb cases get-cases-by-alert cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb cases get-cases-by-alert --alert-id <alert-id> [options]
```

Get cases for an alert
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--alert-id string required">
    An identifier for the alert.
  </definition>
  <definition term="--owner string">
    A filter to limit the response to a specific set of applications. If this parameter is omitted, the response contains information about all the cases that the user has access to read.
    **Repeatable:** pass `--owner` multiple times to supply more than one value
  </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>