OpenSearch/docs/reference/ingest/apis/get-pipeline.asciidoc

137 lines
2.2 KiB
Plaintext

[[get-pipeline-api]]
=== Get pipeline API
++++
<titleabbrev>Get pipeline</titleabbrev>
++++
Returns information about one or more ingest pipelines.
This API returns a local reference of the pipeline.
////
[source,console]
----
PUT /_ingest/pipeline/my-pipeline-id
{
"description" : "describe pipeline",
"version" : 123,
"processors" : [
{
"set" : {
"field": "foo",
"value": "bar"
}
}
]
}
----
////
[source,console]
----
GET /_ingest/pipeline/my-pipeline-id
----
// TEST[continued]
[[get-pipeline-api-request]]
==== {api-request-title}
`GET /_ingest/pipeline/<pipeline>`
`GET /_ingest/pipeline`
[[get-pipeline-api-path-params]]
==== {api-path-parms-title}
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=path-pipeline]
[[get-pipeline-api-query-params]]
==== {api-query-parms-title}
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
[[get-pipeline-api-api-example]]
==== {api-examples-title}
[[get-pipeline-api-specific-ex]]
===== Get information for a specific ingest pipeline
[source,console]
----
GET /_ingest/pipeline/my-pipeline-id
----
// TEST[continued]
The API returns the following response:
[source,console-result]
----
{
"my-pipeline-id" : {
"description" : "describe pipeline",
"version" : 123,
"processors" : [
{
"set" : {
"field" : "foo",
"value" : "bar"
}
}
]
}
}
----
[[get-pipeline-api-version-ex]]
===== Get the version of an ingest pipeline
When you create or update an ingest pipeline,
you can specify an optional `version` parameter.
The version is useful for managing changes to pipeline
and viewing the current pipeline for an ingest node.
To check the pipeline version,
use the `filter_path` query parameter
to <<common-options-response-filtering, filter the response>>
to only the version.
[source,console]
----
GET /_ingest/pipeline/my-pipeline-id?filter_path=*.version
----
// TEST[continued]
The API returns the following response:
[source,console-result]
----
{
"my-pipeline-id" : {
"version" : 123
}
}
----
////
[source,console]
----
DELETE /_ingest/pipeline/my-pipeline-id
----
// TEST[continued]
[source,console-result]
----
{
"acknowledged": true
}
----
////