| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 | [[java-rest-high-ingest-get-pipeline]]=== Get Pipeline API[[java-rest-high-ingest-get-pipeline-request]]==== Get Pipeline RequestA `GetPipelineRequest` requires one or more `pipelineIds` to fetch.["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/IngestClientDocumentationIT.java[get-pipeline-request]--------------------------------------------------<1> The pipeline id to fetch==== Optional argumentsThe following arguments can optionally be provided:["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/IngestClientDocumentationIT.java[get-pipeline-request-masterTimeout]--------------------------------------------------<1> Timeout to connect to the master node as a `TimeValue`<2> Timeout to connect to the master node as a `String`[[java-rest-high-ingest-get-pipeline-sync]]==== Synchronous Execution["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/IngestClientDocumentationIT.java[get-pipeline-execute]--------------------------------------------------<1> Execute the request and get back the response in a GetPipelineResponse object.[[java-rest-high-ingest-get-pipeline-async]]==== Asynchronous ExecutionThe asynchronous execution of a get pipeline request requires both the `GetPipelineRequest`instance and an `ActionListener` instance to be passed to the asynchronousmethod:["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/IngestClientDocumentationIT.java[get-pipeline-execute-async]--------------------------------------------------<1> The `GetPipelineRequest` to execute and the `ActionListener` to use whenthe execution completesThe asynchronous method does not block and returns immediately. Once it iscompleted the `ActionListener` is called back using the `onResponse` methodif the execution successfully completed or using the `onFailure` method ifit failed.A typical listener for `GetPipelineResponse` looks like:["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/IngestClientDocumentationIT.java[get-pipeline-execute-listener]--------------------------------------------------<1> Called when the execution is successfully completed. The response isprovided as an argument<2> Called in case of failure. The raised exception is provided as an argument[[java-rest-high-ingest-get-pipeline-response]]==== Get Pipeline ResponseThe returned `GetPipelineResponse` allows to retrieve information about the executed operation as follows:["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/IngestClientDocumentationIT.java[get-pipeline-response]--------------------------------------------------<1> Check if a matching pipeline id was found or not.<2> Get the list of pipelines found as a list of `PipelineConfig` objects.<3> Get the individual configuration of each pipeline as a `Map<String, Object>`.
 |