Skip to content

Commit

Permalink
logstash.get_pipeline - id is not a required parameter
Browse files Browse the repository at this point in the history
Auto-generated API code
  • Loading branch information
elasticmachine authored and picandocodigo committed Apr 6, 2023
1 parent 463289a commit 2e513cb
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ module Actions
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.7/logstash-api-get-pipeline.html
#
def get_pipeline(arguments = {})
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

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

method = Elasticsearch::API::HTTP_GET
path = "_logstash/pipeline/#{Utils.__listify(_id)}"
path = if _id
"_logstash/pipeline/#{Utils.__listify(_id)}"
else
"_logstash/pipeline"
end
params = {}

Elasticsearch::API::Response.new(
Expand Down

0 comments on commit 2e513cb

Please sign in to comment.