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

# Get Logstash pipelines


Availability:

## Paths

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

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch-serverless/authentication#apikeyauth)

#### Path Parameters

- `id` (union Id | [] Id) — 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.

## Required authorization

* Cluster privileges: `manage_logstash_pipelines`

[Centralized pipeline management](https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management)

## Response

`application/json`

Type: `map string to 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
    }
  }
}
```

