﻿---
title: stack kb links get-links cli command
description: List links library items Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4075/reference/elastic-cli/cli/stack/kb/links/get-links
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb links get-links cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb links get-links [options]
```

List links library items
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--page number">
    The page of results to return.
  </definition>
  <definition term="--per-page number">
    The number of results to return per page.
  </definition>
  <definition term="--query string">
    Filters results by `title` and `description` using Elasticsearch [`simple_query_string`](https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-simple-query-string-query) syntax. Multi-word terms require all words to match.
  </definition>
  <definition term="--tags string[]">
    A tag ID to include. Accepts a single tag ID or multiple tag IDs. When multiple are specified, library items matching any of the tag IDs are included.
    **Repeatable:** pass `--tags` multiple times to supply more than one value
  </definition>
  <definition term="--excluded-tags string[]">
    A tag ID to exclude. Accepts a single tag ID or multiple tag IDs. When multiple are specified, library items matching any of the tag IDs are excluded.
    **Repeatable:** pass `--excluded-tags` multiple times to supply more than one value
  </definition>
  <definition term="--tag-names string[]">
    A tag name to include. Accepts a single tag name or multiple tag names. When multiple are specified, library items matching any of the tag names are included. If the same name is shared by multiple tags, items matching any of those tags are included.
    **Repeatable:** pass `--tag-names` multiple times to supply more than one value
  </definition>
  <definition term="--excluded-tag-names string[]">
    A tag name to exclude. Accepts a single tag name or multiple tag names. When multiple are specified, library items matching any of the tag names are excluded. If the same name is shared by multiple tags, items matching any of those tags are excluded.
    **Repeatable:** pass `--excluded-tag-names` 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>