﻿---
title: stack kb security-endpoint-management-api endpoint-get-file-action cli command
description: Get a file 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-endpoint-management-api/endpoint-get-file-action
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb security-endpoint-management-api endpoint-get-file-action cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb security-endpoint-management-api endpoint-get-file-action \
  --endpoint-ids <endpoint-ids> \
  --parameters <parameters> \
  [options]
```

Get a file
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--endpoint-ids string[] required">
    **Repeatable:** pass `--endpoint-ids` multiple times to supply more than one value
  </definition>
  <definition term="--parameters string required">
  </definition>
  <definition term="--agent-type enum">
    **Values:** endpoint, sentinel_one, crowdstrike, microsoft_defender_endpoint
  </definition>
  <definition term="--alert-ids string[]">
    If this action is associated with any alerts, they can be specified here. The action will be logged in any cases associated with the specified alerts. Max of 50.
    **Repeatable:** pass `--alert-ids` multiple times to supply more than one value
  </definition>
  <definition term="--case-ids string[]">
    The IDs of cases where the action taken will be logged. Max of 50.
    **Repeatable:** pass `--case-ids` multiple times to supply more than one value
  </definition>
  <definition term="--comment string">
  </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>