2018-06-08 13:59:39 +02:00
[role="xpack"]
[[logstash-configuration-management-api-create]]
2019-09-06 18:09:57 +02:00
=== Create Logstash pipeline API
++++
<titleabbrev>Create pipeline</titleabbrev>
++++
2018-06-08 13:59:39 +02:00
2019-09-06 18:09:57 +02:00
Create a centrally-managed Logstash pipeline, or update an existing pipeline.
2018-06-08 13:59:39 +02:00
2019-09-06 18:09:57 +02:00
experimental[This functionality is *experimental* and may be changed or removed completely in a future release.]
2018-12-05 22:20:58 +01:00
2019-09-06 18:09:57 +02:00
[[logstash-configuration-management-api-create-request]]
2018-06-08 13:59:39 +02:00
==== Request
`PUT /api/logstash/pipeline/<id>`
2019-09-06 18:09:57 +02:00
[[logstash-configuration-management-api-create-params]]
==== Path parameters
2018-06-08 13:59:39 +02:00
2019-09-06 18:09:57 +02:00
`id`::
(Required, string) The pipeline ID. Only alphanumeric characters, hyphens, and underscores are supported.
2018-06-08 13:59:39 +02:00
2019-09-06 18:09:57 +02:00
[[logstash-configuration-management-api-create-request-body]]
==== Request body
2018-06-08 13:59:39 +02:00
2019-09-06 18:09:57 +02:00
`description`::
(Optional, string) The pipeline description.
2018-06-08 13:59:39 +02:00
2019-09-06 18:09:57 +02:00
`pipeline`::
(Required, string) The pipeline definition.
2018-06-08 13:59:39 +02:00
2019-09-06 18:09:57 +02:00
`settings`::
(Optional, object) The pipeline settings. Supported settings, represented as object keys, are `pipeline.workers`, `pipeline.batch.size`, `pipeline.batch.delay`, `queue.type`, `queue.max_bytes`, and `queue.checkpoint.writes`.
2018-06-08 13:59:39 +02:00
2019-09-06 18:09:57 +02:00
[[logstash-configuration-management-api-create-codes]]
==== Response code
2018-06-08 13:59:39 +02:00
2019-09-06 18:09:57 +02:00
`204 No Content`::
Indicates a successful call.
2018-06-08 13:59:39 +02:00
[float]
2019-09-06 18:09:57 +02:00
[[logstash-configuration-management-api-create-example]]
==== Example
2018-06-08 13:59:39 +02:00
[source,js]
--------------------------------------------------
PUT api/logstash/pipeline/hello-world
{
"pipeline": "input { stdin {} } output { stdout {} }",
"settings": {
2019-04-02 20:47:42 +02:00
"queue.type": "persisted"
2018-06-08 13:59:39 +02:00
}
}
--------------------------------------------------
// KIBANA