Skip to content

Commit 2e513cb

Browse files
elasticmachinepicandocodigo
authored andcommitted
logstash.get_pipeline - id is not a required parameter
Auto-generated API code
1 parent 463289a commit 2e513cb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb

+5-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ module Actions
3030
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.7/logstash-api-get-pipeline.html
3131
#
3232
def get_pipeline(arguments = {})
33-
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
34-
3533
arguments = arguments.clone
3634
headers = arguments.delete(:headers) || {}
3735

@@ -40,7 +38,11 @@ def get_pipeline(arguments = {})
4038
_id = arguments.delete(:id)
4139

4240
method = Elasticsearch::API::HTTP_GET
43-
path = "_logstash/pipeline/#{Utils.__listify(_id)}"
41+
path = if _id
42+
"_logstash/pipeline/#{Utils.__listify(_id)}"
43+
else
44+
"_logstash/pipeline"
45+
end
4446
params = {}
4547

4648
Elasticsearch::API::Response.new(

0 commit comments

Comments
 (0)