---
type: api
title: Get Logstash pipelines
description: **All methods and paths for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-logstash-get-pipeline
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-logstash-get-pipeline
products:
  - Elasticsearch
---

# Get Logstash pipelines


Availability: Generally available since 7.12

## Paths

- `GET` `/_logstash/pipeline/{id}`
- `GET` `/_logstash/pipeline`

#### Path parameters

- `id` (union string | string[]) — optional, leave it out to use `/_logstash/pipeline`
  A comma-separated list of pipeline identifiers.

## Description

Get pipelines that are used for Logstash Central Management.

[Read the reference documentation](https://www.elastic.co/guide/en/logstash/8.19/logstash-centralized-pipeline-management.html)

## Required authorization

- Cluster privileges: `manage_logstash_pipelines`

## Authentication

- Api key: `Authorization: <value>`
  Elasticsearch APIs support key-based authentication.
  You must create an API key and use the encoded value in the request header.
  For example:
  
  
  ```
  curl -X GET "${ES_URL}/_cat/indices?v=true" \
    -H "Authorization: ApiKey ${API_KEY}"
  ```
  
  To get API keys, use the `/_security/api_key` APIs.
- Basic: `Authorization: Basic <credentials>`
- Bearer: `Authorization: Bearer <token>`
  Elasticsearch APIs support the use of bearer tokens in the `Authorization` HTTP header to authenticate with the API.
  For examples, refer to [Token-based authentication services](https://www.elastic.co/guide/en/elasticsearch/reference/current/token-authentication-services.html)

## Response

`application/json`

- `<string>` (object)
  - `description` (string)
    A description of the pipeline.
This description is not used by Elasticsearch or Logstash.
  - `last_modified` (union)
    The date the pipeline was last updated.
It must be in the `yyyy-MM-dd'T'HH:mm:ss.SSSZZ` strict_date_time format.
  - `pipeline` (string)
    The configuration for the pipeline.
  - `pipeline_metadata` (object)
    Optional metadata about the pipeline, which can have any contents.
This metadata is not generated or used by Elasticsearch or Logstash.
    - `type` (string)
    - `version` (string)
  - `pipeline_settings` (object)
    Settings for the pipeline.
It supports only flat keys in dot notation.
    - `pipeline.workers` (number)
      The number of workers that will, in parallel, execute the filter and output stages of the pipeline.
    - `pipeline.batch.size` (number)
      The maximum number of events an individual worker thread will collect from inputs before attempting to execute its filters and outputs.
    - `pipeline.batch.delay` (number)
      When creating pipeline event batches, how long in milliseconds to wait for each event before dispatching an undersized batch to pipeline workers.
    - `queue.type` (string)
      The internal queuing model to use for event buffering.
    - `queue.max_bytes` (string)
      The total capacity of the queue (`queue.type: persisted`) in number of bytes.
    - `queue.checkpoint.writes` (number)
      The maximum number of written events before forcing a checkpoint when persistent queues are enabled (`queue.type: persisted`).
  - `username` (string)
    The user who last updated the pipeline.
## Code examples

#### Console

```console
GET _logstash/pipeline/my_pipeline
```

#### JavaScript

```javascript
const response = await client.logstash.getPipeline({
  id: "my_pipeline",
});
```

#### Python

```python
resp = client.logstash.get_pipeline(
    id="my_pipeline",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_logstash/pipeline/my_pipeline" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.logstash().getPipeline(g -> g
    .id("my_pipeline")
);
```

#### PHP

```php
$resp = $client->logstash()->getPipeline([
    "id" => "my_pipeline",
]);
```

#### Ruby

```ruby
response = client.logstash.get_pipeline(
  id: "my_pipeline"
)
```

## Response examples

#### Logstash get pipeline response example1

A successful response from `GET _logstash/pipeline/my_pipeline`.

```json
{
  "my_pipeline": {
    "description": "Sample pipeline for illustration purposes",
    "last_modified": "2021-01-02T02:50:51.250Z",
    "pipeline_metadata": {
      "type": "logstash_pipeline",
      "version": "1"
    },
    "username": "elastic",
    "pipeline": "input {}\\n filter { grok {} }\\n output {}",
    "pipeline_settings": {
      "pipeline.workers": 1,
      "pipeline.batch.size": 125,
      "pipeline.batch.delay": 50,
      "queue.type": "memory",
      "queue.max_bytes": "1gb",
      "queue.checkpoint.writes": 1024
    }
  }
}
```

