Get pipeline API

Get pipeline API

New API reference

For the most up-to-date API details, refer to Logstash APIs.

This API retrieves pipelines used for Logstash Central Management.

Request

GET _logstash/pipeline

GET _logstash/pipeline/<pipeline_id>

Prerequisites

  • If the Elasticsearch security features are enabled, you must have the manage_logstash_pipelines cluster privilege to use this API.

Description

Retrieve one or more Logstash pipelines.

Path parameters

<pipeline_id>

(Optional, string) Comma-separated list of pipeline identifiers.

Examples

The following example retrieves the pipeline named my_pipeline:

  1. resp = client.logstash.get_pipeline(
  2. id="my_pipeline",
  3. )
  4. print(resp)
  1. response = client.logstash.get_pipeline(
  2. id: 'my_pipeline'
  3. )
  4. puts response
  1. const response = await client.logstash.getPipeline({
  2. id: "my_pipeline",
  3. });
  4. console.log(response);
  1. GET _logstash/pipeline/my_pipeline

If the request succeeds, the body of the response contains the pipeline definition:

  1. {
  2. "my_pipeline": {
  3. "description": "Sample pipeline for illustration purposes",
  4. "last_modified": "2021-01-02T02:50:51.250Z",
  5. "pipeline_metadata": {
  6. "type": "logstash_pipeline",
  7. "version": "1"
  8. },
  9. "username": "elastic",
  10. "pipeline": "input {}\n filter { grok {} }\n output {}",
  11. "pipeline_settings": {
  12. "pipeline.workers": 1,
  13. "pipeline.batch.size": 125,
  14. "pipeline.batch.delay": 50,
  15. "queue.type": "memory",
  16. "queue.max_bytes": "1gb",
  17. "queue.checkpoint.writes": 1024
  18. }
  19. }
  20. }