elasticsearch-api 8.9.0 → 8.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/api-spec-testing/test_file/action.rb +76 -64
- data/api-spec-testing/test_file/task_group.rb +1 -1
- data/api-spec-testing/test_file.rb +8 -3
- data/api-spec-testing/wipe_cluster.rb +10 -8
- data/elasticsearch-api.gemspec +2 -2
- data/lib/elasticsearch/api/actions/async_search/delete.rb +10 -2
- data/lib/elasticsearch/api/actions/async_search/get.rb +10 -2
- data/lib/elasticsearch/api/actions/async_search/status.rb +10 -2
- data/lib/elasticsearch/api/actions/async_search/submit.rb +10 -2
- data/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb +4 -2
- data/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/bulk.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/aliases.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/allocation.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/component_templates.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/count.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/health.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/help.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/indices.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/master.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/ml_jobs.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/nodes.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/plugins.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/recovery.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/repositories.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/segments.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/shards.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/tasks.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/templates.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/transforms.rb +10 -2
- data/lib/elasticsearch/api/actions/clear_scroll.rb +11 -3
- data/lib/elasticsearch/api/actions/close_point_in_time.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/health.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/info.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/state.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/stats.rb +10 -2
- data/lib/elasticsearch/api/actions/count.rb +10 -2
- data/lib/elasticsearch/api/actions/create.rb +9 -1
- data/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +4 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +10 -2
- data/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +10 -2
- data/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +10 -2
- data/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +4 -2
- data/lib/elasticsearch/api/actions/delete.rb +11 -3
- data/lib/elasticsearch/api/actions/delete_by_query.rb +10 -2
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +10 -2
- data/lib/elasticsearch/api/actions/delete_script.rb +10 -2
- data/lib/elasticsearch/api/actions/enrich/delete_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/enrich/execute_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/enrich/get_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/enrich/put_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/enrich/stats.rb +4 -2
- data/lib/elasticsearch/api/actions/eql/delete.rb +10 -2
- data/lib/elasticsearch/api/actions/eql/get.rb +10 -2
- data/lib/elasticsearch/api/actions/eql/get_status.rb +10 -2
- data/lib/elasticsearch/api/actions/eql/search.rb +10 -2
- data/lib/elasticsearch/api/actions/esql/query.rb +59 -0
- data/lib/elasticsearch/api/actions/exists.rb +10 -2
- data/lib/elasticsearch/api/actions/exists_source.rb +10 -2
- data/lib/elasticsearch/api/actions/explain.rb +10 -2
- data/lib/elasticsearch/api/actions/features/get_features.rb +4 -2
- data/lib/elasticsearch/api/actions/features/reset_features.rb +4 -2
- data/lib/elasticsearch/api/actions/field_caps.rb +10 -2
- data/lib/elasticsearch/api/actions/fleet/delete_secret.rb +65 -0
- data/lib/elasticsearch/api/actions/fleet/get_secret.rb +65 -0
- data/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +10 -2
- data/lib/elasticsearch/api/actions/fleet/msearch.rb +9 -1
- data/lib/elasticsearch/api/actions/{synonyms/delete.rb → fleet/post_secret.rb} +12 -12
- data/lib/elasticsearch/api/actions/fleet/search.rb +9 -1
- data/lib/elasticsearch/api/actions/get.rb +11 -3
- data/lib/elasticsearch/api/actions/get_script.rb +10 -2
- data/lib/elasticsearch/api/actions/get_script_context.rb +4 -2
- data/lib/elasticsearch/api/actions/get_script_languages.rb +4 -2
- data/lib/elasticsearch/api/actions/get_source.rb +10 -2
- data/lib/elasticsearch/api/actions/graph/explore.rb +10 -2
- data/lib/elasticsearch/api/actions/health_report.rb +10 -2
- data/lib/elasticsearch/api/actions/index.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +4 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +4 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +4 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +4 -2
- data/lib/elasticsearch/api/actions/indices/add_block.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/analyze.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/clone.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/close.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/create.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/delete.rb +11 -3
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +12 -4
- data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/delete_index_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +11 -3
- data/lib/elasticsearch/api/actions/indices/disk_usage.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/downsample.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/exists.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/exists_index_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/flush.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +11 -3
- data/lib/elasticsearch/api/actions/indices/get_data_stream.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_index_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +4 -2
- data/lib/elasticsearch/api/actions/indices/open.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +12 -4
- data/lib/elasticsearch/api/actions/indices/put_index_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/put_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/recovery.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/refresh.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +11 -2
- data/lib/elasticsearch/api/actions/indices/resolve_index.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/rollover.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/segments.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/shrink.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/simulate_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/split.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/stats.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/unfreeze.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +4 -2
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +10 -2
- data/lib/elasticsearch/api/actions/inference/delete_model.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/get_model.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/inference.rb +70 -0
- data/lib/elasticsearch/api/actions/inference/put_model.rb +70 -0
- data/lib/elasticsearch/api/actions/info.rb +4 -2
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +10 -2
- data/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +4 -2
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +10 -2
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +4 -2
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +10 -2
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +10 -2
- data/lib/elasticsearch/api/actions/knn_search.rb +10 -2
- data/lib/elasticsearch/api/actions/license/delete.rb +4 -2
- data/lib/elasticsearch/api/actions/license/get.rb +4 -2
- data/lib/elasticsearch/api/actions/license/get_basic_status.rb +4 -2
- data/lib/elasticsearch/api/actions/license/get_trial_status.rb +4 -2
- data/lib/elasticsearch/api/actions/license/post.rb +4 -2
- data/lib/elasticsearch/api/actions/license/post_start_basic.rb +4 -2
- data/lib/elasticsearch/api/actions/license/post_start_trial.rb +4 -2
- data/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +10 -2
- data/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +10 -2
- data/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/close_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +4 -2
- data/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +4 -2
- data/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/forecast.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_records.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/info.rb +4 -2
- data/lib/elasticsearch/api/actions/machine_learning/open_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/post_data.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +4 -2
- data/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/validate.rb +4 -2
- data/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb +4 -2
- data/lib/elasticsearch/api/actions/mget.rb +10 -2
- data/lib/elasticsearch/api/actions/migration/deprecations.rb +10 -2
- data/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +4 -2
- data/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +4 -2
- data/lib/elasticsearch/api/actions/monitoring/bulk.rb +10 -2
- data/lib/elasticsearch/api/actions/msearch.rb +10 -2
- data/lib/elasticsearch/api/actions/msearch_template.rb +10 -2
- data/lib/elasticsearch/api/actions/mtermvectors.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/info.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/stats.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/usage.rb +10 -2
- data/lib/elasticsearch/api/actions/open_point_in_time.rb +10 -2
- data/lib/elasticsearch/api/actions/ping.rb +4 -2
- data/lib/elasticsearch/api/actions/put_script.rb +10 -2
- data/lib/elasticsearch/api/actions/query_ruleset/delete.rb +10 -2
- data/lib/elasticsearch/api/actions/query_ruleset/get.rb +10 -2
- data/lib/elasticsearch/api/actions/{synonyms/get.rb → query_ruleset/list.rb} +10 -13
- data/lib/elasticsearch/api/actions/query_ruleset/put.rb +10 -2
- data/lib/elasticsearch/api/actions/rank_eval.rb +10 -2
- data/lib/elasticsearch/api/actions/reindex.rb +4 -2
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +10 -2
- data/lib/elasticsearch/api/actions/render_search_template.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/delete_job.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/get_jobs.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/put_job.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/rollup_search.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/start_job.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/stop_job.rb +10 -2
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +4 -2
- data/lib/elasticsearch/api/actions/scroll.rb +10 -2
- data/lib/elasticsearch/api/actions/search.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/delete.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/get.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/list.rb +4 -2
- data/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +9 -1
- data/lib/elasticsearch/api/actions/search_application/put.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/render_query.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/search.rb +10 -2
- data/lib/elasticsearch/api/actions/search_mvt.rb +10 -2
- data/lib/elasticsearch/api/actions/search_shards.rb +10 -2
- data/lib/elasticsearch/api/actions/search_template.rb +10 -2
- data/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +10 -2
- data/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +10 -2
- data/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +10 -2
- data/lib/elasticsearch/api/actions/security/activate_user_profile.rb +4 -2
- data/lib/elasticsearch/api/actions/security/authenticate.rb +4 -2
- data/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +4 -2
- data/lib/elasticsearch/api/actions/security/change_password.rb +10 -2
- data/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +10 -2
- data/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +10 -2
- data/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +10 -2
- data/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +10 -2
- data/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +10 -2
- data/lib/elasticsearch/api/actions/security/create_api_key.rb +4 -2
- data/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +8 -6
- data/lib/elasticsearch/api/actions/security/create_service_token.rb +10 -2
- data/lib/elasticsearch/api/actions/security/delete_privileges.rb +10 -2
- data/lib/elasticsearch/api/actions/security/delete_role.rb +10 -2
- data/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +10 -2
- data/lib/elasticsearch/api/actions/security/delete_service_token.rb +10 -2
- data/lib/elasticsearch/api/actions/security/delete_user.rb +10 -2
- data/lib/elasticsearch/api/actions/security/disable_user.rb +10 -2
- data/lib/elasticsearch/api/actions/security/disable_user_profile.rb +10 -2
- data/lib/elasticsearch/api/actions/security/enable_user.rb +10 -2
- data/lib/elasticsearch/api/actions/security/enable_user_profile.rb +10 -2
- data/lib/elasticsearch/api/actions/security/enroll_kibana.rb +4 -2
- data/lib/elasticsearch/api/actions/security/enroll_node.rb +4 -2
- data/lib/elasticsearch/api/actions/security/get_api_key.rb +4 -2
- data/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +4 -2
- data/lib/elasticsearch/api/actions/security/get_privileges.rb +10 -2
- data/lib/elasticsearch/api/actions/security/get_role.rb +11 -3
- data/lib/elasticsearch/api/actions/security/get_role_mapping.rb +10 -2
- data/lib/elasticsearch/api/actions/security/get_service_accounts.rb +10 -2
- data/lib/elasticsearch/api/actions/security/get_service_credentials.rb +10 -2
- data/lib/elasticsearch/api/actions/security/get_settings.rb +50 -0
- data/lib/elasticsearch/api/actions/security/get_token.rb +4 -2
- data/lib/elasticsearch/api/actions/security/get_user.rb +11 -3
- data/lib/elasticsearch/api/actions/security/get_user_privileges.rb +4 -2
- data/lib/elasticsearch/api/actions/security/get_user_profile.rb +10 -2
- data/lib/elasticsearch/api/actions/security/grant_api_key.rb +4 -2
- data/lib/elasticsearch/api/actions/security/has_privileges.rb +10 -2
- data/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +4 -2
- data/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +4 -2
- data/lib/elasticsearch/api/actions/security/invalidate_token.rb +4 -2
- data/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +4 -2
- data/lib/elasticsearch/api/actions/security/oidc_logout.rb +4 -2
- data/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +4 -2
- data/lib/elasticsearch/api/actions/security/put_privileges.rb +4 -2
- data/lib/elasticsearch/api/actions/security/put_role.rb +10 -2
- data/lib/elasticsearch/api/actions/security/put_role_mapping.rb +10 -2
- data/lib/elasticsearch/api/actions/security/put_user.rb +10 -2
- data/lib/elasticsearch/api/actions/security/query_api_keys.rb +4 -2
- data/lib/elasticsearch/api/actions/security/saml_authenticate.rb +4 -2
- data/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +4 -2
- data/lib/elasticsearch/api/actions/security/saml_invalidate.rb +4 -2
- data/lib/elasticsearch/api/actions/security/saml_logout.rb +4 -2
- data/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +4 -2
- data/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +10 -2
- data/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +4 -2
- data/lib/elasticsearch/api/actions/security/update_api_key.rb +10 -2
- data/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +14 -6
- data/lib/elasticsearch/api/actions/security/update_settings.rb +53 -0
- data/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +10 -2
- data/lib/elasticsearch/api/actions/shutdown/delete_node.rb +9 -1
- data/lib/elasticsearch/api/actions/shutdown/get_node.rb +9 -1
- data/lib/elasticsearch/api/actions/shutdown/put_node.rb +9 -1
- data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot/clone.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot/create.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +11 -3
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +11 -3
- data/lib/elasticsearch/api/actions/snapshot/get.rb +11 -3
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +11 -3
- data/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot/status.rb +11 -3
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +4 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +4 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +4 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +4 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +4 -2
- data/lib/elasticsearch/api/actions/sql/clear_cursor.rb +4 -2
- data/lib/elasticsearch/api/actions/sql/delete_async.rb +10 -2
- data/lib/elasticsearch/api/actions/sql/get_async.rb +10 -2
- data/lib/elasticsearch/api/actions/sql/get_async_status.rb +10 -2
- data/lib/elasticsearch/api/actions/sql/query.rb +4 -2
- data/lib/elasticsearch/api/actions/sql/translate.rb +4 -2
- data/lib/elasticsearch/api/actions/ssl/certificates.rb +4 -2
- data/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +65 -0
- data/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +69 -0
- data/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +67 -0
- data/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +69 -0
- data/lib/elasticsearch/api/actions/{synonyms_sets/get.rb → synonyms/get_synonyms_sets.rb} +6 -4
- data/lib/elasticsearch/api/actions/synonyms/{put.rb → put_synonym.rb} +15 -7
- data/lib/elasticsearch/api/actions/{synonym_rule/put.rb → synonyms/put_synonym_rule.rb} +19 -11
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +10 -2
- data/lib/elasticsearch/api/actions/tasks/get.rb +10 -2
- data/lib/elasticsearch/api/actions/tasks/list.rb +4 -2
- data/lib/elasticsearch/api/actions/terms_enum.rb +10 -2
- data/lib/elasticsearch/api/actions/termvectors.rb +10 -2
- data/lib/elasticsearch/api/actions/text_structure/find_structure.rb +4 -2
- data/lib/elasticsearch/api/actions/transform/delete_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/get_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/preview_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/put_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/reset_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/start_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/stop_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/update_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +4 -2
- data/lib/elasticsearch/api/actions/update.rb +11 -3
- data/lib/elasticsearch/api/actions/update_by_query.rb +10 -2
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/ack_watch.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/activate_watch.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/delete_watch.rb +11 -3
- data/lib/elasticsearch/api/actions/watcher/execute_watch.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/get_settings.rb +4 -2
- data/lib/elasticsearch/api/actions/watcher/get_watch.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/put_watch.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/query_watches.rb +4 -2
- data/lib/elasticsearch/api/actions/watcher/start.rb +4 -2
- data/lib/elasticsearch/api/actions/watcher/stats.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/stop.rb +4 -2
- data/lib/elasticsearch/api/actions/watcher/update_settings.rb +4 -2
- data/lib/elasticsearch/api/actions/xpack/info.rb +4 -2
- data/lib/elasticsearch/api/actions/xpack/usage.rb +4 -2
- data/lib/elasticsearch/api/namespace/common.rb +2 -2
- data/lib/elasticsearch/api/namespace/{synonym_rule.rb → esql.rb} +7 -7
- data/lib/elasticsearch/api/namespace/{synonyms_sets.rb → inference.rb} +7 -7
- data/lib/elasticsearch/api/version.rb +1 -1
- data/lib/elasticsearch/api.rb +2 -2
- data/spec/elasticsearch/api/actions/bulk_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/component_templates_spec.rb +22 -10
- data/spec/elasticsearch/api/actions/cat/count_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/cat/health_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/help_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/indices_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/master_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/segments_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/cat/shards_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/templates_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/close_point_in_time_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/health_spec.rb +6 -3
- data/spec/elasticsearch/api/actions/cluster/info_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/cluster/state_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/count_spec.rb +6 -3
- data/spec/elasticsearch/api/actions/create_document_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/data_frame/update_data_frame_transform_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/delete_document_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/delete_script_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/{synonyms/update_spec.rb → esql/query_spec.rb} +6 -5
- data/spec/elasticsearch/api/actions/exists_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/explain_document_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/features/get_features_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/features/reset_features_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/field_caps_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/fleet/global_checkpoints_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/fleet/msearch_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/fleet/search_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/get_document_source_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/get_document_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/get_script_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/health_report_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/index_document_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/add_block_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/indices/clone_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/indices/close_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/create_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/data_streams_stats_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +15 -1
- data/spec/elasticsearch/api/actions/indices/delete_data_lifecycle_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/delete_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/disk_usage_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +26 -1
- data/spec/elasticsearch/api/actions/indices/exists_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/explain_data_lifecycle_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/flush_spec.rb +46 -1
- data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +25 -1
- data/spec/elasticsearch/api/actions/indices/get_data_lifecycle_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/indices/get_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/open_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +27 -1
- data/spec/elasticsearch/api/actions/indices/put_data_lifecycle_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +46 -1
- data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +46 -1
- data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/segments_spec.rb +46 -1
- data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/indices/split_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/indices/stats_spec.rb +68 -1
- data/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +69 -1
- data/spec/elasticsearch/api/actions/inference/delete_model_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/{synonyms_sets/get_spec.rb → inference/get_model_spec.rb} +6 -4
- data/spec/elasticsearch/api/actions/inference/inference_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/{synonym_rule/put_spec.rb → inference/put_model_spec.rb} +6 -4
- data/spec/elasticsearch/api/actions/info_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/ingest/geo_ip_stats_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/json_builders_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/machine_learning/get_memory_stats_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats_spec.rb +5 -1
- data/spec/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/machine_learning/reset_job_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/machine_learning/set_upgrade_mode_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/machine_learning/start_trained_model_deployment_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/machine_learning/update_trained_model_deployment_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/mget_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/migration/get_feature_upgrade_status_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/migration/post_feature_upgrade_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/msearch_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/msearch_template_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/nodes/info_spec.rb +46 -1
- data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/open_point_in_time_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/ping_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/put_script_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/query_ruleset/delete_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/query_ruleset/get_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/query_ruleset/put_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/rank_eval_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/reindex_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/render_search_template_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/scroll_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/search_application/delete_behavioral_analytics_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/search_application/delete_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_application/get_behavioral_analytics_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_application/get_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_application/list_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_application/post_behavioral_analytics_event_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/search_application/put_behavioral_analytics_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/search_application/put_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_application/render_query_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/search_application/search_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_mvt_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/search_shards_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/search_template_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/searchable_snapshots/cache_stats_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/searchable_snapshots/clear_cache_spec.rb +14 -1
- data/spec/elasticsearch/api/actions/searchable_snapshots/mount_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/searchable_snapshots/stats_spec.rb +15 -1
- data/spec/elasticsearch/api/actions/security/clear_cached_service_tokens_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/security/create_api_key_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/security/create_cross_cluster_api_key_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/create_service_token_spec.rb +15 -1
- data/spec/elasticsearch/api/actions/security/delete_service_token_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/security/disable_user_profile_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/enable_user_profile_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/enroll_kibana_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/get_api_key_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/get_builtin_privileges_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/get_service_accounts_spec.rb +26 -1
- data/spec/elasticsearch/api/actions/security/get_service_credentials_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/security/has_privileges_user_profile_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/invalidate_api_key_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/query_api_keys_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/saml_authenticate_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/saml_complete_logout_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/saml_invalidate_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/saml_logout_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/saml_prepare_authentication_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/saml_service_provider_metadata_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/security/suggest_user_profiles_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/update_api_key_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/update_cross_cluster_api_key_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/snapshot/clone_spec.rb +4 -1
- data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +15 -1
- data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/sql/delete_async_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/sql/get_async_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/sql/get_async_stats_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/tasks/get_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/tasks/list_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/terms_enum_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/termvectors_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/transform/schedule_now_transform_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/update_by_query_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/update_document_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/watcher/get_settings_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/watcher/update_settings_spec.rb +3 -2
- data/spec/elasticsearch/api/perform_request_spec.rb +86 -0
- data/spec/platinum/integration/analytics/usage_spec.rb +56 -0
- data/spec/platinum/integration/api_key/admin_user_query_api_keys_spec.rb +111 -0
- data/spec/platinum/integration/api_key/api_key_admin_user_spec.rb +127 -0
- data/spec/platinum/integration/api_key/api_key_cross_cluster_spec.rb +4 -11
- data/spec/platinum/integration/api_key/api_key_invalidation_spec.rb +9 -12
- data/spec/platinum/integration/api_key/api_key_spec.rb +4 -5
- data/spec/platinum/integration/eql/eql_async_spec.rb +72 -0
- data/spec/platinum/integration/ml/get_memory_stats_spec.rb +23 -23
- data/spec/platinum/integration/platinum_helper.rb +6 -0
- data/spec/platinum/integration/spatial/script_doc_values_spec.rb +147 -0
- data/spec/rest_api/rest_api_tests_helper.rb +1 -1
- data/spec/rest_api/rest_api_yaml_spec.rb +2 -0
- data/spec/rest_api/skipped_tests_platinum.yml +17 -1
- data/spec/spec_helper.rb +0 -4
- data/utils/endpoint_spec.rb +194 -0
- data/utils/{thor/generator/endpoint_specifics.rb → endpoint_specifics.rb} +4 -4
- data/utils/thor/generate_source.rb +14 -141
- data/utils/thor/templates/_body.erb +2 -2
- data/utils/thor/templates/_documentation_top.erb +22 -22
- data/utils/thor/templates/_method_setup.erb +10 -10
- data/utils/thor/templates/_perform_request.erb +11 -11
- data/utils/thor/templates/method.erb +28 -19
- metadata +49 -21
- data/spec/rspec_formatter.rb +0 -31
@@ -0,0 +1,72 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
|
18
|
+
require_relative '../platinum_helper'
|
19
|
+
|
20
|
+
describe 'eql/Executes async EQL with missing events' do
|
21
|
+
let(:index) { 'eql_test_m' }
|
22
|
+
before do
|
23
|
+
ADMIN_CLIENT.indices.create(
|
24
|
+
index: index,
|
25
|
+
body: {
|
26
|
+
mappings: {
|
27
|
+
properties: {
|
28
|
+
'@timestamp' => { type: 'date' },
|
29
|
+
'event.category' => { type: 'keyword' },
|
30
|
+
user: { type: 'keyword' }
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
)
|
35
|
+
ADMIN_CLIENT.bulk(
|
36
|
+
refresh: true,
|
37
|
+
body: [
|
38
|
+
{ index: { _index: 'eql_test_m', _id: '1' } },
|
39
|
+
{ event: [{ category: 'process' }], '@timestamp' => '2023-07-11T11:09:05.529Z', user: 'foo' },
|
40
|
+
{ index: { _index: 'eql_test_m', _id: '2'} },
|
41
|
+
{ event: [{ category: 'process' }], '@timestamp' => '2023-07-11T11:09:06.529Z', user: 'bar' }
|
42
|
+
]
|
43
|
+
)
|
44
|
+
end
|
45
|
+
|
46
|
+
after do
|
47
|
+
ADMIN_CLIENT.indices.delete(index: index)
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'Executes async EQL with missing events' do
|
51
|
+
response = ADMIN_CLIENT.eql.search(
|
52
|
+
index: 'eql_test_m',
|
53
|
+
wait_for_completion_timeout: '0ms',
|
54
|
+
keep_on_completion: true,
|
55
|
+
body: { query: 'sequence with maxspan=24h [ process where true ] ![ process where true ]' }
|
56
|
+
)
|
57
|
+
expect(response.status).to eq 200
|
58
|
+
expect(response['id']).not_to be_nil
|
59
|
+
id = response['id']
|
60
|
+
|
61
|
+
response = ADMIN_CLIENT.eql.get(id: id, wait_for_completion_timeout: '10s')
|
62
|
+
expect(response.status).to eq 200
|
63
|
+
expect(response['is_running']).to be false
|
64
|
+
expect(response['is_partial']).to be false
|
65
|
+
expect(response['timed_out']).to be false
|
66
|
+
expect(response['hits']['total']['value']).to eq 1
|
67
|
+
expect(response['hits']['total']['relation']).to eq 'eq'
|
68
|
+
expect(response['hits']['total']['relation']).to eq 'eq'
|
69
|
+
expect(response['hits']['sequences'].first['events'].first['_source']['user']).to eq 'bar'
|
70
|
+
expect(response['hits']['sequences'].first['events'].last['missing']).to be true
|
71
|
+
end
|
72
|
+
end
|
@@ -18,30 +18,30 @@
|
|
18
18
|
require_relative '../platinum_helper'
|
19
19
|
|
20
20
|
describe 'ML/Get Memory Stats API' do
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
it 'gets memory for all nodes' do
|
22
|
+
response = ADMIN_CLIENT.ml.get_memory_stats
|
23
|
+
expect(response.status).to eq 200
|
24
|
+
expect(response['cluster_name']).not_to be_nil
|
25
|
+
expect(response['_nodes']['total']).to be >= 1
|
26
|
+
expect(response['nodes'].first[1]['mem']['total_in_bytes']).to be > 1
|
27
|
+
end
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
it 'gets memory for ML nodes' do
|
30
|
+
response = ADMIN_CLIENT.ml.get_memory_stats
|
31
|
+
expect(response.status).to eq 200
|
32
|
+
expect(response['cluster_name']).not_to be_nil
|
33
|
+
expect(response['nodes'].first[1]['mem']['total_in_bytes']).to be > 1
|
34
|
+
end
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
36
|
+
it 'gets memory for specific node' do
|
37
|
+
response = ADMIN_CLIENT.ml.get_memory_stats
|
38
|
+
expect(response.status).to eq 200
|
39
|
+
node_id = response['nodes'].keys.first
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
end
|
41
|
+
response = ADMIN_CLIENT.ml.get_memory_stats(node_id: node_id, timeout: '29s')
|
42
|
+
expect(response.status).to eq 200
|
43
|
+
expect(response['cluster_name']).not_to be_nil
|
44
|
+
expect(response['nodes'].first[1]['mem']['total_in_bytes']).to be > 1
|
45
|
+
expect(response['_nodes']['total']).to be 1
|
47
46
|
end
|
47
|
+
end
|
@@ -34,3 +34,9 @@ TRANSPORT_OPTIONS = { ssl: { verify: false, client_cert: certificate, client_key
|
|
34
34
|
HOST = "https://elastic:#{password}@#{HOST_URI.host}:#{HOST_URI.port}".freeze
|
35
35
|
|
36
36
|
ADMIN_CLIENT = Elasticsearch::Client.new(host: HOST, transport_options: TRANSPORT_OPTIONS)
|
37
|
+
|
38
|
+
RSpec.configure do |config|
|
39
|
+
config.add_formatter('documentation')
|
40
|
+
config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/platinum-integration.html")
|
41
|
+
config.color_mode = :on
|
42
|
+
end
|
@@ -0,0 +1,147 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
|
18
|
+
require_relative '../platinum_helper'
|
19
|
+
|
20
|
+
describe 'Spatial API' do
|
21
|
+
context 'script doc values tests' do
|
22
|
+
index = 'geospatial_test'
|
23
|
+
before(:all) do
|
24
|
+
ADMIN_CLIENT.indices.create(
|
25
|
+
index: index,
|
26
|
+
body: {
|
27
|
+
settings: { number_of_shards: 1},
|
28
|
+
mappings: { properties: { geo_shape: { type: 'geo_shape' } } }
|
29
|
+
}
|
30
|
+
)
|
31
|
+
ADMIN_CLIENT.index(
|
32
|
+
index: index,
|
33
|
+
id: '1',
|
34
|
+
body: {
|
35
|
+
geo_shape: 'POLYGON((24.04725 59.942,24.04825 59.94125,24.04875 59.94125,24.04875 59.94175,24.048 59.9425,24.0475 59.94275,24.0465 59.94225,24.046 59.94225,24.04575 59.9425,24.04525 59.94225,24.04725 59.942))'
|
36
|
+
},
|
37
|
+
refresh: true
|
38
|
+
)
|
39
|
+
ADMIN_CLIENT.indices.refresh
|
40
|
+
end
|
41
|
+
|
42
|
+
after(:all) do
|
43
|
+
ADMIN_CLIENT.indices.delete(index: index)
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'centroid' do
|
47
|
+
response = ADMIN_CLIENT.search(
|
48
|
+
rest_total_hits_as_int: true,
|
49
|
+
body: {
|
50
|
+
script_fields: { centroid: { script: { source: "doc['geo_shape'].getCentroid()" } } }
|
51
|
+
}
|
52
|
+
)
|
53
|
+
expect(response['hits']['hits'].first['fields']['centroid'].first['lat']).to eq 59.942043484188616
|
54
|
+
expect(response['hits']['hits'].first['fields']['centroid'].first['lon']).to eq 24.047588920220733
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'bounding box' do
|
58
|
+
response = ADMIN_CLIENT.search(
|
59
|
+
rest_total_hits_as_int: true,
|
60
|
+
body: {
|
61
|
+
script_fields: { bbox: { script: { source: "doc['geo_shape'].getBoundingBox()" } } }
|
62
|
+
}
|
63
|
+
)
|
64
|
+
expect(response['hits']['hits'].first['fields']['bbox'].first['top_left']['lat']).to eq 59.942749994806945
|
65
|
+
expect(response['hits']['hits'].first['fields']['bbox'].first['top_left']['lon']).to eq 24.045249950140715
|
66
|
+
expect(response['hits']['hits'].first['fields']['bbox'].first['bottom_right']['lat']).to eq 59.94124996941537
|
67
|
+
expect(response['hits']['hits'].first['fields']['bbox'].first['bottom_right']['lon']).to eq 24.048749981448054
|
68
|
+
end
|
69
|
+
|
70
|
+
it 'label position' do
|
71
|
+
response = ADMIN_CLIENT.search(
|
72
|
+
rest_total_hits_as_int: true,
|
73
|
+
body: {
|
74
|
+
script_fields: { label_position: { script: { source: "doc['geo_shape'].getLabelPosition()" } } }
|
75
|
+
}
|
76
|
+
)
|
77
|
+
expect(response['hits']['hits'].first['fields']['label_position'].first['lat']).to eq 59.942043484188616
|
78
|
+
expect(response['hits']['hits'].first['fields']['label_position'].first['lon']).to eq 24.047588920220733
|
79
|
+
end
|
80
|
+
|
81
|
+
it 'bounding box points' do
|
82
|
+
response = ADMIN_CLIENT.search(
|
83
|
+
rest_total_hits_as_int: true,
|
84
|
+
body: {
|
85
|
+
script_fields: {
|
86
|
+
topLeft: { script: { source: "doc['geo_shape'].getBoundingBox().topLeft()" } },
|
87
|
+
bottomRight: { script: { source: "doc['geo_shape'].getBoundingBox().bottomRight()" } }
|
88
|
+
}
|
89
|
+
}
|
90
|
+
)
|
91
|
+
expect(response['hits']['hits'].first['fields']['topLeft'].first['lat']).to eq 59.942749994806945
|
92
|
+
expect(response['hits']['hits'].first['fields']['topLeft'].first['lon']).to eq 24.045249950140715
|
93
|
+
expect(response['hits']['hits'].first['fields']['bottomRight'].first['lat']).to eq 59.94124996941537
|
94
|
+
expect(response['hits']['hits'].first['fields']['bottomRight'].first['lon']).to eq 24.048749981448054
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'dimensional type' do
|
98
|
+
response = ADMIN_CLIENT.search(
|
99
|
+
rest_total_hits_as_int: true,
|
100
|
+
body: {
|
101
|
+
script_fields: { type: { script: { source: "doc['geo_shape'].getDimensionalType()" } } }
|
102
|
+
}
|
103
|
+
)
|
104
|
+
expect(response['hits']['hits'].first['fields']['type'].first).to eq 2
|
105
|
+
end
|
106
|
+
|
107
|
+
it 'geoshape value' do
|
108
|
+
response = ADMIN_CLIENT.search(
|
109
|
+
rest_total_hits_as_int: true,
|
110
|
+
body: {
|
111
|
+
script_fields: { type: { script: { source: "doc['geo_shape'].get(0)" } } }
|
112
|
+
}
|
113
|
+
)
|
114
|
+
expect(response['hits']['hits'].first['fields']['type'].first).to eq '<unserializable>'
|
115
|
+
|
116
|
+
response = ADMIN_CLIENT.search(
|
117
|
+
rest_total_hits_as_int: true,
|
118
|
+
body: {
|
119
|
+
script_fields: { type: { script: { source: "field('geo_shape').get(null)"} } }
|
120
|
+
}
|
121
|
+
)
|
122
|
+
expect(response['hits']['hits'].first['fields']['type'].first).to eq '<unserializable>'
|
123
|
+
|
124
|
+
response = ADMIN_CLIENT.search(
|
125
|
+
rest_total_hits_as_int: true,
|
126
|
+
body: {
|
127
|
+
script_fields: { type: { script: { source: "$('geo_shape', null)"} } }
|
128
|
+
}
|
129
|
+
)
|
130
|
+
expect(response['hits']['hits'].first['fields']['type'].first).to eq '<unserializable>'
|
131
|
+
end
|
132
|
+
|
133
|
+
it 'diagonal length' do
|
134
|
+
response = ADMIN_CLIENT.search(
|
135
|
+
rest_total_hits_as_int: true,
|
136
|
+
body: {
|
137
|
+
script_fields: {
|
138
|
+
width: { script: { source: "doc['geo_shape'].getMercatorWidth()" } },
|
139
|
+
height: { script: { source: "doc['geo_shape'].getMercatorHeight()" } }
|
140
|
+
}
|
141
|
+
}
|
142
|
+
)
|
143
|
+
expect(response['hits']['hits'].first['fields']['width'].first).to eq 389.62170283915475
|
144
|
+
expect(response['hits']['hits'].first['fields']['height'].first).to eq 333.37976841442287
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
@@ -97,4 +97,4 @@ REST_API_YAML_FILES = if ENV['RUN_SKIPPED_TESTS'] # only run the skipped tests i
|
|
97
97
|
end
|
98
98
|
|
99
99
|
# The features to skip
|
100
|
-
REST_API_YAML_SKIP_FEATURES = ['warnings', 'node_selector'].freeze
|
100
|
+
REST_API_YAML_SKIP_FEATURES = ['warnings', 'node_selector', 'close_to'].freeze
|
@@ -22,6 +22,8 @@ require_relative './run_rspec_matchers'
|
|
22
22
|
LOGGER = Logger.new($stdout)
|
23
23
|
|
24
24
|
describe 'Rest API YAML tests' do
|
25
|
+
LOGGER.info "Elastic Transport version: #{Elastic::Transport::VERSION}"
|
26
|
+
|
25
27
|
if REST_API_YAML_FILES.empty?
|
26
28
|
LOGGER.error 'No test files found!'
|
27
29
|
LOGGER.info 'Use rake rake elasticsearch:download_artifacts in the root directory of the project to download the test artifacts.'
|
@@ -8,7 +8,6 @@
|
|
8
8
|
:file: 'ml/explain_data_frame_analytics.yml'
|
9
9
|
:description: 'Test non-empty data frame given body'
|
10
10
|
|
11
|
-
# TODO https://github.com/elastic/elasticsearch-ruby/issues/852
|
12
11
|
-
|
13
12
|
:file: 'analytics/usage.yml'
|
14
13
|
:description: 'Usage stats on analytics indices'
|
@@ -74,6 +73,9 @@
|
|
74
73
|
-
|
75
74
|
:file: 'ml/3rd_party_deployment.yml'
|
76
75
|
:description: 'Test clear deployment cache'
|
76
|
+
- # Wrong error matching
|
77
|
+
:file: 'ml/3rd_party_deployment.yml'
|
78
|
+
:description: 'Test getting and putting Fill Mask with two mask tokens, as well as exceptions caused by requests with the wrong token'
|
77
79
|
|
78
80
|
-
|
79
81
|
:file: 'searchable_snapshots/20_synthetic_source.yml'
|
@@ -93,3 +95,17 @@
|
|
93
95
|
-
|
94
96
|
:file: 'ml/get_memory_stats.yml'
|
95
97
|
:description: '*'
|
98
|
+
|
99
|
+
-
|
100
|
+
:file: 'eql/30_async_missing_events.yml'
|
101
|
+
:description: 'Execute async EQL with missing events'
|
102
|
+
-
|
103
|
+
:file: 'api_key/60_admin_user.yml'
|
104
|
+
:description: 'Test get api key (with role descriptors + metadata)'
|
105
|
+
-
|
106
|
+
:file: 'api_key/60_admin_user.yml'
|
107
|
+
:description: 'Test query api keys'
|
108
|
+
|
109
|
+
-
|
110
|
+
:file: 'spatial/70_script_doc_values.yml'
|
111
|
+
:description: '*'
|
data/spec/spec_helper.rb
CHANGED
@@ -61,10 +61,6 @@ RSpec.configure do |config|
|
|
61
61
|
config.add_formatter('documentation')
|
62
62
|
config.add_formatter('RspecJunitFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}-junit.xml")
|
63
63
|
config.add_formatter('RSpec::Core::Formatters::HtmlFormatter', "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}.html")
|
64
|
-
if ENV['BUILDKITE']
|
65
|
-
require_relative "./rspec_formatter.rb"
|
66
|
-
config.add_formatter('RSpecCustomFormatter')
|
67
|
-
end
|
68
64
|
config.color_mode = :on
|
69
65
|
end
|
70
66
|
|
@@ -0,0 +1,194 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
|
18
|
+
# encoding: UTF-8
|
19
|
+
|
20
|
+
require_relative 'endpoint_specifics'
|
21
|
+
|
22
|
+
module Elasticsearch
|
23
|
+
module API
|
24
|
+
class EndpointSpec
|
25
|
+
include EndpointSpecifics
|
26
|
+
|
27
|
+
def initialize(filepath)
|
28
|
+
@path = Pathname(filepath)
|
29
|
+
json = MultiJson.load(File.read(@path))
|
30
|
+
@spec = json.values.first
|
31
|
+
@endpoint_name = json.keys.first
|
32
|
+
|
33
|
+
full_namespace = parse_full_namespace
|
34
|
+
@namespace_depth = full_namespace.size > 0 ? full_namespace.size - 1 : 0
|
35
|
+
@module_namespace = full_namespace[0, namespace_depth]
|
36
|
+
@method_name = full_namespace.last
|
37
|
+
|
38
|
+
@path_parts = parse_endpoint_parts(@spec)
|
39
|
+
@params = @spec['params'] || {}
|
40
|
+
@paths = @spec['url']['paths'].map { |b| b['path'] } if @spec['url']
|
41
|
+
@path_params = path_variables.flatten.uniq.collect(&:to_sym)
|
42
|
+
@http_method = parse_http_method(@spec)
|
43
|
+
@deprecation_note = @spec['url']['paths'].last&.[]('deprecated')
|
44
|
+
@http_path = parse_http_path(@paths)
|
45
|
+
@required_parts = parse_required_parts(@spec)
|
46
|
+
end
|
47
|
+
|
48
|
+
attr_reader :module_namespace,
|
49
|
+
:method_name,
|
50
|
+
:endpoint_name,
|
51
|
+
:path,
|
52
|
+
:path_parts,
|
53
|
+
:params,
|
54
|
+
:deprecation_note,
|
55
|
+
:namespace_depth,
|
56
|
+
:http_path,
|
57
|
+
:required_parts,
|
58
|
+
:http_method,
|
59
|
+
:namespace_depth,
|
60
|
+
:path_params,
|
61
|
+
:perform_request_opts
|
62
|
+
|
63
|
+
def body
|
64
|
+
@spec['body']
|
65
|
+
end
|
66
|
+
|
67
|
+
def documentation
|
68
|
+
@spec['documentation']
|
69
|
+
end
|
70
|
+
|
71
|
+
def stability
|
72
|
+
@spec['stability']
|
73
|
+
end
|
74
|
+
|
75
|
+
# Function that adds the listified h param code
|
76
|
+
def specific_params
|
77
|
+
super(@module_namespace.first, @method_name)
|
78
|
+
end
|
79
|
+
|
80
|
+
private
|
81
|
+
|
82
|
+
def parse_full_namespace
|
83
|
+
names = @endpoint_name.split('.')
|
84
|
+
# Return an array to expand 'ccr', 'ilm', 'ml' and 'slm'
|
85
|
+
names.map do |name|
|
86
|
+
name
|
87
|
+
.gsub(/^ml$/, 'machine_learning')
|
88
|
+
.gsub(/^ilm$/, 'index_lifecycle_management')
|
89
|
+
.gsub(/^ccr/, 'cross_cluster_replication')
|
90
|
+
.gsub(/^slm/, 'snapshot_lifecycle_management')
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def parse_endpoint_parts(spec)
|
95
|
+
parts = spec['url']['paths'].select do |a|
|
96
|
+
a.keys.include?('parts')
|
97
|
+
end.map do |path|
|
98
|
+
path&.[]('parts')
|
99
|
+
end
|
100
|
+
(parts.inject(&:merge) || [])
|
101
|
+
end
|
102
|
+
|
103
|
+
def parse_http_method(spec)
|
104
|
+
return '_id ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @endpoint_name == 'index'
|
105
|
+
return '_name ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @method_name == 'create_service_token'
|
106
|
+
return post_and_get if @endpoint_name == 'count'
|
107
|
+
|
108
|
+
default_method = spec['url']['paths'].map { |a| a['methods'] }.flatten.first
|
109
|
+
if spec['body'] && default_method == 'GET'
|
110
|
+
# When default method is GET and body is required, we should always use POST
|
111
|
+
if spec['body']['required']
|
112
|
+
'Elasticsearch::API::HTTP_POST'
|
113
|
+
else
|
114
|
+
post_and_get
|
115
|
+
end
|
116
|
+
else
|
117
|
+
"Elasticsearch::API::HTTP_#{default_method}"
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
def parse_http_path(paths)
|
122
|
+
return "\"#{parse_path(paths.first)}\"" if paths.size == 1
|
123
|
+
|
124
|
+
result = ''
|
125
|
+
anchor_string = []
|
126
|
+
paths.sort { |a, b| b.length <=> a.length }.each_with_index do |path, i|
|
127
|
+
var_string = extract_path_variables(path).map { |var| "_#{var}" }.join(' && ')
|
128
|
+
next if anchor_string.include? var_string
|
129
|
+
|
130
|
+
anchor_string << var_string
|
131
|
+
result += if i.zero?
|
132
|
+
"if #{var_string}\n"
|
133
|
+
elsif (i == paths.size - 1) || var_string.empty?
|
134
|
+
"else\n"
|
135
|
+
else
|
136
|
+
"elsif #{var_string}\n"
|
137
|
+
end
|
138
|
+
result += "\"#{parse_path(path)}\"\n"
|
139
|
+
end
|
140
|
+
result += 'end'
|
141
|
+
result
|
142
|
+
end
|
143
|
+
|
144
|
+
def parse_path(path)
|
145
|
+
path.gsub(/^\//, '')
|
146
|
+
.gsub(/\/$/, '')
|
147
|
+
.gsub('{', "\#{Utils.__listify(_")
|
148
|
+
.gsub('}', ')}')
|
149
|
+
end
|
150
|
+
|
151
|
+
def path_variables
|
152
|
+
@paths.map do |path|
|
153
|
+
extract_path_variables(path)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
def parse_path_variables
|
158
|
+
@paths.map do |path|
|
159
|
+
extract_path_variables(path)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
# extract values that are in the {var} format:
|
164
|
+
def extract_path_variables(path)
|
165
|
+
path.scan(/{(\w+)}/).flatten
|
166
|
+
end
|
167
|
+
|
168
|
+
# Find parts that are definitely required and should raise an error if
|
169
|
+
# they're not present
|
170
|
+
#
|
171
|
+
def parse_required_parts(spec)
|
172
|
+
required = []
|
173
|
+
return required if @endpoint_name == 'tasks.get'
|
174
|
+
|
175
|
+
required << 'body' if (spec['body'] && spec['body']['required'])
|
176
|
+
# Get required variables from paths:
|
177
|
+
req_variables = parse_path_variables.inject(:&) # find intersection
|
178
|
+
required << req_variables unless req_variables.empty?
|
179
|
+
required.flatten
|
180
|
+
end
|
181
|
+
|
182
|
+
def post_and_get
|
183
|
+
# the METHOD is defined after doing arguments.delete(:body), so we need to check for `body`
|
184
|
+
<<~SRC
|
185
|
+
if body
|
186
|
+
Elasticsearch::API::HTTP_POST
|
187
|
+
else
|
188
|
+
Elasticsearch::API::HTTP_GET
|
189
|
+
end
|
190
|
+
SRC
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
@@ -55,10 +55,10 @@ module Elasticsearch
|
|
55
55
|
recovery shards thread_pool].freeze
|
56
56
|
|
57
57
|
# Function that adds the listified h param code
|
58
|
-
def specific_params(namespace)
|
58
|
+
def specific_params(namespace, method_name)
|
59
59
|
params = []
|
60
|
-
if H_PARAMS.include?(
|
61
|
-
if
|
60
|
+
if H_PARAMS.include?(method_name) && namespace == 'cat'
|
61
|
+
if method_name == 'nodes'
|
62
62
|
params << 'params[:h] = Utils.__listify(params[:h], escape: false) if params[:h]'
|
63
63
|
else
|
64
64
|
params << 'params[:h] = Utils.__listify(params[:h]) if params[:h]'
|
@@ -84,7 +84,7 @@ module Elasticsearch
|
|
84
84
|
def ping_perform_request
|
85
85
|
<<~SRC
|
86
86
|
begin
|
87
|
-
perform_request(method, path, params, body, headers).status == 200 ? true : false
|
87
|
+
perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false
|
88
88
|
rescue Exception => e
|
89
89
|
if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not\s*Found|404|ConnectionFailed/i
|
90
90
|
false
|