Method: Elasticsearch::API::MachineLearning::Actions#validate
- Defined in:
- lib/elasticsearch/api/actions/machine_learning/validate.rb
#validate(arguments = {}) ⇒ Object
Validates an anomaly detection job.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/elasticsearch/api/actions/machine_learning/validate.rb', line 32 def validate(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ml.validate' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = '_ml/anomaly_detectors/_validate' params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |