Method: OpenSearch::API::Tasks::Actions#get

Defined in:
lib/opensearch/api/actions/tasks/get.rb

#get(arguments = {}) ⇒ Object

Returns information about a task. This functionality is Experimental and may be changed or removed completely in a future release. OpenSearch will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :task_id (String)

    Return the task with specified id (node_id:task_number)

  • :wait_for_completion (Boolean)

    Wait for the matching tasks to complete (default: false)

  • :timeout (Time)

    Explicit operation timeout

  • :headers (Hash)

    Custom HTTP headers



43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/opensearch/api/actions/tasks/get.rb', line 43

def get(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _task_id = arguments.delete(:task_id)

  method = OpenSearch::API::HTTP_GET
  path   = "_tasks/#{Utils.__listify(_task_id)}"
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end