﻿---
title: stack kb security-attack-discovery-api get-attack-discovery-generations cli command
description: Get the latest Attack Discovery generations metadata for the current user Behaviour flags: --dry-run — validate all inputs and exit without performing...
url: https://www.elastic.co/elastic/docs-builder/docs/4097/reference/elastic-cli/cli/stack/kb/security-attack-discovery-api/get-attack-discovery-generations
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb security-attack-discovery-api get-attack-discovery-generations cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb security-attack-discovery-api get-attack-discovery-generations \
  [options]
```

Get the latest Attack Discovery generations metadata for the current user
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--end string">
    End of the time range for filtering generations. Accepts absolute timestamps (ISO 8601) or relative date math (e.g. "now", "now-24h").
  </definition>
  <definition term="--size number">
    The maximum number of generations to retrieve
  </definition>
  <definition term="--scheduled">
    Whether to filter by scheduled or ad-hoc attack discovery generations. If omitted, both types are returned. Use `true` to return only scheduled generations or `false` to return only ad-hoc (interactive or action-triggered) generations.
  </definition>
  <definition term="--start string">
    Start of the time range for filtering generations. Accepts absolute timestamps (ISO 8601) or relative date math (e.g. "now-7d").
  </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>