module Elasticsearch::XPack::API::MachineLearning::Actions
Public Instance Methods
Closes one or more anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle.
@option arguments [String] :job_id The name of the job to close @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) @option arguments [Boolean] :allow_no_jobs Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) Deprecated @option arguments [Boolean] :force True if the job should be forcefully closed @option arguments [Time] :timeout Controls the time to wait until a job has closed. Default to 30 minutes @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The URL params optionally sent in the body
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-close-job.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/close_job.rb, line 35 def close_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_close" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Deletes a calendar.
@option arguments [String] :calendar_id The ID of the calendar to delete @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-delete-calendar.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar.rb, line 30 def delete_calendar(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _calendar_id = arguments.delete(:calendar_id) method = Elasticsearch::API::HTTP_DELETE path = "_ml/calendars/#{Elasticsearch::API::Utils.__listify(_calendar_id)}" params = {} body = nil perform_request(method, path, params, body, headers).body end
Deletes scheduled events from a calendar.
@option arguments [String] :calendar_id The ID of the calendar to modify @option arguments [String] :event_id The ID of the event to remove from the calendar @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-delete-calendar-event.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_event.rb, line 31 def delete_calendar_event(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] raise ArgumentError, "Required argument 'event_id' missing" unless arguments[:event_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _calendar_id = arguments.delete(:calendar_id) _event_id = arguments.delete(:event_id) method = Elasticsearch::API::HTTP_DELETE path = "_ml/calendars/#{Elasticsearch::API::Utils.__listify(_calendar_id)}/events/#{Elasticsearch::API::Utils.__listify(_event_id)}" params = {} body = nil perform_request(method, path, params, body, headers).body end
Deletes anomaly detection jobs from a calendar.
@option arguments [String] :calendar_id The ID of the calendar to modify @option arguments [String] :job_id The ID of the job to remove from the calendar @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-delete-calendar-job.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_job.rb, line 31 def delete_calendar_job(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _calendar_id = arguments.delete(:calendar_id) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_DELETE path = "_ml/calendars/#{Elasticsearch::API::Utils.__listify(_calendar_id)}/jobs/#{Elasticsearch::API::Utils.__listify(_job_id)}" params = {} body = nil perform_request(method, path, params, body, headers).body end
Deletes an existing data frame analytics job.
@option arguments [String] :id The ID of the data frame analytics to delete @option arguments [Boolean] :force True if the job should be forcefully deleted @option arguments [Time] :timeout Controls the time to wait until a job is deleted. Defaults to 1 minute @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/delete-dfanalytics.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/delete_data_frame_analytics.rb, line 32 def delete_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE path = "_ml/data_frame/analytics/#{Elasticsearch::API::Utils.__listify(_id)}" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Deletes an existing datafeed.
@option arguments [String] :datafeed_id The ID of the datafeed to delete @option arguments [Boolean] :force True if the datafeed should be forcefully deleted @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-delete-datafeed.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/delete_datafeed.rb, line 31 def delete_datafeed(arguments = {}) raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_DELETE path = "_ml/datafeeds/#{Elasticsearch::API::Utils.__listify(_datafeed_id)}" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Deletes expired and unused machine learning data.
@option arguments [String] :job_id The ID of the job(s) to perform expired data hygiene for @option arguments [Number] :requests_per_second The desired requests per second for the deletion processes. @option arguments [Time] :timeout How long can the underlying delete processes run until they are canceled @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body deleting expired data parameters
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-delete-expired-data.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/delete_expired_data.rb, line 33 def delete_expired_data(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_DELETE path = if _job_id "_ml/_delete_expired_data/#{Elasticsearch::API::Utils.__listify(_job_id)}" else "_ml/_delete_expired_data" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Deletes a filter.
@option arguments [String] :filter_id The ID of the filter to delete @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-delete-filter.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/delete_filter.rb, line 30 def delete_filter(arguments = {}) raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _filter_id = arguments.delete(:filter_id) method = Elasticsearch::API::HTTP_DELETE path = "_ml/filters/#{Elasticsearch::API::Utils.__listify(_filter_id)}" params = {} body = nil perform_request(method, path, params, body, headers).body end
Deletes forecasts from a machine learning job.
@option arguments [String] :job_id The ID of the job from which to delete forecasts @option arguments [String] :forecast_id The ID of the forecast to delete, can be comma delimited list. Leaving blank implies `_all` @option arguments [Boolean] :allow_no_forecasts Whether to ignore if `_all` matches no forecasts @option arguments [Time] :timeout Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-delete-forecast.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb, line 33 def delete_forecast(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) _forecast_id = arguments.delete(:forecast_id) method = Elasticsearch::API::HTTP_DELETE path = if _job_id && _forecast_id "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_forecast/#{Elasticsearch::API::Utils.__listify(_forecast_id)}" else "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_forecast" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Deletes an existing anomaly detection job.
@option arguments [String] :job_id The ID of the job to delete @option arguments [Boolean] :force True if the job should be forcefully deleted @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-delete-job.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/delete_job.rb, line 32 def delete_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_DELETE path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Deletes an existing model snapshot.
@option arguments [String] :job_id The ID of the job to fetch @option arguments [String] :snapshot_id The ID of the snapshot to delete @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-delete-snapshot.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/delete_model_snapshot.rb, line 31 def delete_model_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) _snapshot_id = arguments.delete(:snapshot_id) method = Elasticsearch::API::HTTP_DELETE path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/model_snapshots/#{Elasticsearch::API::Utils.__listify(_snapshot_id)}" params = {} body = nil perform_request(method, path, params, body, headers).body end
Deletes an existing trained inference model that is currently not referenced by an ingest pipeline.
@option arguments [String] :model_id The ID of the trained model to delete @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/delete-trained-models.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/delete_trained_model.rb, line 30 def delete_trained_model(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_DELETE path = "_ml/trained_models/#{Elasticsearch::API::Utils.__listify(_model_id)}" params = {} body = nil perform_request(method, path, params, body, headers).body end
Deletes a model alias that refers to the trained model
@option arguments [String] :model_alias The trained model alias to delete @option arguments [String] :model_id The trained model where the model alias is assigned @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/delete-trained-models-aliases.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/delete_trained_model_alias.rb, line 31 def delete_trained_model_alias(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias] headers = arguments.delete(:headers) || {} arguments = arguments.clone _model_alias = arguments.delete(:model_alias) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_DELETE path = "_ml/trained_models/#{Elasticsearch::API::Utils.__listify(_model_id)}/model_aliases/#{Elasticsearch::API::Utils.__listify(_model_alias)}" params = {} body = nil perform_request(method, path, params, body, headers).body end
@option arguments [Hash] :body Memory usage estimation definition (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/current/estimate-memory-usage-dfanalytics.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/estimate_memory_usage.rb, line 29 def estimate_memory_usage(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone method = Elasticsearch::API::HTTP_POST path = "_ml/data_frame/analytics/_estimate_memory_usage" params = {} body = arguments[:body] perform_request(method, path, params, body).body end
Estimates the model memory
@option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The analysis config, plus cardinality estimates for fields it references (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-apis.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/estimate_model_memory.rb, line 30 def estimate_model_memory(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] headers = arguments.delete(:headers) || {} arguments = arguments.clone method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/_estimate_model_memory" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Evaluates the data frame analytics for an annotated index.
@option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The evaluation definition (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/evaluate-dfanalytics.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/evaluate_data_frame.rb, line 30 def evaluate_data_frame(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] headers = arguments.delete(:headers) || {} arguments = arguments.clone method = Elasticsearch::API::HTTP_POST path = "_ml/data_frame/_evaluate" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Explains a data frame analytics config.
@option arguments [String] :id The ID of the data frame analytics to explain @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The data frame analytics config to explain
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/explain-dfanalytics.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/explain_data_frame_analytics.rb, line 31 def explain_data_frame_analytics(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _id = arguments.delete(:id) method = if arguments[:body] Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = if _id "_ml/data_frame/analytics/#{Elasticsearch::API::Utils.__listify(_id)}/_explain" else "_ml/data_frame/analytics/_explain" end params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch
. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
@option arguments [Int] :lines_to_sample How many lines of the file should be included in the analysis @option arguments [Int] :line_merge_size_limit Maximum number of characters permitted in a single message when lines are merged to create messages. @option arguments [Time] :timeout Timeout after which the analysis will be aborted @option arguments [String] :charset Optional parameter to specify the character set of the file @option arguments [String] :format Optional parameter to specify the high level file format (options: ndjson, xml, delimited, semi_structured_text) @option arguments [Boolean] :has_header_row Optional parameter to specify whether a delimited file includes the column names in its first row @option arguments [List] :column_names Optional parameter containing a comma separated list of the column names for a delimited file @option arguments [String] :delimiter Optional parameter to specify the delimiter character for a delimited file - must be a single character @option arguments [String] :quote Optional parameter to specify the quote character for a delimited file - must be a single character @option arguments [Boolean] :should_trim_fields Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them @option arguments [String] :grok_pattern Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file @option arguments [String] :timestamp_field Optional parameter to specify the timestamp field in the file @option arguments [String] :timestamp_format Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format @option arguments [Boolean] :explain Whether to include a commentary on how the structure was derived @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The contents of the file to be analyzed (Required)
*Deprecation notice*: This endpoint has changed to _text_structure/find_structure, please use that API
instead Deprecated since version 7.12.0
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/find-structure.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/find_file_structure.rb, line 53 def find_file_structure(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] headers = arguments.delete(:headers) || {} arguments = arguments.clone method = Elasticsearch::API::HTTP_POST path = "_ml/find_file_structure" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = Elasticsearch::API::Utils.__bulkify(arguments.delete(:body)) perform_request(method, path, params, body, headers).body end
Forces any buffered data to be processed by the job.
@option arguments [String] :job_id The name of the job to flush @option arguments [Boolean] :calc_interim Calculates interim results for the most recent bucket or all buckets within the latency period @option arguments [String] :start When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results @option arguments [String] :end When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results @option arguments [String] :advance_time Advances time to the given value generating results and updating the model for the advanced interval @option arguments [String] :skip_time Skips time to the given value without generating results or updating the model for the skipped interval @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body Flush parameters
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-flush-job.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/flush_job.rb, line 36 def flush_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_flush" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Predicts the future behavior of a time series by using its historical behavior.
@option arguments [String] :job_id The ID of the job to forecast for @option arguments [Time] :duration The duration of the forecast @option arguments [Time] :expires_in The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity. @option arguments [String] :max_model_memory The max memory able to be used by the forecast. Default is 20mb. @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-forecast.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/forecast.rb, line 33 def forecast(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_forecast" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Retrieves anomaly detection job results for one or more buckets.
@option arguments [String] :job_id ID of the job to get bucket results from @option arguments [String] :timestamp The timestamp of the desired single bucket result @option arguments [Boolean] :expand Include anomaly records @option arguments [Boolean] :exclude_interim Exclude interim results @option arguments [Int] :from skips a number of buckets @option arguments [Int] :size specifies a max number of buckets to get @option arguments [String] :start Start time filter for buckets @option arguments [String] :end End time filter for buckets @option arguments [Double] :anomaly_score Filter for the most anomalous buckets @option arguments [String] :sort Sort buckets by a particular field @option arguments [Boolean] :desc Set the sort direction @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body Bucket selection details if not provided in URI
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-bucket.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_buckets.rb, line 41 def get_buckets(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) _timestamp = arguments.delete(:timestamp) method = if arguments[:body] Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = if _job_id && _timestamp "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/results/buckets/#{Elasticsearch::API::Utils.__listify(_timestamp)}" else "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/results/buckets" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Retrieves information about the scheduled events in calendars.
@option arguments [String] :calendar_id The ID of the calendar containing the events @option arguments [String] :job_id Get events for the job. When this option is used calendar_id must be '_all' @option arguments [String] :start Get events after this time @option arguments [Date] :end Get events before this time @option arguments [Int] :from Skips a number of events @option arguments [Int] :size Specifies a max number of events to get @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-calendar-event.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_calendar_events.rb, line 35 def get_calendar_events(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _calendar_id = arguments.delete(:calendar_id) method = Elasticsearch::API::HTTP_GET path = "_ml/calendars/#{Elasticsearch::API::Utils.__listify(_calendar_id)}/events" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Retrieves configuration information for calendars.
@option arguments [String] :calendar_id The ID of the calendar to fetch @option arguments [Int] :from skips a number of calendars @option arguments [Int] :size specifies a max number of calendars to get @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The from and size parameters optionally sent in the body
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-calendar.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_calendars.rb, line 33 def get_calendars(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _calendar_id = arguments.delete(:calendar_id) method = if arguments[:body] Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = if _calendar_id "_ml/calendars/#{Elasticsearch::API::Utils.__listify(_calendar_id)}" else "_ml/calendars" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Retrieves anomaly detection job results for one or more categories.
@option arguments [String] :job_id The name of the job @option arguments [Long] :category_id The identifier of the category definition of interest @option arguments [Int] :from skips a number of categories @option arguments [Int] :size specifies a max number of categories to get @option arguments [String] :partition_field_value Specifies the partition to retrieve categories for. This is optional, and should never be used for jobs where per-partition categorization is disabled. @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body Category selection details if not provided in URI
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-category.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_categories.rb, line 35 def get_categories(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) _category_id = arguments.delete(:category_id) method = if arguments[:body] Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = if _job_id && _category_id "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/results/categories/#{Elasticsearch::API::Utils.__listify(_category_id)}" else "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/results/categories" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Retrieves configuration information for data frame analytics jobs.
@option arguments [String] :id The ID of the data frame analytics to fetch @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) @option arguments [Int] :from skips a number of analytics @option arguments [Int] :size specifies a max number of analytics to get @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on data frame analytics PUT @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/get-dfanalytics.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics.rb, line 34 def get_data_frame_analytics(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET path = if _id "_ml/data_frame/analytics/#{Elasticsearch::API::Utils.__listify(_id)}" else "_ml/data_frame/analytics" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Retrieves usage information for data frame analytics jobs.
@option arguments [String] :id The ID of the data frame analytics stats to fetch @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) @option arguments [Int] :from skips a number of analytics @option arguments [Int] :size specifies a max number of analytics to get @option arguments [Boolean] :verbose whether the stats response should be verbose @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/get-dfanalytics-stats.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics_stats.rb, line 34 def get_data_frame_analytics_stats(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET path = if _id "_ml/data_frame/analytics/#{Elasticsearch::API::Utils.__listify(_id)}/_stats" else "_ml/data_frame/analytics/_stats" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Retrieves usage information for datafeeds.
@option arguments [String] :datafeed_id The ID of the datafeeds stats to fetch @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) @option arguments [Boolean] :allow_no_datafeeds Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) Deprecated @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-datafeed-stats.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeed_stats.rb, line 32 def get_datafeed_stats(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_GET path = if _datafeed_id "_ml/datafeeds/#{Elasticsearch::API::Utils.__listify(_datafeed_id)}/_stats" else "_ml/datafeeds/_stats" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Retrieves configuration information for datafeeds.
@option arguments [String] :datafeed_id The ID of the datafeeds to fetch @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) @option arguments [Boolean] :allow_no_datafeeds Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) Deprecated @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on datafeed PUT @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-datafeed.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeeds.rb, line 33 def get_datafeeds(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_GET path = if _datafeed_id "_ml/datafeeds/#{Elasticsearch::API::Utils.__listify(_datafeed_id)}" else "_ml/datafeeds" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Retrieves filters.
@option arguments [String] :filter_id The ID of the filter to fetch @option arguments [Int] :from skips a number of filters @option arguments [Int] :size specifies a max number of filters to get @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-filter.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_filters.rb, line 32 def get_filters(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _filter_id = arguments.delete(:filter_id) method = Elasticsearch::API::HTTP_GET path = if _filter_id "_ml/filters/#{Elasticsearch::API::Utils.__listify(_filter_id)}" else "_ml/filters" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Retrieves anomaly detection job results for one or more influencers.
@option arguments [String] :job_id Identifier for the anomaly detection job @option arguments [Boolean] :exclude_interim Exclude interim results @option arguments [Int] :from skips a number of influencers @option arguments [Int] :size specifies a max number of influencers to get @option arguments [String] :start start timestamp for the requested influencers @option arguments [String] :end end timestamp for the requested influencers @option arguments [Double] :influencer_score influencer score threshold for the requested influencers @option arguments [String] :sort sort field for the requested influencers @option arguments [Boolean] :desc whether the results should be sorted in decending order @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body Influencer selection criteria
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-influencer.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb, line 39 def get_influencers(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = if arguments[:body] Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/results/influencers" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Retrieves usage information for anomaly detection jobs.
@option arguments [String] :job_id The ID of the jobs stats to fetch @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) @option arguments [Boolean] :allow_no_jobs Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) Deprecated @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-job-stats.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_job_stats.rb, line 32 def get_job_stats(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_GET path = if _job_id "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_stats" else "_ml/anomaly_detectors/_stats" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Retrieves configuration information for anomaly detection jobs.
@option arguments [String] :job_id The ID of the jobs to fetch @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) @option arguments [Boolean] :allow_no_jobs Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) Deprecated @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on job PUT @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-job.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_jobs.rb, line 33 def get_jobs(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_GET path = if _job_id "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}" else "_ml/anomaly_detectors" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Retrieves information about model snapshots.
@option arguments [String] :job_id The ID of the job to fetch @option arguments [String] :snapshot_id The ID of the snapshot to fetch @option arguments [Int] :from Skips a number of documents @option arguments [Int] :size The default number of documents returned in queries as a string. @option arguments [Date] :start The filter 'start' query parameter @option arguments [Date] :end The filter 'end' query parameter @option arguments [String] :sort Name of the field to sort on @option arguments [Boolean] :desc True if the results should be sorted in descending order @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body Model snapshot selection criteria
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-snapshot.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshots.rb, line 38 def get_model_snapshots(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) _snapshot_id = arguments.delete(:snapshot_id) method = if arguments[:body] Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = if _job_id && _snapshot_id "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/model_snapshots/#{Elasticsearch::API::Utils.__listify(_snapshot_id)}" else "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/model_snapshots" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs.
@option arguments [String] :job_id The job IDs for which to calculate overall bucket results @option arguments [Int] :top_n The number of top job bucket scores to be used in the overall_score calculation @option arguments [String] :bucket_span The span of the overall buckets. Defaults to the longest job bucket_span @option arguments [Double] :overall_score Returns overall buckets with overall scores higher than this value @option arguments [Boolean] :exclude_interim If true overall buckets that include interim buckets will be excluded @option arguments [String] :start Returns overall buckets with timestamps after this time @option arguments [String] :end Returns overall buckets with timestamps earlier than this time @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) @option arguments [Boolean] :allow_no_jobs Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) Deprecated @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body Overall bucket selection details if not provided in URI
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-overall-buckets.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_overall_buckets.rb, line 39 def get_overall_buckets(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = if arguments[:body] Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/results/overall_buckets" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Retrieves anomaly records for an anomaly detection job.
@option arguments [String] :job_id The ID of the job @option arguments [Boolean] :exclude_interim Exclude interim results @option arguments [Int] :from skips a number of records @option arguments [Int] :size specifies a max number of records to get @option arguments [String] :start Start time filter for records @option arguments [String] :end End time filter for records @option arguments [Double] :record_score Returns records with anomaly scores greater or equal than this value @option arguments [String] :sort Sort records by a particular field @option arguments [Boolean] :desc Set the sort direction @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body Record selection criteria
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-get-record.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_records.rb, line 39 def get_records(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = if arguments[:body] Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/results/records" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Retrieves configuration information for a trained inference model.
@option arguments [String] :model_id The ID of the trained models to fetch @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) @option arguments [String] :include A comma-separate list of fields to optionally include. Valid options are 'definition' and 'total_feature_importance'. Default is none. @option arguments [Boolean] :include_model_definition Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false. Deprecated @option arguments [Boolean] :decompress_definition Should the model definition be decompressed into valid JSON or returned in a custom compressed format. Defaults to true. @option arguments [Int] :from skips a number of trained models @option arguments [Int] :size specifies a max number of trained models to get @option arguments [List] :tags A comma-separated list of tags that the model must have. @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on model PUT @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/get-trained-models.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_trained_models.rb, line 38 def get_trained_models(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_GET path = if _model_id "_ml/trained_models/#{Elasticsearch::API::Utils.__listify(_model_id)}" else "_ml/trained_models" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Retrieves usage information for trained inference models.
@option arguments [String] :model_id The ID of the trained models stats to fetch @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) @option arguments [Int] :from skips a number of trained models @option arguments [Int] :size specifies a max number of trained models to get @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/get-trained-models-stats.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/get_trained_models_stats.rb, line 33 def get_trained_models_stats(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_GET path = if _model_id "_ml/trained_models/#{Elasticsearch::API::Utils.__listify(_model_id)}/_stats" else "_ml/trained_models/_stats" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Returns defaults and limits used by machine learning.
@option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/get-ml-info.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/info.rb, line 29 def info(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone method = Elasticsearch::API::HTTP_GET path = "_ml/info" params = {} body = nil perform_request(method, path, params, body, headers).body end
Opens one or more anomaly detection jobs.
@option arguments [String] :job_id The ID of the job to open @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-open-job.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/open_job.rb, line 30 def open_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_open" params = {} body = nil perform_request(method, path, params, body, headers).body end
Posts scheduled events in a calendar.
@option arguments [String] :calendar_id The ID of the calendar to modify @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body A list of events (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-post-calendar-event.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/post_calendar_events.rb, line 31 def post_calendar_events(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _calendar_id = arguments.delete(:calendar_id) method = Elasticsearch::API::HTTP_POST path = "_ml/calendars/#{Elasticsearch::API::Utils.__listify(_calendar_id)}/events" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Sends data to an anomaly detection job for analysis.
@option arguments [String] :job_id The name of the job receiving the data @option arguments [String] :reset_start Optional parameter to specify the start of the bucket resetting range @option arguments [String] :reset_end Optional parameter to specify the end of the bucket resetting range @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The data to process (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-post-data.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/post_data.rb, line 33 def post_data(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_data" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Previews that will be analyzed given a data frame analytics config.
@option arguments [String] :id The ID of the data frame analytics to preview @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The data frame analytics config to preview
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/preview-dfanalytics.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/preview_data_frame_analytics.rb, line 31 def preview_data_frame_analytics(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _id = arguments.delete(:id) method = if arguments[:body] Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = if _id "_ml/data_frame/analytics/#{Elasticsearch::API::Utils.__listify(_id)}/_preview" else "_ml/data_frame/analytics/_preview" end params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Previews a datafeed.
@option arguments [String] :datafeed_id The ID of the datafeed to preview @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The datafeed config and job config with which to execute the preview
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-preview-datafeed.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/preview_datafeed.rb, line 31 def preview_datafeed(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _datafeed_id = arguments.delete(:datafeed_id) method = if arguments[:body] Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = if _datafeed_id "_ml/datafeeds/#{Elasticsearch::API::Utils.__listify(_datafeed_id)}/_preview" else "_ml/datafeeds/_preview" end params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Instantiates a calendar.
@option arguments [String] :calendar_id The ID of the calendar to create @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The calendar details
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-put-calendar.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar.rb, line 31 def put_calendar(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _calendar_id = arguments.delete(:calendar_id) method = Elasticsearch::API::HTTP_PUT path = "_ml/calendars/#{Elasticsearch::API::Utils.__listify(_calendar_id)}" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Adds an anomaly detection job to a calendar.
@option arguments [String] :calendar_id The ID of the calendar to modify @option arguments [String] :job_id The ID of the job to add to the calendar @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-put-calendar-job.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar_job.rb, line 31 def put_calendar_job(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _calendar_id = arguments.delete(:calendar_id) _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_PUT path = "_ml/calendars/#{Elasticsearch::API::Utils.__listify(_calendar_id)}/jobs/#{Elasticsearch::API::Utils.__listify(_job_id)}" params = {} body = nil perform_request(method, path, params, body, headers).body end
Instantiates a data frame analytics job.
@option arguments [String] :id The ID of the data frame analytics to create @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The data frame analytics configuration (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/put-dfanalytics.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/put_data_frame_analytics.rb, line 31 def put_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT path = "_ml/data_frame/analytics/#{Elasticsearch::API::Utils.__listify(_id)}" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Instantiates a datafeed.
@option arguments [String] :datafeed_id The ID of the datafeed to create @option arguments [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false) @option arguments [Boolean] :allow_no_indices Ignore if the source indices expressions resolves to no concrete indices (default: true) @option arguments [Boolean] :ignore_throttled Ignore indices that are marked as throttled (default: true) @option arguments [String] :expand_wildcards Whether source index expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The datafeed config (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-put-datafeed.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/put_datafeed.rb, line 35 def put_datafeed(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_PUT path = "_ml/datafeeds/#{Elasticsearch::API::Utils.__listify(_datafeed_id)}" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Instantiates a filter.
@option arguments [String] :filter_id The ID of the filter to create @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The filter details (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-put-filter.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/put_filter.rb, line 31 def put_filter(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _filter_id = arguments.delete(:filter_id) method = Elasticsearch::API::HTTP_PUT path = "_ml/filters/#{Elasticsearch::API::Utils.__listify(_filter_id)}" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Instantiates an anomaly detection job.
@option arguments [String] :job_id The ID of the job to create @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The job (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-put-job.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/put_job.rb, line 31 def put_job(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_PUT path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Creates an inference trained model.
@option arguments [String] :model_id The ID of the trained models to store @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The trained model configuration (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/put-trained-models.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/put_trained_model.rb, line 31 def put_trained_model(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_PUT path = "_ml/trained_models/#{Elasticsearch::API::Utils.__listify(_model_id)}" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Creates a new model alias (or reassigns an existing one) to refer to the trained model
@option arguments [String] :model_alias The trained model alias to update @option arguments [String] :model_id The trained model where the model alias should be assigned @option arguments [Boolean] :reassign If the model_alias already exists and points to a separate model_id, this parameter must be true. Defaults to false. @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/put-trained-models-aliases.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/put_trained_model_alias.rb, line 32 def put_trained_model_alias(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias] headers = arguments.delete(:headers) || {} arguments = arguments.clone _model_alias = arguments.delete(:model_alias) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_PUT path = "_ml/trained_models/#{Elasticsearch::API::Utils.__listify(_model_id)}/model_aliases/#{Elasticsearch::API::Utils.__listify(_model_alias)}" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Resets an existing anomaly detection job.
@option arguments [String] :job_id The ID of the job to reset @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-reset-job.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/reset_job.rb, line 31 def reset_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_reset" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Reverts to a specific snapshot.
@option arguments [String] :job_id The ID of the job to fetch @option arguments [String] :snapshot_id The ID of the snapshot to revert to @option arguments [Boolean] :delete_intervening_results Should we reset the results back to the time of the snapshot? @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body Reversion options
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-revert-snapshot.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/revert_model_snapshot.rb, line 33 def revert_model_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) _snapshot_id = arguments.delete(:snapshot_id) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/model_snapshots/#{Elasticsearch::API::Utils.__listify(_snapshot_id)}/_revert" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade.
@option arguments [Boolean] :enabled Whether to enable upgrade_mode ML setting or not. Defaults to false. @option arguments [Time] :timeout Controls the time to wait before action times out. Defaults to 30 seconds @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-set-upgrade-mode.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/set_upgrade_mode.rb, line 31 def set_upgrade_mode(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone method = Elasticsearch::API::HTTP_POST path = "_ml/set_upgrade_mode" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Starts a data frame analytics job.
@option arguments [String] :id The ID of the data frame analytics to start @option arguments [Time] :timeout Controls the time to wait until the task has started. Defaults to 20 seconds @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The start data frame analytics parameters
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/start-dfanalytics.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/start_data_frame_analytics.rb, line 32 def start_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST path = "_ml/data_frame/analytics/#{Elasticsearch::API::Utils.__listify(_id)}/_start" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Starts one or more datafeeds.
@option arguments [String] :datafeed_id The ID of the datafeed to start @option arguments [String] :start The start time from where the datafeed should begin @option arguments [String] :end The end time when the datafeed should stop. When not set, the datafeed continues in real time @option arguments [Time] :timeout Controls the time to wait until a datafeed has started. Default to 20 seconds @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The start datafeed parameters
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-start-datafeed.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/start_datafeed.rb, line 34 def start_datafeed(arguments = {}) raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_POST path = "_ml/datafeeds/#{Elasticsearch::API::Utils.__listify(_datafeed_id)}/_start" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Stops one or more data frame analytics jobs.
@option arguments [String] :id The ID of the data frame analytics to stop @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) @option arguments [Boolean] :force True if the data frame analytics should be forcefully stopped @option arguments [Time] :timeout Controls the time to wait until the task has stopped. Defaults to 20 seconds @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The stop data frame analytics parameters
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/stop-dfanalytics.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/stop_data_frame_analytics.rb, line 34 def stop_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST path = "_ml/data_frame/analytics/#{Elasticsearch::API::Utils.__listify(_id)}/_stop" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Stops one or more datafeeds.
@option arguments [String] :datafeed_id The ID of the datafeed to stop @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) @option arguments [Boolean] :allow_no_datafeeds Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) Deprecated @option arguments [Boolean] :force True if the datafeed should be forcefully stopped. @option arguments [Time] :timeout Controls the time to wait until a datafeed has stopped. Default to 20 seconds @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The URL params optionally sent in the body
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-stop-datafeed.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/stop_datafeed.rb, line 35 def stop_datafeed(arguments = {}) raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_POST path = "_ml/datafeeds/#{Elasticsearch::API::Utils.__listify(_datafeed_id)}/_stop" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Updates certain properties of a data frame analytics job.
@option arguments [String] :id The ID of the data frame analytics to update @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The data frame analytics settings to update (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/update-dfanalytics.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/update_data_frame_analytics.rb, line 31 def update_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST path = "_ml/data_frame/analytics/#{Elasticsearch::API::Utils.__listify(_id)}/_update" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Updates certain properties of a datafeed.
@option arguments [String] :datafeed_id The ID of the datafeed to update @option arguments [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false) @option arguments [Boolean] :allow_no_indices Ignore if the source indices expressions resolves to no concrete indices (default: true) @option arguments [Boolean] :ignore_throttled Ignore indices that are marked as throttled (default: true) @option arguments [String] :expand_wildcards Whether source index expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The datafeed update settings (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-update-datafeed.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/update_datafeed.rb, line 35 def update_datafeed(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_POST path = "_ml/datafeeds/#{Elasticsearch::API::Utils.__listify(_datafeed_id)}/_update" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end
Updates the description of a filter, adds items, or removes items.
@option arguments [String] :filter_id The ID of the filter to update @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The filter update (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-update-filter.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/update_filter.rb, line 31 def update_filter(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _filter_id = arguments.delete(:filter_id) method = Elasticsearch::API::HTTP_POST path = "_ml/filters/#{Elasticsearch::API::Utils.__listify(_filter_id)}/_update" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Updates certain properties of an anomaly detection job.
@option arguments [String] :job_id The ID of the job to create @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The job update settings (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-update-job.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/update_job.rb, line 31 def update_job(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_update" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Updates certain properties of a snapshot.
@option arguments [String] :job_id The ID of the job to fetch @option arguments [String] :snapshot_id The ID of the snapshot to update @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The model snapshot properties to update (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-update-snapshot.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/update_model_snapshot.rb, line 32 def update_model_snapshot(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) _snapshot_id = arguments.delete(:snapshot_id) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/model_snapshots/#{Elasticsearch::API::Utils.__listify(_snapshot_id)}/_update" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Upgrades a given job snapshot to the current major version.
@option arguments [String] :job_id The ID of the job @option arguments [String] :snapshot_id The ID of the snapshot @option arguments [Time] :timeout How long should the API
wait for the job to be opened and the old snapshot to be loaded. @option arguments [Boolean] :wait_for_completion Should the request wait until the task is complete before responding to the caller. Default is false. @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/7.14/ml-upgrade-job-model-snapshot.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/upgrade_job_snapshot.rb, line 33 def upgrade_job_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _job_id = arguments.delete(:job_id) _snapshot_id = arguments.delete(:snapshot_id) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/model_snapshots/#{Elasticsearch::API::Utils.__listify(_snapshot_id)}/_upgrade" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end
Validates an anomaly detection job.
@option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The job config (Required)
@see www.elastic.co/guide/en/machine-learning/7.14/ml-jobs.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/validate.rb, line 30 def validate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] headers = arguments.delete(:headers) || {} arguments = arguments.clone method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/_validate" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end
Validates an anomaly detection detector.
@option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The detector (Required)
@see www.elastic.co/guide/en/machine-learning/7.14/ml-jobs.html
# File lib/elasticsearch/xpack/api/actions/machine_learning/validate_detector.rb, line 30 def validate_detector(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] headers = arguments.delete(:headers) || {} arguments = arguments.clone method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/_validate/detector" params = {} body = arguments[:body] perform_request(method, path, params, body, headers).body end