﻿---
title: stack kb security-osquery-api osquery-get-scheduled-action-results cli command
description: Get scheduled action results Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4089/reference/elastic-cli/cli/stack/kb/security-osquery-api/osquery-get-scheduled-action-results
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb security-osquery-api osquery-get-scheduled-action-results cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb security-osquery-api osquery-get-scheduled-action-results \
  --schedule-id <schedule-id> \
  --execution-count <execution-count> \
  [options]
```

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

## Options

<definitions>
  <definition term="--schedule-id string required">
    The schedule ID of the scheduled query.
  </definition>
  <definition term="--execution-count string required">
    The execution count for this scheduled query run.
  </definition>
  <definition term="--kuery string">
    The kuery to filter the results by.
  </definition>
  <definition term="--page number">
    The page number to return. The default is 1.
  </definition>
  <definition term="--page-size number">
    The number of results to return per page. The default is 20.
  </definition>
  <definition term="--sort string">
    The field that is used to sort the results.
  </definition>
  <definition term="--sort-order enum">
    Specifies the sort order.
    **Values:** asc, desc
  </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>