From eba5384143bc17f45d052d89321fac29607f2df9 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Wed, 28 Jun 2023 11:55:54 +0200 Subject: [PATCH 1/5] Add path patterns and endpoint as args to perform_request --- .../elasticsearch/api/actions/async_search/delete.rb | 4 ++-- .../lib/elasticsearch/api/actions/async_search/get.rb | 4 ++-- .../elasticsearch/api/actions/async_search/status.rb | 5 +++-- .../elasticsearch/api/actions/async_search/submit.rb | 5 +++-- .../actions/autoscaling/delete_autoscaling_policy.rb | 5 +++-- .../actions/autoscaling/get_autoscaling_capacity.rb | 5 +++-- .../api/actions/autoscaling/get_autoscaling_policy.rb | 5 +++-- .../api/actions/autoscaling/put_autoscaling_policy.rb | 5 +++-- .../lib/elasticsearch/api/actions/bulk.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/aliases.rb | 5 +++-- .../lib/elasticsearch/api/actions/cat/allocation.rb | 5 +++-- .../api/actions/cat/component_templates.rb | 5 +++-- .../lib/elasticsearch/api/actions/cat/count.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/fielddata.rb | 5 +++-- .../lib/elasticsearch/api/actions/cat/health.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/help.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/indices.rb | 5 +++-- .../lib/elasticsearch/api/actions/cat/master.rb | 4 ++-- .../api/actions/cat/ml_data_frame_analytics.rb | 5 +++-- .../lib/elasticsearch/api/actions/cat/ml_datafeeds.rb | 5 +++-- .../lib/elasticsearch/api/actions/cat/ml_jobs.rb | 5 +++-- .../elasticsearch/api/actions/cat/ml_trained_models.rb | 5 +++-- .../lib/elasticsearch/api/actions/cat/nodeattrs.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/nodes.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/pending_tasks.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/plugins.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/recovery.rb | 5 +++-- .../lib/elasticsearch/api/actions/cat/repositories.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/segments.rb | 5 +++-- .../lib/elasticsearch/api/actions/cat/shards.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/snapshots.rb | 5 +++-- .../lib/elasticsearch/api/actions/cat/tasks.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/templates.rb | 5 +++-- .../lib/elasticsearch/api/actions/cat/thread_pool.rb | 5 +++-- .../lib/elasticsearch/api/actions/cat/transforms.rb | 5 +++-- .../lib/elasticsearch/api/actions/clear_scroll.rb | 8 +++++--- .../elasticsearch/api/actions/close_point_in_time.rb | 4 ++-- .../api/actions/cluster/allocation_explain.rb | 5 +++-- .../api/actions/cluster/delete_component_template.rb | 5 +++-- .../actions/cluster/delete_voting_config_exclusions.rb | 5 +++-- .../api/actions/cluster/exists_component_template.rb | 5 +++-- .../api/actions/cluster/get_component_template.rb | 5 +++-- .../elasticsearch/api/actions/cluster/get_settings.rb | 4 ++-- .../lib/elasticsearch/api/actions/cluster/health.rb | 5 +++-- .../lib/elasticsearch/api/actions/cluster/info.rb | 4 ++-- .../elasticsearch/api/actions/cluster/pending_tasks.rb | 4 ++-- .../actions/cluster/post_voting_config_exclusions.rb | 5 +++-- .../api/actions/cluster/put_component_template.rb | 5 +++-- .../elasticsearch/api/actions/cluster/put_settings.rb | 4 ++-- .../elasticsearch/api/actions/cluster/remote_info.rb | 4 ++-- .../lib/elasticsearch/api/actions/cluster/reroute.rb | 4 ++-- .../lib/elasticsearch/api/actions/cluster/state.rb | 5 +++-- .../lib/elasticsearch/api/actions/cluster/stats.rb | 5 +++-- .../lib/elasticsearch/api/actions/count.rb | 4 ++-- .../lib/elasticsearch/api/actions/create.rb | 2 +- .../delete_auto_follow_pattern.rb | 5 +++-- .../api/actions/cross_cluster_replication/follow.rb | 4 ++-- .../actions/cross_cluster_replication/follow_info.rb | 4 ++-- .../actions/cross_cluster_replication/follow_stats.rb | 4 ++-- .../cross_cluster_replication/forget_follower.rb | 5 +++-- .../get_auto_follow_pattern.rb | 5 +++-- .../pause_auto_follow_pattern.rb | 5 +++-- .../actions/cross_cluster_replication/pause_follow.rb | 5 +++-- .../put_auto_follow_pattern.rb | 5 +++-- .../resume_auto_follow_pattern.rb | 5 +++-- .../actions/cross_cluster_replication/resume_follow.rb | 5 +++-- .../api/actions/cross_cluster_replication/stats.rb | 4 ++-- .../api/actions/cross_cluster_replication/unfollow.rb | 4 ++-- .../actions/dangling_indices/delete_dangling_index.rb | 5 +++-- .../actions/dangling_indices/import_dangling_index.rb | 5 +++-- .../actions/dangling_indices/list_dangling_indices.rb | 5 +++-- .../lib/elasticsearch/api/actions/delete.rb | 6 +++--- .../lib/elasticsearch/api/actions/delete_by_query.rb | 4 ++-- .../api/actions/delete_by_query_rethrottle.rb | 5 +++-- .../lib/elasticsearch/api/actions/delete_script.rb | 4 ++-- .../elasticsearch/api/actions/enrich/delete_policy.rb | 5 +++-- .../elasticsearch/api/actions/enrich/execute_policy.rb | 5 +++-- .../lib/elasticsearch/api/actions/enrich/get_policy.rb | 5 +++-- .../lib/elasticsearch/api/actions/enrich/put_policy.rb | 4 ++-- .../lib/elasticsearch/api/actions/enrich/stats.rb | 4 ++-- .../lib/elasticsearch/api/actions/eql/delete.rb | 4 ++-- .../lib/elasticsearch/api/actions/eql/get.rb | 4 ++-- .../lib/elasticsearch/api/actions/eql/get_status.rb | 4 ++-- .../lib/elasticsearch/api/actions/eql/search.rb | 4 ++-- .../lib/elasticsearch/api/actions/exists.rb | 5 +++-- .../lib/elasticsearch/api/actions/exists_source.rb | 4 ++-- .../lib/elasticsearch/api/actions/explain.rb | 4 ++-- .../elasticsearch/api/actions/features/get_features.rb | 4 ++-- .../api/actions/features/reset_features.rb | 4 ++-- .../lib/elasticsearch/api/actions/field_caps.rb | 4 ++-- .../api/actions/fleet/global_checkpoints.rb | 5 +++-- .../lib/elasticsearch/api/actions/fleet/msearch.rb | 3 ++- .../lib/elasticsearch/api/actions/fleet/search.rb | 3 ++- elasticsearch-api/lib/elasticsearch/api/actions/get.rb | 6 +++--- .../lib/elasticsearch/api/actions/get_script.rb | 4 ++-- .../elasticsearch/api/actions/get_script_context.rb | 4 ++-- .../elasticsearch/api/actions/get_script_languages.rb | 4 ++-- .../lib/elasticsearch/api/actions/get_source.rb | 4 ++-- .../lib/elasticsearch/api/actions/graph/explore.rb | 4 ++-- .../lib/elasticsearch/api/actions/health_report.rb | 5 +++-- .../lib/elasticsearch/api/actions/index.rb | 4 ++-- .../index_lifecycle_management/delete_lifecycle.rb | 5 +++-- .../index_lifecycle_management/explain_lifecycle.rb | 5 +++-- .../index_lifecycle_management/get_lifecycle.rb | 5 +++-- .../actions/index_lifecycle_management/get_status.rb | 4 ++-- .../migrate_to_data_tiers.rb | 5 +++-- .../actions/index_lifecycle_management/move_to_step.rb | 4 ++-- .../index_lifecycle_management/put_lifecycle.rb | 4 ++-- .../index_lifecycle_management/remove_policy.rb | 4 ++-- .../api/actions/index_lifecycle_management/retry.rb | 4 ++-- .../api/actions/index_lifecycle_management/start.rb | 4 ++-- .../api/actions/index_lifecycle_management/stop.rb | 4 ++-- .../lib/elasticsearch/api/actions/indices/add_block.rb | 4 ++-- .../lib/elasticsearch/api/actions/indices/analyze.rb | 4 ++-- .../elasticsearch/api/actions/indices/clear_cache.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/clone.rb | 4 ++-- .../lib/elasticsearch/api/actions/indices/close.rb | 4 ++-- .../lib/elasticsearch/api/actions/indices/create.rb | 4 ++-- .../api/actions/indices/create_data_stream.rb | 5 +++-- .../api/actions/indices/data_streams_stats.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/delete.rb | 6 +++--- .../elasticsearch/api/actions/indices/delete_alias.rb | 5 +++-- .../api/actions/indices/delete_data_lifecycle.rb | 3 ++- .../api/actions/indices/delete_data_stream.rb | 5 +++-- .../api/actions/indices/delete_index_template.rb | 5 +++-- .../api/actions/indices/delete_template.rb | 7 ++++--- .../elasticsearch/api/actions/indices/disk_usage.rb | 4 ++-- .../elasticsearch/api/actions/indices/downsample.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/exists.rb | 5 +++-- .../elasticsearch/api/actions/indices/exists_alias.rb | 5 +++-- .../api/actions/indices/exists_index_template.rb | 5 +++-- .../api/actions/indices/exists_template.rb | 5 +++-- .../api/actions/indices/explain_data_lifecycle.rb | 3 ++- .../api/actions/indices/field_usage_stats.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/flush.rb | 4 ++-- .../elasticsearch/api/actions/indices/forcemerge.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/get.rb | 4 ++-- .../lib/elasticsearch/api/actions/indices/get_alias.rb | 5 +++-- .../api/actions/indices/get_data_lifecycle.rb | 3 ++- .../api/actions/indices/get_data_stream.rb | 5 +++-- .../api/actions/indices/get_field_mapping.rb | 5 +++-- .../api/actions/indices/get_index_template.rb | 5 +++-- .../elasticsearch/api/actions/indices/get_mapping.rb | 5 +++-- .../elasticsearch/api/actions/indices/get_settings.rb | 5 +++-- .../elasticsearch/api/actions/indices/get_template.rb | 5 +++-- .../api/actions/indices/migrate_to_data_stream.rb | 5 +++-- .../api/actions/indices/modify_data_stream.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/open.rb | 4 ++-- .../api/actions/indices/promote_data_stream.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/put_alias.rb | 5 +++-- .../api/actions/indices/put_data_lifecycle.rb | 3 ++- .../api/actions/indices/put_index_template.rb | 5 +++-- .../elasticsearch/api/actions/indices/put_mapping.rb | 4 ++-- .../elasticsearch/api/actions/indices/put_settings.rb | 5 +++-- .../elasticsearch/api/actions/indices/put_template.rb | 4 ++-- .../lib/elasticsearch/api/actions/indices/recovery.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/refresh.rb | 4 ++-- .../api/actions/indices/reload_search_analyzers.rb | 5 +++-- .../elasticsearch/api/actions/indices/resolve_index.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/rollover.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/segments.rb | 5 +++-- .../elasticsearch/api/actions/indices/shard_stores.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/shrink.rb | 4 ++-- .../api/actions/indices/simulate_index_template.rb | 5 +++-- .../api/actions/indices/simulate_template.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/split.rb | 4 ++-- .../lib/elasticsearch/api/actions/indices/stats.rb | 5 +++-- .../lib/elasticsearch/api/actions/indices/unfreeze.rb | 4 ++-- .../api/actions/indices/update_aliases.rb | 4 ++-- .../api/actions/indices/validate_query.rb | 5 +++-- .../lib/elasticsearch/api/actions/info.rb | 4 ++-- .../api/actions/ingest/delete_pipeline.rb | 5 +++-- .../elasticsearch/api/actions/ingest/geo_ip_stats.rb | 4 ++-- .../elasticsearch/api/actions/ingest/get_pipeline.rb | 5 +++-- .../elasticsearch/api/actions/ingest/processor_grok.rb | 4 ++-- .../elasticsearch/api/actions/ingest/put_pipeline.rb | 5 +++-- .../lib/elasticsearch/api/actions/ingest/simulate.rb | 5 +++-- .../lib/elasticsearch/api/actions/knn_search.rb | 4 ++-- .../lib/elasticsearch/api/actions/license/delete.rb | 4 ++-- .../lib/elasticsearch/api/actions/license/get.rb | 4 ++-- .../api/actions/license/get_basic_status.rb | 4 ++-- .../api/actions/license/get_trial_status.rb | 4 ++-- .../lib/elasticsearch/api/actions/license/post.rb | 4 ++-- .../api/actions/license/post_start_basic.rb | 4 ++-- .../api/actions/license/post_start_trial.rb | 4 ++-- .../api/actions/logstash/delete_pipeline.rb | 5 +++-- .../elasticsearch/api/actions/logstash/get_pipeline.rb | 5 +++-- .../elasticsearch/api/actions/logstash/put_pipeline.rb | 5 +++-- .../clear_trained_model_deployment_cache.rb | 5 +++-- .../api/actions/machine_learning/close_job.rb | 5 +++-- .../api/actions/machine_learning/delete_calendar.rb | 5 +++-- .../actions/machine_learning/delete_calendar_event.rb | 5 +++-- .../actions/machine_learning/delete_calendar_job.rb | 5 +++-- .../machine_learning/delete_data_frame_analytics.rb | 5 +++-- .../api/actions/machine_learning/delete_datafeed.rb | 5 +++-- .../actions/machine_learning/delete_expired_data.rb | 5 +++-- .../api/actions/machine_learning/delete_filter.rb | 4 ++-- .../api/actions/machine_learning/delete_forecast.rb | 5 +++-- .../api/actions/machine_learning/delete_job.rb | 5 +++-- .../actions/machine_learning/delete_model_snapshot.rb | 5 +++-- .../actions/machine_learning/delete_trained_model.rb | 5 +++-- .../machine_learning/delete_trained_model_alias.rb | 5 +++-- .../actions/machine_learning/estimate_model_memory.rb | 5 +++-- .../actions/machine_learning/evaluate_data_frame.rb | 5 +++-- .../machine_learning/explain_data_frame_analytics.rb | 5 +++-- .../api/actions/machine_learning/flush_job.rb | 5 +++-- .../api/actions/machine_learning/forecast.rb | 5 +++-- .../api/actions/machine_learning/get_buckets.rb | 5 +++-- .../actions/machine_learning/get_calendar_events.rb | 5 +++-- .../api/actions/machine_learning/get_calendars.rb | 5 +++-- .../api/actions/machine_learning/get_categories.rb | 5 +++-- .../machine_learning/get_data_frame_analytics.rb | 5 +++-- .../machine_learning/get_data_frame_analytics_stats.rb | 5 +++-- .../api/actions/machine_learning/get_datafeed_stats.rb | 5 +++-- .../api/actions/machine_learning/get_datafeeds.rb | 5 +++-- .../api/actions/machine_learning/get_filters.rb | 5 +++-- .../api/actions/machine_learning/get_influencers.rb | 5 +++-- .../api/actions/machine_learning/get_job_stats.rb | 5 +++-- .../api/actions/machine_learning/get_jobs.rb | 5 +++-- .../api/actions/machine_learning/get_memory_stats.rb | 5 +++-- .../get_model_snapshot_upgrade_stats.rb | 5 +++-- .../actions/machine_learning/get_model_snapshots.rb | 5 +++-- .../actions/machine_learning/get_overall_buckets.rb | 5 +++-- .../api/actions/machine_learning/get_records.rb | 5 +++-- .../api/actions/machine_learning/get_trained_models.rb | 5 +++-- .../machine_learning/get_trained_models_stats.rb | 5 +++-- .../actions/machine_learning/infer_trained_model.rb | 5 +++-- .../elasticsearch/api/actions/machine_learning/info.rb | 4 ++-- .../api/actions/machine_learning/open_job.rb | 5 +++-- .../actions/machine_learning/post_calendar_events.rb | 5 +++-- .../api/actions/machine_learning/post_data.rb | 5 +++-- .../machine_learning/preview_data_frame_analytics.rb | 5 +++-- .../api/actions/machine_learning/preview_datafeed.rb | 5 +++-- .../api/actions/machine_learning/put_calendar.rb | 5 +++-- .../api/actions/machine_learning/put_calendar_job.rb | 5 +++-- .../machine_learning/put_data_frame_analytics.rb | 5 +++-- .../api/actions/machine_learning/put_datafeed.rb | 5 +++-- .../api/actions/machine_learning/put_filter.rb | 4 ++-- .../api/actions/machine_learning/put_job.rb | 5 +++-- .../api/actions/machine_learning/put_trained_model.rb | 5 +++-- .../machine_learning/put_trained_model_alias.rb | 5 +++-- .../put_trained_model_definition_part.rb | 5 +++-- .../machine_learning/put_trained_model_vocabulary.rb | 5 +++-- .../api/actions/machine_learning/reset_job.rb | 5 +++-- .../actions/machine_learning/revert_model_snapshot.rb | 5 +++-- .../api/actions/machine_learning/set_upgrade_mode.rb | 4 ++-- .../machine_learning/start_data_frame_analytics.rb | 5 +++-- .../api/actions/machine_learning/start_datafeed.rb | 5 +++-- .../machine_learning/start_trained_model_deployment.rb | 5 +++-- .../machine_learning/stop_data_frame_analytics.rb | 5 +++-- .../api/actions/machine_learning/stop_datafeed.rb | 5 +++-- .../machine_learning/stop_trained_model_deployment.rb | 5 +++-- .../machine_learning/update_data_frame_analytics.rb | 5 +++-- .../api/actions/machine_learning/update_datafeed.rb | 5 +++-- .../api/actions/machine_learning/update_filter.rb | 5 +++-- .../api/actions/machine_learning/update_job.rb | 5 +++-- .../actions/machine_learning/update_model_snapshot.rb | 5 +++-- .../update_trained_model_deployment.rb | 5 +++-- .../actions/machine_learning/upgrade_job_snapshot.rb | 5 +++-- .../api/actions/machine_learning/validate.rb | 5 +++-- .../api/actions/machine_learning/validate_detector.rb | 5 +++-- .../lib/elasticsearch/api/actions/mget.rb | 4 ++-- .../api/actions/migration/deprecations.rb | 5 +++-- .../actions/migration/get_feature_upgrade_status.rb | 5 +++-- .../api/actions/migration/post_feature_upgrade.rb | 5 +++-- .../lib/elasticsearch/api/actions/monitoring/bulk.rb | 5 +++-- .../lib/elasticsearch/api/actions/msearch.rb | 4 ++-- .../lib/elasticsearch/api/actions/msearch_template.rb | 5 +++-- .../lib/elasticsearch/api/actions/mtermvectors.rb | 5 +++-- .../nodes/clear_repositories_metering_archive.rb | 5 +++-- .../actions/nodes/get_repositories_metering_info.rb | 5 +++-- .../lib/elasticsearch/api/actions/nodes/hot_threads.rb | 5 +++-- .../lib/elasticsearch/api/actions/nodes/info.rb | 5 +++-- .../api/actions/nodes/reload_secure_settings.rb | 5 +++-- .../lib/elasticsearch/api/actions/nodes/stats.rb | 5 +++-- .../lib/elasticsearch/api/actions/nodes/usage.rb | 5 +++-- .../elasticsearch/api/actions/open_point_in_time.rb | 4 ++-- .../lib/elasticsearch/api/actions/ping.rb | 4 ++-- .../lib/elasticsearch/api/actions/put_script.rb | 5 +++-- .../elasticsearch/api/actions/query_ruleset/delete.rb | 5 +++-- .../lib/elasticsearch/api/actions/query_ruleset/get.rb | 5 +++-- .../lib/elasticsearch/api/actions/query_ruleset/put.rb | 5 +++-- .../lib/elasticsearch/api/actions/rank_eval.rb | 5 +++-- .../lib/elasticsearch/api/actions/reindex.rb | 4 ++-- .../elasticsearch/api/actions/reindex_rethrottle.rb | 5 +++-- .../api/actions/render_search_template.rb | 5 +++-- .../lib/elasticsearch/api/actions/rollup/delete_job.rb | 4 ++-- .../lib/elasticsearch/api/actions/rollup/get_jobs.rb | 5 +++-- .../api/actions/rollup/get_rollup_caps.rb | 5 +++-- .../api/actions/rollup/get_rollup_index_caps.rb | 5 +++-- .../lib/elasticsearch/api/actions/rollup/put_job.rb | 4 ++-- .../elasticsearch/api/actions/rollup/rollup_search.rb | 5 +++-- .../lib/elasticsearch/api/actions/rollup/start_job.rb | 4 ++-- .../lib/elasticsearch/api/actions/rollup/stop_job.rb | 4 ++-- .../api/actions/scripts_painless_execute.rb | 5 +++-- .../lib/elasticsearch/api/actions/scroll.rb | 5 +++-- .../lib/elasticsearch/api/actions/search.rb | 4 ++-- .../api/actions/search_application/delete.rb | 5 +++-- .../search_application/delete_behavioral_analytics.rb | 5 +++-- .../api/actions/search_application/get.rb | 5 +++-- .../search_application/get_behavioral_analytics.rb | 5 +++-- .../api/actions/search_application/list.rb | 5 +++-- .../post_behavioral_analytics_event.rb | 3 ++- .../api/actions/search_application/put.rb | 5 +++-- .../search_application/put_behavioral_analytics.rb | 5 +++-- .../api/actions/search_application/render_query.rb | 5 +++-- .../api/actions/search_application/search.rb | 5 +++-- .../lib/elasticsearch/api/actions/search_mvt.rb | 5 +++-- .../lib/elasticsearch/api/actions/search_shards.rb | 5 +++-- .../lib/elasticsearch/api/actions/search_template.rb | 5 +++-- .../api/actions/searchable_snapshots/cache_stats.rb | 5 +++-- .../api/actions/searchable_snapshots/clear_cache.rb | 5 +++-- .../api/actions/searchable_snapshots/mount.rb | 5 +++-- .../api/actions/searchable_snapshots/stats.rb | 5 +++-- .../api/actions/security/activate_user_profile.rb | 5 +++-- .../elasticsearch/api/actions/security/authenticate.rb | 4 ++-- .../api/actions/security/bulk_update_api_keys.rb | 5 +++-- .../api/actions/security/change_password.rb | 5 +++-- .../api/actions/security/clear_api_key_cache.rb | 5 +++-- .../api/actions/security/clear_cached_privileges.rb | 5 +++-- .../api/actions/security/clear_cached_realms.rb | 5 +++-- .../api/actions/security/clear_cached_roles.rb | 5 +++-- .../actions/security/clear_cached_service_tokens.rb | 5 +++-- .../api/actions/security/create_api_key.rb | 5 +++-- .../actions/security/create_cross_cluster_api_key.rb | 5 +++-- .../api/actions/security/create_service_token.rb | 5 +++-- .../api/actions/security/delete_privileges.rb | 5 +++-- .../elasticsearch/api/actions/security/delete_role.rb | 5 +++-- .../api/actions/security/delete_role_mapping.rb | 5 +++-- .../api/actions/security/delete_service_token.rb | 5 +++-- .../elasticsearch/api/actions/security/delete_user.rb | 5 +++-- .../elasticsearch/api/actions/security/disable_user.rb | 5 +++-- .../api/actions/security/disable_user_profile.rb | 5 +++-- .../elasticsearch/api/actions/security/enable_user.rb | 5 +++-- .../api/actions/security/enable_user_profile.rb | 5 +++-- .../api/actions/security/enroll_kibana.rb | 4 ++-- .../elasticsearch/api/actions/security/enroll_node.rb | 4 ++-- .../elasticsearch/api/actions/security/get_api_key.rb | 4 ++-- .../api/actions/security/get_builtin_privileges.rb | 5 +++-- .../api/actions/security/get_privileges.rb | 5 +++-- .../lib/elasticsearch/api/actions/security/get_role.rb | 8 +++++--- .../api/actions/security/get_role_mapping.rb | 5 +++-- .../api/actions/security/get_service_accounts.rb | 5 +++-- .../api/actions/security/get_service_credentials.rb | 5 +++-- .../elasticsearch/api/actions/security/get_token.rb | 5 +++-- .../lib/elasticsearch/api/actions/security/get_user.rb | 8 +++++--- .../api/actions/security/get_user_privileges.rb | 5 +++-- .../api/actions/security/get_user_profile.rb | 5 +++-- .../api/actions/security/grant_api_key.rb | 5 +++-- .../api/actions/security/has_privileges.rb | 5 +++-- .../actions/security/has_privileges_user_profile.rb | 5 +++-- .../api/actions/security/invalidate_api_key.rb | 5 +++-- .../api/actions/security/invalidate_token.rb | 5 +++-- .../api/actions/security/oidc_authenticate.rb | 5 +++-- .../elasticsearch/api/actions/security/oidc_logout.rb | 5 +++-- .../actions/security/oidc_prepare_authentication.rb | 5 +++-- .../api/actions/security/put_privileges.rb | 5 +++-- .../lib/elasticsearch/api/actions/security/put_role.rb | 4 ++-- .../api/actions/security/put_role_mapping.rb | 5 +++-- .../lib/elasticsearch/api/actions/security/put_user.rb | 5 +++-- .../api/actions/security/query_api_keys.rb | 5 +++-- .../api/actions/security/saml_authenticate.rb | 5 +++-- .../api/actions/security/saml_complete_logout.rb | 5 +++-- .../api/actions/security/saml_invalidate.rb | 5 +++-- .../elasticsearch/api/actions/security/saml_logout.rb | 5 +++-- .../actions/security/saml_prepare_authentication.rb | 5 +++-- .../actions/security/saml_service_provider_metadata.rb | 5 +++-- .../api/actions/security/suggest_user_profiles.rb | 5 +++-- .../api/actions/security/update_api_key.rb | 5 +++-- .../actions/security/update_cross_cluster_api_key.rb | 5 +++-- .../api/actions/security/update_user_profile_data.rb | 5 +++-- .../elasticsearch/api/actions/shutdown/delete_node.rb | 3 ++- .../lib/elasticsearch/api/actions/shutdown/get_node.rb | 3 ++- .../lib/elasticsearch/api/actions/shutdown/put_node.rb | 3 ++- .../api/actions/snapshot/cleanup_repository.rb | 5 +++-- .../lib/elasticsearch/api/actions/snapshot/clone.rb | 5 +++-- .../lib/elasticsearch/api/actions/snapshot/create.rb | 5 +++-- .../api/actions/snapshot/create_repository.rb | 5 +++-- .../lib/elasticsearch/api/actions/snapshot/delete.rb | 8 +++++--- .../api/actions/snapshot/delete_repository.rb | 8 +++++--- .../lib/elasticsearch/api/actions/snapshot/get.rb | 8 +++++--- .../api/actions/snapshot/get_repository.rb | 8 +++++--- .../api/actions/snapshot/repository_analyze.rb | 5 +++-- .../lib/elasticsearch/api/actions/snapshot/restore.rb | 5 +++-- .../lib/elasticsearch/api/actions/snapshot/status.rb | 8 +++++--- .../api/actions/snapshot/verify_repository.rb | 5 +++-- .../snapshot_lifecycle_management/delete_lifecycle.rb | 5 +++-- .../snapshot_lifecycle_management/execute_lifecycle.rb | 5 +++-- .../snapshot_lifecycle_management/execute_retention.rb | 4 ++-- .../snapshot_lifecycle_management/get_lifecycle.rb | 5 +++-- .../actions/snapshot_lifecycle_management/get_stats.rb | 4 ++-- .../snapshot_lifecycle_management/get_status.rb | 4 ++-- .../snapshot_lifecycle_management/put_lifecycle.rb | 5 +++-- .../api/actions/snapshot_lifecycle_management/start.rb | 4 ++-- .../api/actions/snapshot_lifecycle_management/stop.rb | 4 ++-- .../lib/elasticsearch/api/actions/sql/clear_cursor.rb | 4 ++-- .../lib/elasticsearch/api/actions/sql/delete_async.rb | 4 ++-- .../lib/elasticsearch/api/actions/sql/get_async.rb | 4 ++-- .../elasticsearch/api/actions/sql/get_async_status.rb | 5 +++-- .../lib/elasticsearch/api/actions/sql/query.rb | 4 ++-- .../lib/elasticsearch/api/actions/sql/translate.rb | 4 ++-- .../lib/elasticsearch/api/actions/ssl/certificates.rb | 4 ++-- .../lib/elasticsearch/api/actions/synonym_rule/put.rb | 5 +++-- .../lib/elasticsearch/api/actions/synonyms/delete.rb | 4 ++-- .../lib/elasticsearch/api/actions/synonyms/get.rb | 4 ++-- .../lib/elasticsearch/api/actions/synonyms/put.rb | 4 ++-- .../lib/elasticsearch/api/actions/synonyms_sets/get.rb | 4 ++-- .../lib/elasticsearch/api/actions/tasks/cancel.rb | 5 +++-- .../lib/elasticsearch/api/actions/tasks/get.rb | 4 ++-- .../lib/elasticsearch/api/actions/tasks/list.rb | 4 ++-- .../lib/elasticsearch/api/actions/terms_enum.rb | 4 ++-- .../lib/elasticsearch/api/actions/termvectors.rb | 5 +++-- .../api/actions/text_structure/find_structure.rb | 5 +++-- .../api/actions/transform/delete_transform.rb | 5 +++-- .../api/actions/transform/get_transform.rb | 5 +++-- .../api/actions/transform/get_transform_stats.rb | 5 +++-- .../api/actions/transform/preview_transform.rb | 5 +++-- .../api/actions/transform/put_transform.rb | 5 +++-- .../api/actions/transform/reset_transform.rb | 5 +++-- .../api/actions/transform/schedule_now_transform.rb | 5 +++-- .../api/actions/transform/start_transform.rb | 5 +++-- .../api/actions/transform/stop_transform.rb | 5 +++-- .../api/actions/transform/update_transform.rb | 5 +++-- .../api/actions/transform/upgrade_transforms.rb | 5 +++-- .../lib/elasticsearch/api/actions/update.rb | 6 +++--- .../lib/elasticsearch/api/actions/update_by_query.rb | 4 ++-- .../api/actions/update_by_query_rethrottle.rb | 5 +++-- .../lib/elasticsearch/api/actions/watcher/ack_watch.rb | 5 +++-- .../api/actions/watcher/activate_watch.rb | 5 +++-- .../api/actions/watcher/deactivate_watch.rb | 5 +++-- .../elasticsearch/api/actions/watcher/delete_watch.rb | 7 ++++--- .../elasticsearch/api/actions/watcher/execute_watch.rb | 5 +++-- .../elasticsearch/api/actions/watcher/get_settings.rb | 4 ++-- .../lib/elasticsearch/api/actions/watcher/get_watch.rb | 4 ++-- .../lib/elasticsearch/api/actions/watcher/put_watch.rb | 4 ++-- .../elasticsearch/api/actions/watcher/query_watches.rb | 4 ++-- .../lib/elasticsearch/api/actions/watcher/start.rb | 4 ++-- .../lib/elasticsearch/api/actions/watcher/stats.rb | 5 +++-- .../lib/elasticsearch/api/actions/watcher/stop.rb | 4 ++-- .../api/actions/watcher/update_settings.rb | 5 +++-- .../lib/elasticsearch/api/actions/xpack/info.rb | 4 ++-- .../lib/elasticsearch/api/actions/xpack/usage.rb | 4 ++-- .../lib/elasticsearch/api/namespace/common.rb | 4 ++-- .../spec/elasticsearch/api/actions/cat/aliases_spec.rb | 4 +++- .../elasticsearch/api/actions/cat/allocation_spec.rb | 4 +++- .../api/actions/cat/component_templates_spec.rb | 4 +++- .../spec/elasticsearch/api/actions/cat/count_spec.rb | 4 +++- .../elasticsearch/api/actions/cat/fielddata_spec.rb | 8 ++++++-- .../spec/elasticsearch/api/actions/cat/health_spec.rb | 4 +++- .../spec/elasticsearch/api/actions/cat/help_spec.rb | 4 +++- .../spec/elasticsearch/api/actions/cat/indices_spec.rb | 4 +++- .../spec/elasticsearch/api/actions/cat/master_spec.rb | 4 +++- .../elasticsearch/api/actions/cat/nodeattrs_spec.rb | 4 +++- .../spec/elasticsearch/api/actions/cat/nodes_spec.rb | 4 +++- .../api/actions/cat/pending_tasks_spec.rb | 4 +++- .../spec/elasticsearch/api/actions/cat/plugins_spec.rb | 4 +++- .../elasticsearch/api/actions/cat/recovery_spec.rb | 4 +++- .../elasticsearch/api/actions/cat/repositories_spec.rb | 4 +++- .../elasticsearch/api/actions/cat/segments_spec.rb | 4 +++- .../spec/elasticsearch/api/actions/cat/shards_spec.rb | 4 +++- .../elasticsearch/api/actions/cat/snapshot_spec.rb | 4 +++- .../spec/elasticsearch/api/actions/cat/tasks_spec.rb | 4 +++- .../elasticsearch/api/actions/cat/templates_spec.rb | 4 +++- .../elasticsearch/api/actions/cat/thread_pool_spec.rb | 4 +++- .../utils/thor/generator/endpoint_specifics.rb | 2 +- .../utils/thor/templates/_perform_request.erb | 10 +++++----- 466 files changed, 1280 insertions(+), 917 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb index 2d48e84bcd..811ede77c4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The async search ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/async-search.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_async_search/{id}"], 'async_search.delete') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb index 98e0940929..bea8c303ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/async-search.html # def get(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -47,7 +47,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_async_search/{id}"], 'async_search.get') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb index 842771be0d..77d0bf9a7b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The async search ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/async-search.html # def status(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,8 @@ def status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_async_search/status/{id}"], + 'async_search.status') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb index 6ef7381cf4..9adbfed7b4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb @@ -69,7 +69,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition using the Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/async-search.html # def submit(arguments = {}) arguments = arguments.clone @@ -88,7 +88,8 @@ def submit(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_async_search", "/{index}/_async_search"], + 'async_search.submit') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb index 1f0960a0cf..d749e199e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name the name of the autoscaling policy # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/autoscaling-delete-autoscaling-policy.html # def delete_autoscaling_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,7 +44,8 @@ def delete_autoscaling_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_autoscaling/policy/{name}"], + 'autoscaling.delete_autoscaling_policy') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb index ed2d383bec..72528f22aa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/autoscaling-get-autoscaling-capacity.html # def get_autoscaling_capacity(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def get_autoscaling_capacity(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_autoscaling/capacity"], + 'autoscaling.get_autoscaling_capacity') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb index e4dfa1782d..9603f2d7ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name the name of the autoscaling policy # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/autoscaling-get-autoscaling-policy.html # def get_autoscaling_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,7 +44,8 @@ def get_autoscaling_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_autoscaling/policy/{name}"], + 'autoscaling.get_autoscaling_policy') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb index f13afffc89..04a6202e6e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body the specification of the autoscaling policy (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/autoscaling-put-autoscaling-policy.html # def put_autoscaling_policy(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def put_autoscaling_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_autoscaling/policy/{name}"], + 'autoscaling.put_autoscaling_policy') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index bd4b706ba2..9f64fa8914 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -38,7 +38,7 @@ module Actions # @option arguments [String|Array] :body The operation definition and data (action-data pairs), separated by newlines. Array of Strings, Header/Data pairs, # or the conveniency "combined" format can be passed, refer to Elasticsearch::API::Utils.__bulkify documentation. # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-bulk.html # def bulk(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -66,7 +66,7 @@ def bulk(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, ["/_bulk", "/{index}/_bulk"], 'bulk') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index 6aeba66637..33843c0eb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-alias.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-alias.html # def aliases(arguments = {}) arguments = arguments.clone @@ -54,7 +54,8 @@ def aliases(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/aliases", "/_cat/aliases/{name}"], + 'cat.aliases') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb index ff7aba8654..df82cf1f7c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-allocation.html # def allocation(arguments = {}) arguments = arguments.clone @@ -55,7 +55,8 @@ def allocation(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/allocation", "/_cat/allocation/{node_id}"], + 'cat.allocation') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb index 79c56e02d0..e5d1c2bd77 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-component-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-component-templates.html # def component_templates(arguments = {}) arguments = arguments.clone @@ -53,7 +53,8 @@ def component_templates(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_cat/component_templates", "/_cat/component_templates/{name}"], 'cat.component_templates') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb index da96e79935..5bf2364f5b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-count.html # def count(arguments = {}) arguments = arguments.clone @@ -52,7 +52,7 @@ def count(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/count", "/_cat/count/{index}"], 'cat.count') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb index cedc5d89a8..042409a204 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-fielddata.html # def fielddata(arguments = {}) arguments = arguments.clone @@ -52,7 +52,8 @@ def fielddata(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/fielddata", "/_cat/fielddata/{fields}"], + 'cat.fielddata') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb index b85a478441..b47902c141 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-health.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-health.html # def health(arguments = {}) arguments = arguments.clone @@ -47,7 +47,7 @@ def health(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/health"], 'cat.health') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb index e8690abbab..6b14a04e90 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat.html # def help(arguments = {}) arguments = arguments.clone @@ -41,7 +41,7 @@ def help(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat"], 'cat.help') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb index 026de0e783..52c29c6eab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb @@ -39,7 +39,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-indices.html # def indices(arguments = {}) arguments = arguments.clone @@ -59,7 +59,8 @@ def indices(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/indices", "/_cat/indices/{index}"], + 'cat.indices') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb index 92df41d96e..32b0b7c419 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-master.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-master.html # def master(arguments = {}) arguments = arguments.clone @@ -46,7 +46,7 @@ def master(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/master"], 'cat.master') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb index dfaa649b2d..c9265c0077 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html + # @see http://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-dfanalytics.html # def ml_data_frame_analytics(arguments = {}) arguments = arguments.clone @@ -54,7 +54,8 @@ def ml_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_cat/ml/data_frame/analytics", "/_cat/ml/data_frame/analytics/{id}"], 'cat.ml_data_frame_analytics') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb index c2170b7efd..350484c9ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html + # @see http://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-datafeeds.html # def ml_datafeeds(arguments = {}) arguments = arguments.clone @@ -53,7 +53,8 @@ def ml_datafeeds(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/ml/datafeeds", "/_cat/ml/datafeeds/{datafeed_id}"], + 'cat.ml_datafeeds') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb index ceb6771691..3d41d4cd5f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html + # @see http://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-anomaly-detectors.html # def ml_jobs(arguments = {}) arguments = arguments.clone @@ -54,7 +54,8 @@ def ml_jobs(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_cat/ml/anomaly_detectors", "/_cat/ml/anomaly_detectors/{job_id}"], 'cat.ml_jobs') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb index fc206369cc..723818a115 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb @@ -37,7 +37,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-trained-model.html # def ml_trained_models(arguments = {}) arguments = arguments.clone @@ -56,7 +56,8 @@ def ml_trained_models(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_cat/ml/trained_models", "/_cat/ml/trained_models/{model_id}"], 'cat.ml_trained_models') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb index dbf07acb05..4487191fe8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodeattrs.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-nodeattrs.html # def nodeattrs(arguments = {}) arguments = arguments.clone @@ -46,7 +46,7 @@ def nodeattrs(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/nodeattrs"], 'cat.nodeattrs') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb index 47356741e8..84b677cce6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-nodes.html # def nodes(arguments = {}) arguments = arguments.clone @@ -50,7 +50,7 @@ def nodes(arguments = {}) params[:h] = Utils.__listify(params[:h], escape: false) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/nodes"], 'cat.nodes') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb index 1d3dba91b7..dad0564fbf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-pending-tasks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-pending-tasks.html # def pending_tasks(arguments = {}) arguments = arguments.clone @@ -48,7 +48,7 @@ def pending_tasks(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/pending_tasks"], 'cat.pending_tasks') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb index 9dea6c0d31..ad60a29104 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-plugins.html # def plugins(arguments = {}) arguments = arguments.clone @@ -47,7 +47,7 @@ def plugins(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/plugins"], 'cat.plugins') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb index 445924eb78..dcc030649e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-recovery.html # def recovery(arguments = {}) arguments = arguments.clone @@ -56,7 +56,8 @@ def recovery(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/recovery", "/_cat/recovery/{index}"], + 'cat.recovery') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb index 1454d0b12c..09d5e6d2ba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-repositories.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-repositories.html # def repositories(arguments = {}) arguments = arguments.clone @@ -46,7 +46,7 @@ def repositories(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/repositories"], 'cat.repositories') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb index 3deb0db3f0..cb7193173c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-segments.html # def segments(arguments = {}) arguments = arguments.clone @@ -52,7 +52,8 @@ def segments(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/segments", "/_cat/segments/{index}"], + 'cat.segments') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb index ccedb98ea7..dcbf42ac07 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-shards.html # def shards(arguments = {}) arguments = arguments.clone @@ -55,7 +55,7 @@ def shards(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/shards", "/_cat/shards/{index}"], 'cat.shards') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb index 7f3e9f66d9..dbbc5312fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-snapshots.html # def snapshots(arguments = {}) arguments = arguments.clone @@ -54,7 +54,8 @@ def snapshots(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/snapshots", "/_cat/snapshots/{repository}"], + 'cat.snapshots') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb index a40f6429b6..e0ff8868a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb @@ -40,7 +40,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/tasks.html # def tasks(arguments = {}) arguments = arguments.clone @@ -53,7 +53,7 @@ def tasks(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/tasks"], 'cat.tasks') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb index afc0e72390..3155067ef2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-templates.html # def templates(arguments = {}) arguments = arguments.clone @@ -53,7 +53,8 @@ def templates(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/templates", "/_cat/templates/{name}"], + 'cat.templates') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb index 3407cc92c7..ded632fc2f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-thread-pool.html # def thread_pool(arguments = {}) arguments = arguments.clone @@ -56,7 +56,8 @@ def thread_pool(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_cat/thread_pool", "/_cat/thread_pool/{thread_pool_patterns}"], 'cat.thread_pool') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb index 7414201f94..f0ec74f6b2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-transforms.html # def transforms(arguments = {}) arguments = arguments.clone @@ -55,7 +55,8 @@ def transforms(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cat/transforms", "/_cat/transforms/{transform_id}"], + 'cat.transforms') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb index d3e918a518..e5773ddd04 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb @@ -32,7 +32,7 @@ module Actions # Deprecated since version 7.0.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/clear-scroll-api.html # def clear_scroll(arguments = {}) arguments = arguments.clone @@ -53,12 +53,14 @@ def clear_scroll(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_search/scroll", "/_search/scroll/{scroll_id}"], + 'clear_scroll') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_search/scroll", "/_search/scroll/{scroll_id}"], + 'clear_scroll') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb index b82d581896..38c403e10a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb @@ -26,7 +26,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body a point-in-time id to close # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/point-in-time-api.html # def close_point_in_time(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def close_point_in_time(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_pit"], 'close_point_in_time') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb index d554b92c91..de92dc0b96 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The index, shard, and primary flag to explain. Empty means 'explain a randomly-chosen unassigned shard' # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-allocation-explain.html # def allocation_explain(arguments = {}) arguments = arguments.clone @@ -47,7 +47,8 @@ def allocation_explain(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cluster/allocation/explain"], + 'cluster.allocation_explain') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb index caae9e6c07..5aa641373b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-component-template.html # def delete_component_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -46,7 +46,8 @@ def delete_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_component_template/{name}"], + 'cluster.delete_component_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb index 33b279e300..d6777d7477 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Time] :master_timeout Timeout for submitting request to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/voting-config-exclusions.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/voting-config-exclusions.html # def delete_voting_config_exclusions(arguments = {}) arguments = arguments.clone @@ -41,7 +41,8 @@ def delete_voting_config_exclusions(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cluster/voting_config_exclusions"], + 'cluster.delete_voting_config_exclusions') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb index 7e2289b508..028d0bd9bc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-component-template.html # def exists_component_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -46,7 +46,8 @@ def exists_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_component_template/{name}"], + 'cluster.exists_component_template') ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb index 11dab29e49..4bc4501102 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :include_defaults Return all default configurations for the component template (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-component-template.html # def get_component_template(arguments = {}) arguments = arguments.clone @@ -49,7 +49,8 @@ def get_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_component_template", "/_component_template/{name}"], + 'cluster.get_component_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb index 02e72b246a..c8932068dc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :include_defaults Whether to return all default clusters setting. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-get-settings.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-get-settings.html # def get_settings(arguments = {}) arguments = arguments.clone @@ -43,7 +43,7 @@ def get_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cluster/settings"], 'cluster.get_settings') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb index 01e659b1c9..f398a0d0f0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb @@ -38,7 +38,7 @@ module Actions # @option arguments [String] :wait_for_status Wait until cluster is in a specific state (options: green, yellow, red) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-health.html # def health(arguments = {}) arguments = arguments.clone @@ -57,7 +57,8 @@ def health(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cluster/health", "/_cluster/health/{index}"], + 'cluster.health') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb index a501535c15..e30c40d628 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :target Limit the information returned to the specified target. (options: _all, http, ingest, thread_pool, script) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-info.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-info.html # def info(arguments = {}) raise ArgumentError, "Required argument 'target' missing" unless arguments[:target] @@ -44,7 +44,7 @@ def info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_info/{target}"], 'cluster.info') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb index f8b556bc2b..42024b2442 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-pending.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-pending.html # def pending_tasks(arguments = {}) arguments = arguments.clone @@ -42,7 +42,7 @@ def pending_tasks(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cluster/pending_tasks"], 'cluster.pending_tasks') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb index 8901d8bc66..4da72153e2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Time] :master_timeout Timeout for submitting request to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/voting-config-exclusions.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/voting-config-exclusions.html # def post_voting_config_exclusions(arguments = {}) arguments = arguments.clone @@ -43,7 +43,8 @@ def post_voting_config_exclusions(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cluster/voting_config_exclusions"], + 'cluster.post_voting_config_exclusions') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb index 330de203fe..c158b9fce0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The template definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-component-template.html # def put_component_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,7 +49,8 @@ def put_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_component_template/{name}"], + 'cluster.put_component_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb index aaec93ee7c..ba1aee53c2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-update-settings.html # def put_settings(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -45,7 +45,7 @@ def put_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cluster/settings"], 'cluster.put_settings') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb index 1aadcdae48..a70c68569a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-remote-info.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-remote-info.html # def remote_info(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def remote_info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_remote/info"], 'cluster.remote_info') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb index 753ada1994..32ef92c7cf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The definition of `commands` to perform (`move`, `cancel`, `allocate`) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-reroute.html # def reroute(arguments = {}) arguments = arguments.clone @@ -46,7 +46,7 @@ def reroute(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cluster/reroute"], 'cluster.reroute') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb index 56b0f07647..2d56504dad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-state.html # def state(arguments = {}) arguments = arguments.clone @@ -59,7 +59,8 @@ def state(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_cluster/state", "/_cluster/state/{metric}", "/_cluster/state/{metric}/{index}"], 'cluster.state') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb index abb3424046..c177f34be0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-stats.html # def stats(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cluster/stats", "/_cluster/stats/nodes/{node_id}"], + 'cluster.stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb index 7c66173d03..883e9d4490 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb @@ -41,7 +41,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body A query to restrict the results specified with the Query DSL (optional) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-count.html # def count(arguments = {}) arguments = arguments.clone @@ -65,7 +65,7 @@ def count(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_count", "/{index}/_count"], 'count') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb index d4f3676fdb..084db15529 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb @@ -37,7 +37,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The document (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-index_.html # def create(arguments = {}) if arguments[:id] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb index 83fdb12e10..2af2c296f3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the auto follow pattern. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-delete-auto-follow-pattern.html # def delete_auto_follow_pattern(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,7 +44,8 @@ def delete_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ccr/auto_follow/{name}"], + 'ccr.delete_auto_follow_pattern') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb index 4f276f904d..d7edd87aa7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The name of the leader index and other optional ccr related parameters (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-put-follow.html # def follow(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -47,7 +47,7 @@ def follow(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_ccr/follow"], 'ccr.follow') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb index 8e79207d9e..9acf2c781a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :index A comma-separated list of index patterns; use `_all` to perform the operation on all indices # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-get-follow-info.html # def follow_info(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -44,7 +44,7 @@ def follow_info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_ccr/info"], 'ccr.follow_info') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb index 26fb2c8718..1e06c53799 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :index A comma-separated list of index patterns; use `_all` to perform the operation on all indices # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-get-follow-stats.html # def follow_stats(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -44,7 +44,7 @@ def follow_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_ccr/stats"], 'ccr.follow_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb index 89f2853ff7..8d7f6b7ee5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-post-forget-follower.html # def forget_follower(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def forget_follower(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_ccr/forget_follower"], + 'ccr.forget_follower') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb index d6d2fb8b42..3115d925c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the auto follow pattern. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-get-auto-follow-pattern.html # def get_auto_follow_pattern(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def get_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ccr/auto_follow", "/_ccr/auto_follow/{name}"], + 'ccr.get_auto_follow_pattern') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb index 894c598491..b09f12cc7a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the auto follow pattern that should pause discovering new indices to follow. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-pause-auto-follow-pattern.html # def pause_auto_follow_pattern(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,7 +44,8 @@ def pause_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ccr/auto_follow/{name}/pause"], + 'ccr.pause_auto_follow_pattern') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb index f4bbb1eb78..50c5535814 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :index The name of the follower index that should pause following its leader index. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-post-pause-follow.html # def pause_follow(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -44,7 +44,8 @@ def pause_follow(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_ccr/pause_follow"], + 'ccr.pause_follow') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb index dfa3b58798..862fb7d6f5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The specification of the auto follow pattern (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-put-auto-follow-pattern.html # def put_auto_follow_pattern(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def put_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ccr/auto_follow/{name}"], + 'ccr.put_auto_follow_pattern') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb index e6b32f55bc..5e37b5eb76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the auto follow pattern to resume discovering new indices to follow. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-resume-auto-follow-pattern.html # def resume_auto_follow_pattern(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,7 +44,8 @@ def resume_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ccr/auto_follow/{name}/resume"], + 'ccr.resume_auto_follow_pattern') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb index 82357e2a5d..9b5d41f078 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The name of the leader index and other optional ccr related parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-post-resume-follow.html # def resume_follow(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -45,7 +45,8 @@ def resume_follow(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_ccr/resume_follow"], + 'ccr.resume_follow') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb index 10ebac4884..dd05f84fcc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-get-stats.html # def stats(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ccr/stats"], 'ccr.stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb index 9c411d82bc..8e471aac47 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :index The name of the follower index that should be turned into a regular index. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-post-unfollow.html # def unfollow(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -44,7 +44,7 @@ def unfollow(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_ccr/unfollow"], 'ccr.unfollow') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb index 044a99de9f..885135fc62 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-gateway-dangling-indices.html # def delete_dangling_index(arguments = {}) raise ArgumentError, "Required argument 'index_uuid' missing" unless arguments[:index_uuid] @@ -47,7 +47,8 @@ def delete_dangling_index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_dangling/{index_uuid}"], + 'dangling_indices.delete_dangling_index') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb index fb1c45a360..4127f06250 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-gateway-dangling-indices.html # def import_dangling_index(arguments = {}) raise ArgumentError, "Required argument 'index_uuid' missing" unless arguments[:index_uuid] @@ -47,7 +47,8 @@ def import_dangling_index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_dangling/{index_uuid}"], + 'dangling_indices.import_dangling_index') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb index 57a11e424a..cb6acff990 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-gateway-dangling-indices.html # def list_dangling_indices(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def list_dangling_indices(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_dangling"], + 'dangling_indices.list_dangling_indices') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb index 692ff9438d..2be73e8968 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-delete.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -57,12 +57,12 @@ def delete(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_doc/{id}"], 'delete') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_doc/{id}"], 'delete') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb index 00ab16999e..f2622b30d6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb @@ -56,7 +56,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition using the Query DSL (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-delete-by-query.html # def delete_by_query(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -74,7 +74,7 @@ def delete_by_query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_delete_by_query"], 'delete_by_query') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb index e7a43cdd19..d84e843b36 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-delete-by-query.html # def delete_by_query_rethrottle(arguments = {}) raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] @@ -44,7 +44,8 @@ def delete_by_query_rethrottle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_delete_by_query/{task_id}/_rethrottle"], + 'delete_by_query_rethrottle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb index 0484619902..9b140c1cb2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-scripting.html # def delete_script(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -45,7 +45,7 @@ def delete_script(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_scripts/{id}"], 'delete_script') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb index 8d2ea05fb5..1da4a5ca8b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the enrich policy # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-enrich-policy-api.html # def delete_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,7 +44,8 @@ def delete_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_enrich/policy/{name}"], + 'enrich.delete_policy') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb index b90e1f98b7..e5e5c36e2e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :wait_for_completion Should the request should block until the execution is complete. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/execute-enrich-policy-api.html # def execute_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -45,7 +45,8 @@ def execute_policy(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_enrich/policy/{name}/_execute"], + 'enrich.execute_policy') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb index 273dda7de6..8ed5f85ac3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :name A comma-separated list of enrich policy names # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-enrich-policy-api.html # def get_policy(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def get_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_enrich/policy/{name}", "/_enrich/policy"], + 'enrich.get_policy') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb index 3ced98f637..13d7239fc3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The enrich policy to register (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-enrich-policy-api.html # def put_policy(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,7 @@ def put_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_enrich/policy/{name}"], 'enrich.put_policy') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb index 22828fa7b4..d0e22bfc8f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/enrich-stats-api.html # def stats(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_enrich/_stats"], 'enrich.stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb index f793fcc5e9..3ead66d716 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The async search ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/eql-search-api.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_eql/search/{id}"], 'eql.delete') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb index a13ff1ec19..2ddb54404c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :keep_alive Update the time interval in which the results (partial or final) for this search will be available # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/eql-search-api.html # def get(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,7 +46,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_eql/search/{id}"], 'eql.get') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb index 14eff8b8a6..6ac5891afa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The async search ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/eql-search-api.html # def get_status(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,7 @@ def get_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_eql/search/status/{id}"], 'eql.get_status') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb index c4c34384d8..e24e29b506 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Eql request body. Use the `query` to limit the query scope. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/eql-search-api.html # def search(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,7 +49,7 @@ def search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_eql/search"], 'eql.search') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb index 8978685183..171d425c7b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb @@ -37,7 +37,7 @@ module Actions # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-get.html # def exists(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -57,7 +57,8 @@ def exists(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, ["/{index}/_doc/{id}"], + 'exists').status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb index bfd168146b..a9b24852ce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-get.html # def exists_source(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -56,7 +56,7 @@ def exists_source(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_source/{id}"], 'exists_source') ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb index 6509cad3ce..4c4b1d0e4c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb @@ -40,7 +40,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The query definition using the Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-explain.html # def explain(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -65,7 +65,7 @@ def explain(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_explain/{id}"], 'explain') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb index 661c93ef45..1f2cfdfbe7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-features-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-features-api.html # def get_features(arguments = {}) arguments = arguments.clone @@ -40,7 +40,7 @@ def get_features(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_features"], 'features.get_features') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb index 922eb32bf2..bdfaaed467 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb @@ -30,7 +30,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html # def reset_features(arguments = {}) arguments = arguments.clone @@ -43,7 +43,7 @@ def reset_features(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_features/_reset"], 'features.reset_features') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb index 7ecb73e4bd..53a7280f7d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An index filter specified with the Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-field-caps.html # def field_caps(arguments = {}) arguments = arguments.clone @@ -58,7 +58,7 @@ def field_caps(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_field_caps", "/{index}/_field_caps"], 'field_caps') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb index 8130b9721c..a2a95d41e1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Time] :timeout Timeout to wait for global checkpoint to advance # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-global-checkpoints.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-global-checkpoints.html # def global_checkpoints(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -48,7 +48,8 @@ def global_checkpoints(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_fleet/global_checkpoints"], + 'fleet.global_checkpoints') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb index 86fd9ac0ca..c7f3e2d690 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb @@ -76,7 +76,8 @@ def msearch(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, + ["/_fleet/_fleet_msearch", "/{index}/_fleet/_fleet_msearch"], 'fleet.msearch') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb index 4f260bc66b..22b35df2ae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb @@ -57,7 +57,8 @@ def search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_fleet/_fleet_search"], + 'fleet.search') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb index fcf8c65e21..96497565c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb @@ -38,7 +38,7 @@ module Actions # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-get.html # def get(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -60,12 +60,12 @@ def get(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_doc/{id}"], 'get') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_doc/{id}"], 'get') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb index 871d9b0972..8b34167d41 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-scripting.html # def get_script(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,7 @@ def get_script(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_scripts/{id}"], 'get_script') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb index b76598d65e..5e480f2abd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb @@ -25,7 +25,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-contexts.html + # @see https://www.elastic.co/guide/en/elasticsearch/painless/8.10/painless-contexts.html # def get_script_context(arguments = {}) arguments = arguments.clone @@ -38,7 +38,7 @@ def get_script_context(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_script_context"], 'get_script_context') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb index 0a835aff70..67057128a5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb @@ -25,7 +25,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-scripting.html # def get_script_languages(arguments = {}) arguments = arguments.clone @@ -38,7 +38,7 @@ def get_script_languages(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_script_language"], 'get_script_languages') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb index c2f645ca3f..f7240693d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-get.html # def get_source(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -56,7 +56,7 @@ def get_source(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_source/{id}"], 'get_source') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb index f9c8187e39..0cb3cfc79b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Graph Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/graph-explore-api.html # def explore(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +52,7 @@ def explore(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_graph/explore"], 'graph.explore') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb index 48293f7b6d..1d520c7bfa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Integer] :size Limit the number of affected resources the health API returns # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/health-api.html # def health_report(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def health_report(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_health_report", "/_health_report/{feature}"], + 'health_report') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb index f4a90f1416..d10698f390 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb @@ -39,7 +39,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The document (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-index_.html # def index(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -63,7 +63,7 @@ def index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_doc/{id}", "/{index}/_doc"], 'index') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb index 2c2a8c89f3..ed3a5bc193 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :policy The name of the index lifecycle policy # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-delete-lifecycle.html # def delete_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy' missing" unless arguments[:policy] @@ -44,7 +44,8 @@ def delete_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ilm/policy/{policy}"], + 'ilm.delete_lifecycle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb index e789cd2447..799fd923cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :only_errors filters the indices included in the response to ones in an ILM error state, implies only_managed # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-explain-lifecycle.html # def explain_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -46,7 +46,8 @@ def explain_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_ilm/explain"], + 'ilm.explain_lifecycle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb index cf2ba111cf..eb359d68fd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :policy The name of the index lifecycle policy # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-get-lifecycle.html # def get_lifecycle(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def get_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ilm/policy/{policy}", "/_ilm/policy"], + 'ilm.get_lifecycle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb index 1d237cbde1..76818ad03d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-get-status.html # def get_status(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def get_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ilm/status"], 'ilm.get_status') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb index 29b806142d..abcdff4f97 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Optionally specify a legacy index template name to delete and optionally specify a node attribute name used for index shard routing (defaults to "data") # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-migrate-to-data-tiers.html # def migrate_to_data_tiers(arguments = {}) arguments = arguments.clone @@ -41,7 +41,8 @@ def migrate_to_data_tiers(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ilm/migrate_to_data_tiers"], + 'ilm.migrate_to_data_tiers') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb index 04e398b5d6..40587df14a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The new lifecycle step to move to # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-move-to-step.html # def move_to_step(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -45,7 +45,7 @@ def move_to_step(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ilm/move/{index}"], 'ilm.move_to_step') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb index 89c3fc8adc..f6e0d4b2a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The lifecycle policy definition to register # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-put-lifecycle.html # def put_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy' missing" unless arguments[:policy] @@ -45,7 +45,7 @@ def put_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ilm/policy/{policy}"], 'ilm.put_lifecycle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb index 3949503e61..f20e15b2d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :index The name of the index to remove policy on # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-remove-policy.html # def remove_policy(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -44,7 +44,7 @@ def remove_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_ilm/remove"], 'ilm.remove_policy') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb index 5f307f3687..a926a00637 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :index The name of the indices (comma-separated) whose failed lifecycle step is to be retry # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-retry-policy.html # def retry(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -44,7 +44,7 @@ def retry(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_ilm/retry"], 'ilm.retry') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb index 2db6b015b6..f26f774976 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-start.html # def start(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def start(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ilm/start"], 'ilm.start') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb index 994a8dea19..f509afdc98 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-stop.html # def stop(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def stop(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ilm/stop"], 'ilm.stop') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb index dbc424a3a4..11a0270e7f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-blocks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/index-modules-blocks.html # def add_block(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -53,7 +53,7 @@ def add_block(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_block/{block}"], 'indices.add_block') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb index d4a922ef32..05214702b5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Define analyzer/tokenizer parameters and the text on which the analysis should be performed # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-analyze.html # def analyze(arguments = {}) arguments = arguments.clone @@ -52,7 +52,7 @@ def analyze(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_analyze", "/{index}/_analyze"], 'indices.analyze') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb index 6d1e5d4431..63729abae3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :request Clear request cache # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-clearcache.html # def clear_cache(arguments = {}) arguments = arguments.clone @@ -53,7 +53,8 @@ def clear_cache(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_cache/clear", "/{index}/_cache/clear"], + 'indices.clear_cache') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb index d81382ac55..d153371e0d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clone-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-clone-index.html # def clone(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +52,7 @@ def clone(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_clone/{target}"], 'indices.clone') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb index 98f72f6c66..cbc50911ce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [String] :wait_for_active_shards Sets the number of active shards to wait for before the operation returns. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-open-close.html # def close(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -50,7 +50,7 @@ def close(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_close"], 'indices.close') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb index 82f098841a..5b35750b35 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The configuration for the index (`settings` and `mappings`) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-create-index.html # def create(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -48,7 +48,7 @@ def create(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}"], 'indices.create') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb index 8a297a522b..d6b572c5ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the data stream # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html # def create_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,7 +44,8 @@ def create_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_data_stream/{name}"], + 'indices.create_data_stream') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb index c5089eca6c..1c5d06b7fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :name A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html # def data_streams_stats(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def data_streams_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_data_stream/_stats", "/_data_stream/{name}/_stats"], + 'indices.data_streams_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb index cbfc13369e..4ddbd16a28 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open, closed, or hidden indices (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-delete-index.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -51,12 +51,12 @@ def delete(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}"], 'indices.delete') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}"], 'indices.delete') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb index 948c3512fd..dad65856c9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-aliases.html # def delete_alias(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +52,8 @@ def delete_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], + 'indices.delete_alias') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb index b3e879494f..b573a4242a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb @@ -51,7 +51,8 @@ def delete_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_data_stream/{name}/_lifecycle"], + 'indices.delete_data_lifecycle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb index c46183e3a9..9d2a5e63d2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html # def delete_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -45,7 +45,8 @@ def delete_data_stream(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_data_stream/{name}"], + 'indices.delete_data_stream') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb index 9f6072b96f..792240d9d3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html # def delete_index_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -46,7 +46,8 @@ def delete_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_index_template/{name}"], + 'indices.delete_index_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb index 608efd6d4f..f0e8ebcaa9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html # def delete_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -48,12 +48,13 @@ def delete_template(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_template/{name}"], + 'indices.delete_template') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_template/{name}"], 'indices.delete_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb index b93645a48c..76f26ebec0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-disk-usage.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-disk-usage.html # def disk_usage(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -53,7 +53,7 @@ def disk_usage(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_disk_usage"], 'indices.disk_usage') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb index 687b99fd07..0a15e12d98 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The downsampling configuration (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/xpack-rollup.html # def downsample(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -54,7 +54,8 @@ def downsample(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_downsample/{target_index}"], + 'indices.downsample') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb index b244d86513..d3069acab6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :include_defaults Whether to return all default setting for each of the indices. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-exists.html # def exists(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -50,7 +50,8 @@ def exists(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, ["/{index}"], + 'indices.exists').status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb index e52f4575e7..78324141e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-aliases.html # def exists_alias(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -55,7 +55,8 @@ def exists_alias(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, ["/_alias/{name}", "/{index}/_alias/{name}"], + 'indices.exists_alias').status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb index 9f87f17404..346d1d6254 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html # def exists_index_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -47,7 +47,8 @@ def exists_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_index_template/{name}"], + 'indices.exists_index_template') ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb index d9fbb5c235..e0c9a15a08 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html # def exists_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -47,7 +47,8 @@ def exists_template(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, ["/_template/{name}"], + 'indices.exists_template').status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb index b508521434..d5f86fffb9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb @@ -50,7 +50,8 @@ def explain_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_lifecycle/explain"], + 'indices.explain_data_lifecycle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb index 265b064caf..9f5191c72f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/field-usage-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/field-usage-stats.html # def field_usage_stats(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +52,8 @@ def field_usage_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_field_usage_stats"], + 'indices.field_usage_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb index 92c77705e0..593c4bcbf7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-flush.html # def flush(arguments = {}) arguments = arguments.clone @@ -51,7 +51,7 @@ def flush(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_flush", "/{index}/_flush"], 'indices.flush') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb index 674d155040..0d5e1eeaef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :wait_for_completion Should the request wait until the force merge is completed. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-forcemerge.html # def forcemerge(arguments = {}) arguments = arguments.clone @@ -53,7 +53,8 @@ def forcemerge(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_forcemerge", "/{index}/_forcemerge"], + 'indices.forcemerge') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb index b9abcde2d1..e58afdd88d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-get-index.html # def get(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +52,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}"], 'indices.get') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb index 90a6b25cfc..77277b08d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-aliases.html # def get_alias(arguments = {}) arguments = arguments.clone @@ -57,7 +57,8 @@ def get_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_alias", "/_alias/{name}", "/{index}/_alias/{name}", "/{index}/_alias"], 'indices.get_alias') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb index c4c947a735..c14b0c0b7c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb @@ -50,7 +50,8 @@ def get_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_data_stream/{name}/_lifecycle"], + 'indices.get_data_lifecycle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb index 6bf54b2e28..10f34b3a83 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :include_defaults Return all relevant default configurations for the data stream (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html # def get_data_stream(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def get_data_stream(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_data_stream", "/_data_stream/{name}"], + 'indices.get_data_stream') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb index 6f67efdc66..dafb78690f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-get-field-mapping.html # def get_field_mapping(arguments = {}) arguments = arguments.clone @@ -55,7 +55,8 @@ def get_field_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}"], 'indices.get_field_mapping') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb index b5541104af..692fdda1d1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Boolean] :include_defaults Return all relevant default configurations for the index template (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html # def get_index_template(arguments = {}) arguments = arguments.clone @@ -50,7 +50,8 @@ def get_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_index_template", "/_index_template/{name}"], + 'indices.get_index_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb index 9ebf4590d0..33bcff1651 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-get-mapping.html # def get_mapping(arguments = {}) arguments = arguments.clone @@ -51,7 +51,8 @@ def get_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_mapping", "/{index}/_mapping"], + 'indices.get_mapping') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb index 2c8a123d94..48039362a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :include_defaults Whether to return all default setting for each of the indices. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-get-settings.html # def get_settings(arguments = {}) arguments = arguments.clone @@ -60,7 +60,8 @@ def get_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_settings", "/{index}/_settings", "/{index}/_settings/{name}", "/_settings/{name}"], 'indices.get_settings') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb index 1e2c4a76ce..0014eebcae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html # def get_template(arguments = {}) arguments = arguments.clone @@ -49,7 +49,8 @@ def get_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_template", "/_template/{name}"], + 'indices.get_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb index c6a4a4ba95..8d0007301d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the alias to migrate # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html # def migrate_to_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,7 +44,8 @@ def migrate_to_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_data_stream/_migrate/{name}"], + 'indices.migrate_to_data_stream') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb index 709b7e98ef..139ebed01c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The data stream modifications (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html # def modify_data_stream(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def modify_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_data_stream/_modify"], + 'indices.modify_data_stream') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb index fe9619cbfc..15fc480960 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [String] :wait_for_active_shards Sets the number of active shards to wait for before the operation returns. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-open-close.html # def open(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -50,7 +50,7 @@ def open(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_open"], 'indices.open') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb index c93174a286..aa39358c0e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the data stream # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html # def promote_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,7 +44,8 @@ def promote_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_data_stream/_promote/{name}"], + 'indices.promote_data_stream') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb index 135b6b5513..e78b3eb01d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The settings for the alias, such as `routing` or `filter` # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-aliases.html # def put_alias(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -53,7 +53,8 @@ def put_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], + 'indices.put_alias') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb index d1cab851ec..89c026a38b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb @@ -52,7 +52,8 @@ def put_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_data_stream/{name}/_lifecycle"], + 'indices.put_data_lifecycle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb index da71539e38..3704bc5ab6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The template definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html # def put_index_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,7 +49,8 @@ def put_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_index_template/{name}"], + 'indices.put_index_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb index fdfb26aa63..793b3f3f31 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The mapping definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-put-mapping.html # def put_mapping(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -52,7 +52,7 @@ def put_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_mapping"], 'indices.put_mapping') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb index a5a48e4b21..5da218da81 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The index settings to be updated (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-update-settings.html # def put_settings(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -56,7 +56,8 @@ def put_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_settings", "/{index}/_settings"], + 'indices.put_settings') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb index cc08adb55f..b8b5c58079 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The template definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html # def put_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,7 +49,7 @@ def put_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_template/{name}"], 'indices.put_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb index 9076c02224..aa38cd3ac2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :active_only Display only those recoveries that are currently on-going # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-recovery.html # def recovery(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def recovery(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_recovery", "/{index}/_recovery"], + 'indices.recovery') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb index aeb521327f..96a495b963 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-refresh.html # def refresh(arguments = {}) arguments = arguments.clone @@ -49,7 +49,7 @@ def refresh(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_refresh", "/{index}/_refresh"], 'indices.refresh') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb index 25b6f49645..7d54940903 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :resource changed resource to reload analyzers from if applicable # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-reload-analyzers.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-reload-analyzers.html # def reload_search_analyzers(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -48,7 +48,8 @@ def reload_search_analyzers(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_reload_search_analyzers"], + 'indices.reload_search_analyzers') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb index 71a0f80cd1..2219d4dfd8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-index-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-resolve-index-api.html # def resolve_index(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -45,7 +45,8 @@ def resolve_index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_resolve/index/{name}"], + 'indices.resolve_index') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index aac93fbb27..d0b206f2c7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The conditions that needs to be met for executing rollover # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-rollover-index.html # def rollover(arguments = {}) raise ArgumentError, "Required argument 'alias' missing" unless arguments[:alias] @@ -57,7 +57,8 @@ def rollover(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{alias}/_rollover", "/{alias}/_rollover/{new_index}"], + 'indices.rollover') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb index 0f5505852c..15be627e5b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Boolean] :verbose Includes detailed memory usage by Lucene. *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-segments.html # def segments(arguments = {}) arguments = arguments.clone @@ -50,7 +50,8 @@ def segments(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_segments", "/{index}/_segments"], + 'indices.segments') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb index 62f4848579..358c018bbd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-shards-stores.html # def shard_stores(arguments = {}) arguments = arguments.clone @@ -50,7 +50,8 @@ def shard_stores(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_shard_stores", "/{index}/_shard_stores"], + 'indices.shard_stores') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb index 2fbb9c91a3..a2b1d7df21 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-shrink-index.html # def shrink(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +52,7 @@ def shrink(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_shrink/{target}"], 'indices.shrink') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb index 60b1ff6373..00f9c9585f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body New index template definition, which will be included in the simulation, as if it already exists in the system # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html # def simulate_index_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -49,7 +49,8 @@ def simulate_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_index_template/_simulate_index/{name}"], + 'indices.simulate_index_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb index c581f77ba0..ecf6490313 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body New index template definition to be simulated, if no index template name is specified # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html # def simulate_template(arguments = {}) arguments = arguments.clone @@ -51,7 +51,8 @@ def simulate_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_index_template/_simulate", "/_index_template/_simulate/{name}"], 'indices.simulate_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb index 1c6d3e3ff7..f229397e4a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-split-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-split-index.html # def split(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +52,7 @@ def split(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_split/{target}"], 'indices.split') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb index 1c8c3387c8..cc113aea1a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb @@ -37,7 +37,7 @@ module Actions # @option arguments [Boolean] :forbid_closed_indices If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-stats.html # def stats(arguments = {}) arguments = arguments.clone @@ -62,7 +62,8 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_stats", "/_stats/{metric}", "/{index}/_stats", "/{index}/_stats/{metric}"], 'indices.stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb index def6fb41f1..41c7a4ac08 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb @@ -38,7 +38,7 @@ module Actions # Deprecated since version 7.14.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/unfreeze-index-api.html # def unfreeze(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -55,7 +55,7 @@ def unfreeze(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_unfreeze"], 'indices.unfreeze') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb index 2b7dba3775..19d7a3944a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The definition of `actions` to perform (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-aliases.html # def update_aliases(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -44,7 +44,7 @@ def update_aliases(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_aliases"], 'indices.update_aliases') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb index ce7eed2869..f123d02b86 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb @@ -40,7 +40,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The query definition specified with the Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-validate.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-validate.html # def validate_query(arguments = {}) arguments = arguments.clone @@ -64,7 +64,8 @@ def validate_query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_validate/query", "/{index}/_validate/query"], + 'indices.validate_query') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb index d199a17277..56b10b80fe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb @@ -25,7 +25,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/index.html # def info(arguments = {}) arguments = arguments.clone @@ -38,7 +38,7 @@ def info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/"], 'info') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb index 4c653ec284..f65a3f7277 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-pipeline-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-pipeline-api.html # def delete_pipeline(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,7 +46,8 @@ def delete_pipeline(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ingest/pipeline/{id}"], + 'ingest.delete_pipeline') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb index 15ab98e64a..8121056adc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-stats-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/geoip-stats-api.html # def geo_ip_stats(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def geo_ip_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ingest/geoip/stats"], 'ingest.geo_ip_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb index 400c3ea593..9d2544a992 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-pipeline-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-pipeline-api.html # def get_pipeline(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def get_pipeline(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ingest/pipeline", "/_ingest/pipeline/{id}"], + 'ingest.get_pipeline') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb index 9f893c10a0..a68b9d3fb8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html#grok-processor-rest-get + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/grok-processor.html#grok-processor-rest-get # def processor_grok(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def processor_grok(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ingest/processor/grok"], 'ingest.processor_grok') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb index db4628544b..a529816d92 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The ingest definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-pipeline-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-pipeline-api.html # def put_pipeline(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,7 +49,8 @@ def put_pipeline(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ingest/pipeline/{id}"], + 'ingest.put_pipeline') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb index 21f26cc5d5..e25bd47999 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The simulate definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/simulate-pipeline-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/simulate-pipeline-api.html # def simulate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,8 @@ def simulate(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ingest/pipeline/_simulate", "/_ingest/pipeline/{id}/_simulate"], 'ingest.simulate') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb index 83bd8ac9d9..1e629e2af5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-search.html # def knn_search(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -54,7 +54,7 @@ def knn_search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_knn_search"], 'knn_search') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb index 47b5c5adae..cc051e9eb7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-license.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-license.html # def delete(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_license"], 'license.delete') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb index aaff59578f..bab6308483 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :accept_enterprise Supported for backwards compatibility with 7.x. If this param is used it must be set to true *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-license.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-license.html # def get(arguments = {}) arguments = arguments.clone @@ -41,7 +41,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_license"], 'license.get') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb index ae1ee87210..87887ea411 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-basic-status.html # def get_basic_status(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def get_basic_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_license/basic_status"], 'license.get_basic_status') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb index 454e77cce8..40719882ce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trial-status.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-trial-status.html # def get_trial_status(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def get_trial_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_license/trial_status"], 'license.get_trial_status') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb index 8c03da859f..b95394872d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body licenses to be installed # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-license.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/update-license.html # def post(arguments = {}) arguments = arguments.clone @@ -41,7 +41,7 @@ def post(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_license"], 'license.post') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb index b5b3ff59a5..23af7cfaf8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-basic.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/start-basic.html # def post_start_basic(arguments = {}) arguments = arguments.clone @@ -40,7 +40,7 @@ def post_start_basic(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_license/start_basic"], 'license.post_start_basic') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb index ae1713b178..1fcddd7241 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trial.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/start-trial.html # def post_start_trial(arguments = {}) arguments = arguments.clone @@ -41,7 +41,7 @@ def post_start_trial(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_license/start_trial"], 'license.post_start_trial') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb index 58ab034b24..e784b52cbb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The ID of the Pipeline # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/logstash-api-delete-pipeline.html # def delete_pipeline(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,8 @@ def delete_pipeline(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_logstash/pipeline/{id}"], + 'logstash.delete_pipeline') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb index 356a05261d..e2aac07b5c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id A comma-separated list of Pipeline IDs # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/logstash-api-get-pipeline.html # def get_pipeline(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def get_pipeline(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_logstash/pipeline", "/_logstash/pipeline/{id}"], + 'logstash.get_pipeline') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb index dd4d6d8b6b..8bebc4f994 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The Pipeline to add or update (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/logstash-api-put-pipeline.html # def put_pipeline(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def put_pipeline(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_logstash/pipeline/{id}"], + 'logstash.put_pipeline') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb index 05e471a91e..c03e83e35d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-trained-model-deployment-cache.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/clear-trained-model-deployment-cache.html # def clear_trained_model_deployment_cache(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -44,7 +44,8 @@ def clear_trained_model_deployment_cache(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}/deployment/cache/_clear"], + 'ml.clear_trained_model_deployment_cache') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb index 18a2d043db..b9b444ddad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The URL params optionally sent in the body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-close-job.html # def close_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -48,7 +48,8 @@ def close_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_close"], + 'ml.close_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb index 7af6b3b13d..5ee6793881 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :calendar_id The ID of the calendar to delete # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-calendar.html # def delete_calendar(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -44,7 +44,8 @@ def delete_calendar(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}"], + 'ml.delete_calendar') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb index 14b90a8406..916e7be7d7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :event_id The ID of the event to remove from the calendar # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-calendar-event.html # def delete_calendar_event(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -48,7 +48,8 @@ def delete_calendar_event(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}/events/{event_id}"], + 'ml.delete_calendar_event') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb index 2869b2bd88..7c7fac1d40 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :job_id The ID of the job to remove from the calendar # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-calendar-job.html # def delete_calendar_job(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -48,7 +48,8 @@ def delete_calendar_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}/jobs/{job_id}"], + 'ml.delete_calendar_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb index 1529f7ad1a..808fa9a2a5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb @@ -29,7 +29,7 @@ module Actions # @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 https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-dfanalytics.html # def delete_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,7 +46,8 @@ def delete_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/data_frame/analytics/{id}"], + 'ml.delete_data_frame_analytics') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb index d9b4a1e009..98f5a024b9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :force True if the datafeed should be forcefully deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-datafeed.html # def delete_datafeed(arguments = {}) raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] @@ -45,7 +45,8 @@ def delete_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/datafeeds/{datafeed_id}"], + 'ml.delete_datafeed') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb index 1dc2b2e0cd..140711875d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body deleting expired data parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-expired-data.html # def delete_expired_data(arguments = {}) arguments = arguments.clone @@ -49,7 +49,8 @@ def delete_expired_data(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/_delete_expired_data/{job_id}", "/_ml/_delete_expired_data"], 'ml.delete_expired_data') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb index f5751b33a9..0eff9a3dc4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :filter_id The ID of the filter to delete # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-filter.html # def delete_filter(arguments = {}) raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id] @@ -44,7 +44,7 @@ def delete_filter(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/filters/{filter_id}"], 'ml.delete_filter') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb index 0ace7f717c..2f9b59b472 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb @@ -30,7 +30,7 @@ module Actions # @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 https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-forecast.html # def delete_forecast(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -53,7 +53,8 @@ def delete_forecast(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/anomaly_detectors/{job_id}/_forecast", "/_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}"], 'ml.delete_forecast') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb index 118dfc35fa..3415a13f8b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :delete_user_annotations Should annotations added by the user be deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-job.html # def delete_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -47,7 +47,8 @@ def delete_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}"], + 'ml.delete_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb index 0596fd2728..55d9fe48ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :snapshot_id The ID of the snapshot to delete # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-snapshot.html # def delete_model_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -48,7 +48,8 @@ def delete_model_snapshot(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}"], 'ml.delete_model_snapshot') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb index 827a0e0a64..c7b4f33517 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :force True if the model should be forcefully deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-trained-models.html # def delete_trained_model(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -46,7 +46,8 @@ def delete_trained_model(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}"], + 'ml.delete_trained_model') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb index 491d168962..2e83bb339c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :model_id The trained model where the model alias is assigned # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-trained-models-aliases.html # def delete_trained_model_alias(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -48,7 +48,8 @@ def delete_trained_model_alias(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/trained_models/{model_id}/model_aliases/{model_alias}"], 'ml.delete_trained_model_alias') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb index 2c351d13be..5217e55dbe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The analysis config, plus cardinality estimates for fields it references (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-apis.html # def estimate_model_memory(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def estimate_model_memory(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/_estimate_model_memory"], + 'ml.estimate_model_memory') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb index 380a3c62de..9d7da9c117 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The evaluation definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/evaluate-dfanalytics.html # def evaluate_data_frame(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def evaluate_data_frame(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/data_frame/_evaluate"], + 'ml.evaluate_data_frame') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb index 1e49f96a08..75bc216a44 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The data frame analytics config to explain # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html + # @see http://www.elastic.co/guide/en/elasticsearch/reference/8.10/explain-dfanalytics.html # def explain_data_frame_analytics(arguments = {}) arguments = arguments.clone @@ -52,7 +52,8 @@ def explain_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/data_frame/analytics/_explain", "/_ml/data_frame/analytics/{id}/_explain"], 'ml.explain_data_frame_analytics') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb index 81f4889724..6a31bf4029 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Flush parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-flush-job.html # def flush_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -50,7 +50,8 @@ def flush_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_flush"], + 'ml.flush_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb index 7e91fd2b4a..f4d12b0d3a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Query parameters can be specified in the body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-forecast.html # def forecast(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -48,7 +48,8 @@ def forecast(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_forecast"], + 'ml.forecast') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb index e5b9098019..c950894bf1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb @@ -38,7 +38,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Bucket selection details if not provided in URI # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-bucket.html # def get_buckets(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -66,7 +66,8 @@ def get_buckets(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}", "/_ml/anomaly_detectors/{job_id}/results/buckets"], 'ml.get_buckets') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb index 56207de79d..0c3f2ae1fd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Integer] :size Specifies a max number of events to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-calendar-event.html # def get_calendar_events(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -49,7 +49,8 @@ def get_calendar_events(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}/events"], + 'ml.get_calendar_events') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb index 8fee8aa989..461f1d7412 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The from and size parameters optionally sent in the body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-calendar.html # def get_calendars(arguments = {}) arguments = arguments.clone @@ -54,7 +54,8 @@ def get_calendars(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/calendars", "/_ml/calendars/{calendar_id}"], + 'ml.get_calendars') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb index 03091a80a7..ed1a4d7b0f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Category selection details if not provided in URI # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-category.html # def get_categories(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -60,7 +60,8 @@ def get_categories(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/anomaly_detectors/{job_id}/results/categories/{category_id}", "/_ml/anomaly_detectors/{job_id}/results/categories/"], 'ml.get_categories') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb index ad2f81d8f1..86fc3e8bf5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb @@ -31,7 +31,7 @@ module Actions # @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 https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-dfanalytics.html # def get_data_frame_analytics(arguments = {}) arguments = arguments.clone @@ -50,7 +50,8 @@ def get_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/data_frame/analytics/{id}", "/_ml/data_frame/analytics"], 'ml.get_data_frame_analytics') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb index 8dc251dca6..736aa849a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Boolean] :verbose whether the stats response should be verbose # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-dfanalytics-stats.html # def get_data_frame_analytics_stats(arguments = {}) arguments = arguments.clone @@ -50,7 +50,8 @@ def get_data_frame_analytics_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/data_frame/analytics/_stats", "/_ml/data_frame/analytics/{id}/_stats"], 'ml.get_data_frame_analytics_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb index bd8bde1788..cdf34fecfb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb @@ -28,7 +28,7 @@ module Actions # @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 [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-datafeed-stats.html # def get_datafeed_stats(arguments = {}) arguments = arguments.clone @@ -47,7 +47,8 @@ def get_datafeed_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/datafeeds/{datafeed_id}/_stats", "/_ml/datafeeds/_stats"], 'ml.get_datafeed_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb index 76cca4e56b..810307655f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on datafeed PUT # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-datafeed.html # def get_datafeeds(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def get_datafeeds(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/datafeeds/{datafeed_id}", "/_ml/datafeeds"], + 'ml.get_datafeeds') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb index 81b6c1e7d1..9483b31940 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of filters to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-filter.html # def get_filters(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def get_filters(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/filters", "/_ml/filters/{filter_id}"], + 'ml.get_filters') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb index 4cbdd7adf8..4ae675c287 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Influencer selection criteria # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-influencer.html # def get_influencers(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -58,7 +58,8 @@ def get_influencers(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/results/influencers"], + 'ml.get_influencers') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb index b8e22d38bd..3b87a2135c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb @@ -28,7 +28,7 @@ module Actions # @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 [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-job-stats.html # def get_job_stats(arguments = {}) arguments = arguments.clone @@ -47,7 +47,8 @@ def get_job_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/anomaly_detectors/_stats", "/_ml/anomaly_detectors/{job_id}/_stats"], 'ml.get_job_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb index 0d2aebe1bb..5006f08dc0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on job PUT # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-job.html # def get_jobs(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def get_jobs(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/anomaly_detectors/{job_id}", "/_ml/anomaly_detectors"], 'ml.get_jobs') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb index 84881b8492..b6fcbb69c2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-ml-memory.html # def get_memory_stats(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def get_memory_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/memory/_stats", "/_ml/memory/{node_id}/_stats"], + 'ml.get_memory_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb index a1378d96e0..4763e87947 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs or no snapshots. (This includes the `_all` string.) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-job-model-snapshot-upgrade-stats.html # def get_model_snapshot_upgrade_stats(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -49,7 +49,8 @@ def get_model_snapshot_upgrade_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade/_stats"], 'ml.get_model_snapshot_upgrade_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb index 65371c057c..3f82c875cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Model snapshot selection criteria # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-snapshot.html # def get_model_snapshots(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -63,7 +63,8 @@ def get_model_snapshots(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}", "/_ml/anomaly_detectors/{job_id}/model_snapshots"], 'ml.get_model_snapshots') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb index 382a996d21..b2077fabd9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Overall bucket selection details if not provided in URI # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-overall-buckets.html # def get_overall_buckets(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -57,7 +57,8 @@ def get_overall_buckets(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/results/overall_buckets"], + 'ml.get_overall_buckets') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb index 524cb79457..e2839bd551 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Record selection criteria # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-record.html # def get_records(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -58,7 +58,8 @@ def get_records(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/results/records"], + 'ml.get_records') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb index 148ace8472..56552825d2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on model PUT # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-trained-models.html # def get_trained_models(arguments = {}) arguments = arguments.clone @@ -54,7 +54,8 @@ def get_trained_models(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}", "/_ml/trained_models"], + 'ml.get_trained_models') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb index a34eb6f0d9..10834fe770 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of trained models to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-trained-models-stats.html # def get_trained_models_stats(arguments = {}) arguments = arguments.clone @@ -49,7 +49,8 @@ def get_trained_models_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/trained_models/{model_id}/_stats", "/_ml/trained_models/_stats"], 'ml.get_trained_models_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb index dce043ef99..76f6a065fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb @@ -34,7 +34,7 @@ module Actions # Deprecated since version 8.3.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-trained-model.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/infer-trained-model.html # def infer_trained_model(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -54,7 +54,8 @@ def infer_trained_model(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/trained_models/{model_id}/_infer", "/_ml/trained_models/{model_id}/deployment/_infer"], 'ml.infer_trained_model') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb index 45944ab36d..8d2fde628e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-ml-info.html # def info(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/info"], 'ml.info') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb index 4d3de91959..6155d5d425 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Query parameters can be specified in the body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-open-job.html # def open_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -45,7 +45,8 @@ def open_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_open"], + 'ml.open_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb index f98a9274db..23efc21a08 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body A list of events (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-post-calendar-event.html # def post_calendar_events(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def post_calendar_events(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}/events"], + 'ml.post_calendar_events') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb index d860c6e6e1..1d1e474fc8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The data to process (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-post-data.html # def post_data(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -48,7 +48,8 @@ def post_data(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_data"], + 'ml.post_data') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb index 86fa509837..807b21ab97 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The data frame analytics config to preview # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html + # @see http://www.elastic.co/guide/en/elasticsearch/reference/8.10/preview-dfanalytics.html # def preview_data_frame_analytics(arguments = {}) arguments = arguments.clone @@ -52,7 +52,8 @@ def preview_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/data_frame/analytics/_preview", "/_ml/data_frame/analytics/{id}/_preview"], 'ml.preview_data_frame_analytics') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb index 6a373e8e75..5934513517 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The datafeed config and job config with which to execute the preview # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-preview-datafeed.html # def preview_datafeed(arguments = {}) arguments = arguments.clone @@ -54,7 +54,8 @@ def preview_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/datafeeds/{datafeed_id}/_preview", "/_ml/datafeeds/_preview"], 'ml.preview_datafeed') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb index 7459b0bd60..6275329588 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The calendar details # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-put-calendar.html # def put_calendar(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -45,7 +45,8 @@ def put_calendar(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}"], + 'ml.put_calendar') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb index beaf19c365..069b819f32 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :job_id The ID of the job to add to the calendar # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-put-calendar-job.html # def put_calendar_job(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -48,7 +48,8 @@ def put_calendar_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}/jobs/{job_id}"], + 'ml.put_calendar_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb index ba2b626c7c..0bbb504e17 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The data frame analytics configuration (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-dfanalytics.html # def put_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def put_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/data_frame/analytics/{id}"], + 'ml.put_data_frame_analytics') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb index e8dea26e38..abd21d44b8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The datafeed config (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-put-datafeed.html # def put_datafeed(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,8 @@ def put_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/datafeeds/{datafeed_id}"], + 'ml.put_datafeed') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb index 73cd594b0c..908c82d51d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The filter details (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-put-filter.html # def put_filter(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,7 @@ def put_filter(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/filters/{filter_id}"], 'ml.put_filter') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb index 6b4e85913a..f1bf3810ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The job (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-put-job.html # def put_job(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,8 @@ def put_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}"], + 'ml.put_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb index 61bd0d3eab..5acffb75c3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The trained model configuration (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-trained-models.html # def put_trained_model(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -48,7 +48,8 @@ def put_trained_model(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}"], + 'ml.put_trained_model') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb index 77503e79df..d99e74267e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb @@ -29,7 +29,7 @@ module Actions # @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 https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-trained-models-aliases.html # def put_trained_model_alias(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -49,7 +49,8 @@ def put_trained_model_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/trained_models/{model_id}/model_aliases/{model_alias}"], 'ml.put_trained_model_alias') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb index 0dfc798631..ed30a60666 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The trained model definition part (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-trained-model-definition-part.html # def put_trained_model_definition_part(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,8 @@ def put_trained_model_definition_part(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}/definition/{part}"], + 'ml.put_trained_model_definition_part') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb index f9d8566d3c..dfb4356cf4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The trained model vocabulary (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-trained-model-vocabulary.html # def put_trained_model_vocabulary(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def put_trained_model_vocabulary(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}/vocabulary"], + 'ml.put_trained_model_vocabulary') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb index 2155227ad9..106876c955 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :delete_user_annotations Should annotations added by the user be deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-reset-job.html # def reset_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -46,7 +46,8 @@ def reset_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_reset"], + 'ml.reset_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb index 9dea6125aa..2ed623eb6e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Reversion options # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-revert-snapshot.html # def revert_model_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -50,7 +50,8 @@ def revert_model_snapshot(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert"], 'ml.revert_model_snapshot') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb index 7e183cf4cb..aba8d9b5c6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb @@ -28,7 +28,7 @@ module Actions # @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 https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-set-upgrade-mode.html # def set_upgrade_mode(arguments = {}) arguments = arguments.clone @@ -41,7 +41,7 @@ def set_upgrade_mode(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/set_upgrade_mode"], 'ml.set_upgrade_mode') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb index ef225f1514..a2e44ca7e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The start data frame analytics parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/start-dfanalytics.html # def start_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,7 +46,8 @@ def start_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/data_frame/analytics/{id}/_start"], + 'ml.start_data_frame_analytics') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb index 625a297763..b5bebb5056 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The start datafeed parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-start-datafeed.html # def start_datafeed(arguments = {}) raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] @@ -48,7 +48,8 @@ def start_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/datafeeds/{datafeed_id}/_start"], + 'ml.start_datafeed') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb index 155e5e673b..965f26e7bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [String] :wait_for The allocation status for which to wait (options: starting, started, fully_allocated) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trained-model-deployment.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/start-trained-model-deployment.html # def start_trained_model_deployment(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -52,7 +52,8 @@ def start_trained_model_deployment(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}/deployment/_start"], + 'ml.start_trained_model_deployment') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb index 805fc84dbe..16102a6ecc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The stop data frame analytics parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/stop-dfanalytics.html # def stop_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -48,7 +48,8 @@ def stop_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/data_frame/analytics/{id}/_stop"], + 'ml.stop_data_frame_analytics') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb index 8d908a4aaf..38cb890d2c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The URL params optionally sent in the body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-stop-datafeed.html # def stop_datafeed(arguments = {}) raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] @@ -49,7 +49,8 @@ def stop_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/datafeeds/{datafeed_id}/_stop"], + 'ml.stop_datafeed') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb index 44c21207f7..ec9d28861c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The stop deployment parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-trained-model-deployment.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/stop-trained-model-deployment.html # def stop_trained_model_deployment(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -47,7 +47,8 @@ def stop_trained_model_deployment(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}/deployment/_stop"], + 'ml.stop_trained_model_deployment') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb index e938d30701..8e739e8ad0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The data frame analytics settings to update (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/update-dfanalytics.html # def update_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def update_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/data_frame/analytics/{id}/_update"], + 'ml.update_data_frame_analytics') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb index 1f1c1a8b30..36b2f702d3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The datafeed update settings (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-update-datafeed.html # def update_datafeed(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,8 @@ def update_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/datafeeds/{datafeed_id}/_update"], + 'ml.update_datafeed') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb index 00ebc41e81..f19af6b3d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The filter update (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-update-filter.html # def update_filter(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def update_filter(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/filters/{filter_id}/_update"], + 'ml.update_filter') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb index 0692dfd7eb..16a7c594b2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The job update settings (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-update-job.html # def update_job(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def update_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_update"], + 'ml.update_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb index 7cdf14a574..eb0740ccc9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The model snapshot properties to update (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-update-snapshot.html # def update_model_snapshot(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,8 @@ def update_model_snapshot(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update"], 'ml.update_model_snapshot') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb index 1b592c79f5..ac1e9b993d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The updated trained model deployment settings (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/update-trained-model-deployment.html # def update_trained_model_deployment(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,8 @@ def update_trained_model_deployment(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}/deployment/_update"], + 'ml.update_trained_model_deployment') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb index 9042b13be7..eefa430727 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb @@ -30,7 +30,7 @@ module Actions # @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 https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-upgrade-job-model-snapshot.html # def upgrade_job_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -50,7 +50,8 @@ def upgrade_job_snapshot(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade"], 'ml.upgrade_job_snapshot') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb index 7982cc8a9f..9b75376337 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The job config (*Required*) # - # @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html + # @see https://www.elastic.co/guide/en/machine-learning/8.10/ml-jobs.html # def validate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def validate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/_validate"], + 'ml.validate') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb index 8a577a7ae9..1cda144f33 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The detector (*Required*) # - # @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html + # @see https://www.elastic.co/guide/en/machine-learning/8.10/ml-jobs.html # def validate_detector(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def validate_detector(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/_validate/detector"], + 'ml.validate_detector') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb index 64611bbb83..aae04c0b89 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-multi-get.html # def mget(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -57,7 +57,7 @@ def mget(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_mget", "/{index}/_mget"], 'mget') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb index 7b29369a02..547f2462c7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :index Index pattern # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/migration-api-deprecation.html # def deprecations(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def deprecations(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_migration/deprecations", "/{index}/_migration/deprecations"], 'migration.deprecations') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb index 0b3bbfa799..6d1beb7ae7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/migration-api-feature-upgrade.html # def get_feature_upgrade_status(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def get_feature_upgrade_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_migration/system_features"], + 'migration.get_feature_upgrade_status') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb index 7e81fe6a48..d5b452cf38 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/migration-api-feature-upgrade.html # def post_feature_upgrade(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def post_feature_upgrade(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_migration/system_features"], + 'migration.post_feature_upgrade') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb index 5b3eab461c..cb790395ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb @@ -37,7 +37,7 @@ module Actions # Deprecated since version 7.0.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/monitor-elasticsearch-cluster.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/monitor-elasticsearch-cluster.html # def bulk(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -65,7 +65,8 @@ def bulk(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, ["/_monitoring/bulk", "/_monitoring/{type}/bulk"], + 'monitoring.bulk') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb index 7ee4ed4aa0..62cab04ac4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request definitions (metadata-search request definition pairs), separated by newlines (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-multi-search.html # def msearch(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -78,7 +78,7 @@ def msearch(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, ["/_msearch", "/{index}/_msearch"], 'msearch') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb index f4e4457771..3321500f23 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request definitions (metadata-search request definition pairs), separated by newlines (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-multi-search.html # def msearch_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -64,7 +64,8 @@ def msearch_template(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, ["/_msearch/template", "/{index}/_msearch/template"], + 'msearch_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb index 968cf42a93..6110f71022 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb @@ -39,7 +39,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-multi-termvectors.html # def mtermvectors(arguments = {}) arguments = arguments.clone @@ -67,7 +67,8 @@ def mtermvectors(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_mtermvectors", "/{index}/_mtermvectors"], + 'mtermvectors') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb index 6e2856820d..1025ed46e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Long] :max_archive_version Specifies the maximum archive_version to be cleared from the archive. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/clear-repositories-metering-archive-api.html # def clear_repositories_metering_archive(arguments = {}) raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] @@ -54,7 +54,8 @@ def clear_repositories_metering_archive(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_nodes/{node_id}/_repositories_metering/{max_archive_version}"], 'nodes.clear_repositories_metering_archive') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb index 9dfb0d96a1..07c7ff7377 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-repositories-metering-api.html # def get_repositories_metering_info(arguments = {}) raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] @@ -48,7 +48,8 @@ def get_repositories_metering_info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_nodes/{node_id}/_repositories_metering"], + 'nodes.get_repositories_metering_info') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb index a6a51ffde1..7992d87e97 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-nodes-hot-threads.html # def hot_threads(arguments = {}) arguments = arguments.clone @@ -53,7 +53,8 @@ def hot_threads(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_nodes/hot_threads", "/_nodes/{node_id}/hot_threads"], + 'nodes.hot_threads') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb index 63a10d6a99..bd6b5f3bfb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-nodes-info.html # def info(arguments = {}) arguments = arguments.clone @@ -55,7 +55,8 @@ def info(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_nodes", "/_nodes/{node_id}", "/_nodes/{metric}", "/_nodes/{node_id}/{metric}"], 'nodes.info') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb index 3370c927c9..c258c8872c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object containing the password for the elasticsearch keystore # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/secure-settings.html#reloadable-secure-settings + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/secure-settings.html#reloadable-secure-settings # def reload_secure_settings(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def reload_secure_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_nodes/reload_secure_settings", "/_nodes/{node_id}/reload_secure_settings"], 'nodes.reload_secure_settings') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb index 706b73eb2d..b753f991a2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb @@ -38,7 +38,7 @@ module Actions # @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-nodes-stats.html # def stats(arguments = {}) arguments = arguments.clone @@ -69,7 +69,8 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_nodes/stats", "/_nodes/{node_id}/stats", "/_nodes/stats/{metric}", "/_nodes/{node_id}/stats/{metric}", "/_nodes/stats/{metric}/{index_metric}", "/_nodes/{node_id}/stats/{metric}/{index_metric}"], 'nodes.stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb index 4b54a7fbe2..4627ad87e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-usage.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-nodes-usage.html # def usage(arguments = {}) arguments = arguments.clone @@ -54,7 +54,8 @@ def usage(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_nodes/usage", "/_nodes/{node_id}/usage", "/_nodes/usage/{metric}", "/_nodes/{node_id}/usage/{metric}"], 'nodes.usage') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index 82d6ecd10f..e66101fb93 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :keep_alive Specific the time to live for the point in time (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/point-in-time-api.html # def open_point_in_time(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -48,7 +48,7 @@ def open_point_in_time(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_pit"], 'open_point_in_time') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb index d8ed048ff1..4afe49a6e6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb @@ -25,7 +25,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/index.html # def ping(arguments = {}) arguments = arguments.clone @@ -38,7 +38,7 @@ def ping(arguments = {}) params = {} begin - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, ["/"], 'ping').status == 200 ? true : false rescue Exception => e if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not *Found|404|ConnectionFailed/i false diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb index d2d33c424a..7e56af8340 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The document (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-scripting.html # def put_script(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -54,7 +54,8 @@ def put_script(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_scripts/{id}", "/_scripts/{id}/{context}"], + 'put_script') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb index 0558c5fac5..9112edb7bf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :ruleset_id The unique identifier of the query ruleset to delete # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-ruleset.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-query-ruleset.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'ruleset_id' missing" unless arguments[:ruleset_id] @@ -48,7 +48,8 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_query_rules/{ruleset_id}"], + 'query_ruleset.delete') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb index c6d3fe2e72..1e7bced675 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :ruleset_id The unique identifier of the query ruleset # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-ruleset.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-query-ruleset.html # def get(arguments = {}) raise ArgumentError, "Required argument 'ruleset_id' missing" unless arguments[:ruleset_id] @@ -48,7 +48,8 @@ def get(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_query_rules/{ruleset_id}"], + 'query_ruleset.get') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb index ec6ef648d2..89d603bc80 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The query ruleset configuration, including `rules` (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-ruleset.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-query-ruleset.html # def put(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,8 @@ def put(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_query_rules/{ruleset_id}"], + 'query_ruleset.put') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb index bf4a92afdb..9299eeb26f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-rank-eval.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-rank-eval.html # def rank_eval(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -52,7 +52,8 @@ def rank_eval(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_rank_eval", "/{index}/_rank_eval"], + 'rank_eval') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb index 72d44efb4f..bca538d787 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition using the Query DSL and the prototype for the index request. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-reindex.html # def reindex(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -51,7 +51,7 @@ def reindex(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_reindex"], 'reindex') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb index aa6f493642..731a7199c3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-reindex.html # def reindex_rethrottle(arguments = {}) raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] @@ -44,7 +44,8 @@ def reindex_rethrottle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_reindex/{task_id}/_rethrottle"], + 'reindex_rethrottle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb index 7b7f3e2e30..9a05435bc3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition template and its params # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/render-search-template-api.html # def render_search_template(arguments = {}) arguments = arguments.clone @@ -51,7 +51,8 @@ def render_search_template(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_render/template", "/_render/template/{id}"], + 'render_search_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb index df5481d092..1bfc349099 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :id The ID of the job to delete # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-delete-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-delete-job.html # def delete_job(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -48,7 +48,7 @@ def delete_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_rollup/job/{id}"], 'rollup.delete_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb index f07d6bc358..2246fd7ba1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :id The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-get-job.html # def get_jobs(arguments = {}) arguments = arguments.clone @@ -50,7 +50,8 @@ def get_jobs(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_rollup/job/{id}", "/_rollup/job/"], + 'rollup.get_jobs') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb index 3047e45a2e..b8c1148b52 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :id The ID of the index to check rollup capabilities on, or left blank for all jobs # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-caps.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-get-rollup-caps.html # def get_rollup_caps(arguments = {}) arguments = arguments.clone @@ -50,7 +50,8 @@ def get_rollup_caps(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_rollup/data/{id}", "/_rollup/data/"], + 'rollup.get_rollup_caps') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb index c1e5264a7d..a518711b12 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :index The rollup index or index pattern to obtain rollup capabilities from. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-index-caps.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-get-rollup-index-caps.html # def get_rollup_index_caps(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -48,7 +48,8 @@ def get_rollup_index_caps(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_rollup/data"], + 'rollup.get_rollup_index_caps') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb index fdb9616f4b..64e2f6bcf0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The job configuration (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-put-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-put-job.html # def put_job(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,7 @@ def put_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_rollup/job/{id}"], 'rollup.put_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb index 832db0da11..e9f9a4508f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search request body (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-search.html # def rollup_search(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -52,7 +52,8 @@ def rollup_search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_rollup_search"], + 'rollup.rollup_search') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb index 768b461fb4..cf58435135 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :id The ID of the job to start # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-start-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-start-job.html # def start_job(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -48,7 +48,7 @@ def start_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_rollup/job/{id}/_start"], 'rollup.start_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb index bad3231161..49617a0d48 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Time] :timeout Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-stop-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-stop-job.html # def stop_job(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -50,7 +50,7 @@ def stop_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_rollup/job/{id}/_stop"], 'rollup.stop_job') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb index 07e39dcb8f..54c38b12a1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The script to execute # - # @see https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/painless/8.10/painless-execute-api.html # def scripts_painless_execute(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def scripts_painless_execute(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_scripts/painless/_execute"], + 'scripts_painless_execute') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb index c3b4bf52b4..fe578dc38c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb @@ -34,7 +34,7 @@ module Actions # Deprecated since version 7.0.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-scroll + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-request-body.html#request-body-search-scroll # def scroll(arguments = {}) arguments = arguments.clone @@ -58,7 +58,8 @@ def scroll(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_search/scroll", "/_search/scroll/{scroll_id}"], + 'scroll') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb index d278fcb4a4..b962b654e2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb @@ -72,7 +72,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition using the Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-search.html # def search(arguments = {}) arguments = arguments.clone @@ -96,7 +96,7 @@ def search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_search", "/{index}/_search"], 'search') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb index ac9ff6b3fa..44bba5ed1d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :name The name of the search application # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-search-application.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-search-application.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -48,7 +48,8 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_application/search_application/{name}"], + 'search_application.delete') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb index 5565e636ec..3d79be6568 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :name The name of the analytics collection to be deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-analytics-collection.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-analytics-collection.html # def delete_behavioral_analytics(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -48,7 +48,8 @@ def delete_behavioral_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_application/analytics/{name}"], + 'search_application.delete_behavioral_analytics') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb index 328f3f0dc4..38152a4565 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :name The name of the search application # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-search-application.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-search-application.html # def get(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -48,7 +48,8 @@ def get(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_application/search_application/{name}"], + 'search_application.get') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb index 3b916a6d87..63197bf753 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [List] :name A comma-separated list of analytics collections to limit the returned information # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-analytics-collection.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/list-analytics-collection.html # def get_behavioral_analytics(arguments = {}) arguments = arguments.clone @@ -50,7 +50,8 @@ def get_behavioral_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_application/analytics", "/_application/analytics/{name}"], 'search_application.get_behavioral_analytics') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb index 8f97e322f7..3d69a90cd1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of results to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-search-applications.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/list-search-applications.html # def list(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def list(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_application/search_application"], + 'search_application.list') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb index ee71ab3785..53284de57c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb @@ -55,7 +55,8 @@ def post_behavioral_analytics_event(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_application/analytics/{collection_name}/event/{event_type}"], 'search_application.post_behavioral_analytics_event') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb index 9a3f7e566e..f1ca8ca1a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search application configuration, including `indices` (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-search-application.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-search-application.html # def put(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -51,7 +51,8 @@ def put(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_application/search_application/{name}"], + 'search_application.put') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb index 5551f9b9ab..43db2ed252 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :name The name of the analytics collection to be created or updated # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-analytics-collection.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-analytics-collection.html # def put_behavioral_analytics(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -48,7 +48,8 @@ def put_behavioral_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_application/analytics/{name}"], + 'search_application.put_behavioral_analytics') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb index 91f27e67f8..3217c440fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Search parameters, which will override any default search parameters defined in the search application template # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-render-query.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-application-render-query.html # def render_query(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -49,7 +49,8 @@ def render_query(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_application/search_application/{name}/_render_query"], + 'search_application.render_query') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb index 0a9c36381f..e693fb3f18 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Search parameters, including template parameters that override defaults # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-application-search.html # def search(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -54,7 +54,8 @@ def search(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_application/search_application/{name}/_search"], + 'search_application.search') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb index a19695770b..b9c6fe885d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb @@ -42,7 +42,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Search request body. # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-vector-tile-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-vector-tile-api.html # def search_mvt(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -71,7 +71,8 @@ def search_mvt(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_mvt/{field}/{zoom}/{x}/{y}"], + 'search_mvt') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb index 8b03109690..b26c6ec6ca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-shards.html # def search_shards(arguments = {}) arguments = arguments.clone @@ -51,7 +51,8 @@ def search_shards(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_search_shards", "/{index}/_search_shards"], + 'search_shards') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb index c3a2dd7ece..a8c39b8fff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb @@ -40,7 +40,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition template and its params (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-template.html # def search_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -61,7 +61,8 @@ def search_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_search/template", "/{index}/_search/template"], + 'search_template') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb index 7c194bdc0a..a64037fcae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/searchable-snapshots-apis.html # def cache_stats(arguments = {}) arguments = arguments.clone @@ -50,7 +50,8 @@ def cache_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_searchable_snapshots/cache/stats", "/_searchable_snapshots/{node_id}/cache/stats"], 'searchable_snapshots.cache_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb index 63e42e7cbd..49a7c34ef5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/searchable-snapshots-apis.html # def clear_cache(arguments = {}) arguments = arguments.clone @@ -53,7 +53,8 @@ def clear_cache(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_searchable_snapshots/cache/clear", "/{index}/_searchable_snapshots/cache/clear"], 'searchable_snapshots.clear_cache') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb index 08f1b0e198..6247557734 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The restore configuration for mounting the snapshot as searchable (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-mount-snapshot.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/searchable-snapshots-api-mount-snapshot.html # def mount(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -53,7 +53,8 @@ def mount(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}/_mount"], + 'searchable_snapshots.mount') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb index 0a214885f4..61af57668c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :level Return stats aggregated at cluster, index or shard level (options: cluster, indices, shards) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/searchable-snapshots-apis.html # def stats(arguments = {}) arguments = arguments.clone @@ -47,7 +47,8 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_searchable_snapshots/stats", "/{index}/_searchable_snapshots/stats"], 'searchable_snapshots.stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb index de2b478aca..c819697eb2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The grant type and user's credential (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-activate-user-profile.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-activate-user-profile.html # def activate_user_profile(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def activate_user_profile(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/profile/_activate"], + 'security.activate_user_profile') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb index eed4a29a5e..8670c01477 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-authenticate.html # def authenticate(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def authenticate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/_authenticate"], 'security.authenticate') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb index 5b0f12419b..91319275af 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The API key request to update the attributes of multiple API keys. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-update-api-keys.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-bulk-update-api-keys.html # def bulk_update_api_keys(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def bulk_update_api_keys(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/api_key/_bulk_update"], + 'security.bulk_update_api_keys') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb index 239a8f38e6..0788930472 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body the new password for the user (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-change-password.html # def change_password(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,8 @@ def change_password(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_security/user/{username}/_password", "/_security/user/_password"], 'security.change_password') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb index aba6705fbf..f5a85fe569 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :ids A comma-separated list of IDs of API keys to clear from the cache # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-api-key-cache.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-clear-api-key-cache.html # def clear_api_key_cache(arguments = {}) raise ArgumentError, "Required argument 'ids' missing" unless arguments[:ids] @@ -44,7 +44,8 @@ def clear_api_key_cache(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/api_key/{ids}/_clear_cache"], + 'security.clear_api_key_cache') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb index abd6699fae..faa5ceb9af 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :application A comma-separated list of application names # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-clear-privilege-cache.html # def clear_cached_privileges(arguments = {}) raise ArgumentError, "Required argument 'application' missing" unless arguments[:application] @@ -44,7 +44,8 @@ def clear_cached_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/privilege/{application}/_clear_cache"], + 'security.clear_cached_privileges') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb index 4e039ebea5..6fc45288ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [List] :usernames Comma-separated list of usernames to clear from the cache # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-clear-cache.html # def clear_cached_realms(arguments = {}) raise ArgumentError, "Required argument 'realms' missing" unless arguments[:realms] @@ -45,7 +45,8 @@ def clear_cached_realms(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/realm/{realms}/_clear_cache"], + 'security.clear_cached_realms') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb index 5b8cf1b848..d9489293ad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :name Role name # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-clear-role-cache.html # def clear_cached_roles(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,7 +44,8 @@ def clear_cached_roles(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/role/{name}/_clear_cache"], + 'security.clear_cached_roles') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb index 6ca1f72b4a..fd6652998a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [List] :name A comma-separated list of service token names # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-clear-service-token-caches.html # def clear_cached_service_tokens(arguments = {}) raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] @@ -52,7 +52,8 @@ def clear_cached_service_tokens(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache"], 'security.clear_cached_service_tokens') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb index 5d0fc93ddb..7ce5309fb8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The api key request to create an API key (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-create-api-key.html # def create_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -43,7 +43,8 @@ def create_api_key(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/api_key"], + 'security.create_api_key') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb index ee3a6125b2..9db7852dc2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request to create a cross-cluster API key (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-create-cross-cluster-api-key.html # def create_cross_cluster_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def create_cross_cluster_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/cross_cluster/api_key"], + 'security.create_cross_cluster_api_key') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb index 42bc6d73fa..8820c1775f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-create-service-token.html # def create_service_token(arguments = {}) raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] @@ -56,7 +56,8 @@ def create_service_token(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_security/service/{namespace}/{service}/credential/token/{name}", "/_security/service/{namespace}/{service}/credential/token"], 'security.create_service_token') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb index d25c5b95e3..230ecee716 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-delete-privilege.html # def delete_privileges(arguments = {}) raise ArgumentError, "Required argument 'application' missing" unless arguments[:application] @@ -49,7 +49,8 @@ def delete_privileges(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/privilege/{application}/{name}"], + 'security.delete_privileges') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb index d4902cf9e9..1d13fa4024 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-delete-role.html # def delete_role(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -45,7 +45,8 @@ def delete_role(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/role/{name}"], + 'security.delete_role') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb index 2cc199f560..99701f1891 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-delete-role-mapping.html # def delete_role_mapping(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -45,7 +45,8 @@ def delete_role_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/role_mapping/{name}"], + 'security.delete_role_mapping') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb index eb89dfc7d9..cf138d4646 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-delete-service-token.html # def delete_service_token(arguments = {}) raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] @@ -53,7 +53,8 @@ def delete_service_token(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_security/service/{namespace}/{service}/credential/token/{name}"], 'security.delete_service_token') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb index 1729c6ffd1..b561d87d63 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-delete-user.html # def delete_user(arguments = {}) raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] @@ -45,7 +45,8 @@ def delete_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/user/{username}"], + 'security.delete_user') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb index 1d756e2048..b9551e68c8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-disable-user.html # def disable_user(arguments = {}) raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] @@ -45,7 +45,8 @@ def disable_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/user/{username}/_disable"], + 'security.disable_user') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb index b5228f47dc..4c2eccfa33 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user-profile.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-disable-user-profile.html # def disable_user_profile(arguments = {}) raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] @@ -45,7 +45,8 @@ def disable_user_profile(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/profile/{uid}/_disable"], + 'security.disable_user_profile') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb index 926b295fa0..9de2443419 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-enable-user.html # def enable_user(arguments = {}) raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] @@ -45,7 +45,8 @@ def enable_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/user/{username}/_enable"], + 'security.enable_user') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb index 42c61217d9..c5d9ce6b01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user-profile.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-enable-user-profile.html # def enable_user_profile(arguments = {}) raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] @@ -45,7 +45,8 @@ def enable_user_profile(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/profile/{uid}/_enable"], + 'security.enable_user_profile') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb index 1ac392de4e..efef7f685f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-kibana-enrollment.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-kibana-enrollment.html # def enroll_kibana(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def enroll_kibana(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/enroll/kibana"], 'security.enroll_kibana') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb index 9c33882787..c90a6fe5e9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-node-enrollment.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-node-enrollment.html # def enroll_node(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def enroll_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/enroll/node"], 'security.enroll_node') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb index 7ffb39ba07..4229d75968 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Boolean] :with_limited_by flag to show the limited-by role descriptors of API Keys # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-api-key.html # def get_api_key(arguments = {}) arguments = arguments.clone @@ -45,7 +45,7 @@ def get_api_key(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/api_key"], 'security.get_api_key') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb index b4983e21f5..fcf90d4990 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-builtin-privileges.html # def get_builtin_privileges(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def get_builtin_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/privilege/_builtin"], + 'security.get_builtin_privileges') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb index 9b09f3c75b..1f4fbea81c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :name Privilege name # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-privileges.html # def get_privileges(arguments = {}) arguments = arguments.clone @@ -51,7 +51,8 @@ def get_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_security/privilege", "/_security/privilege/{application}", "/_security/privilege/{application}/{name}"], 'security.get_privileges') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb index 2d4c5e4992..5a04b09154 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :name A comma-separated list of role names # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-role.html # def get_role(arguments = {}) arguments = arguments.clone @@ -48,12 +48,14 @@ def get_role(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/role/{name}", "/_security/role"], + 'security.get_role') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/role/{name}", "/_security/role"], + 'security.get_role') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb index 8c4571c8bd..c2cfee0665 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :name A comma-separated list of role-mapping names # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-role-mapping.html # def get_role_mapping(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def get_role_mapping(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_security/role_mapping/{name}", "/_security/role_mapping"], 'security.get_role_mapping') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb index d48a0b13e9..da6361be79 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :service An identifier for the service name # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-service-accounts.html # def get_service_accounts(arguments = {}) arguments = arguments.clone @@ -51,7 +51,8 @@ def get_service_accounts(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_security/service/{namespace}/{service}", "/_security/service/{namespace}", "/_security/service"], 'security.get_service_accounts') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb index 4b28035cb9..001211433a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :service An identifier for the service name # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-service-credentials.html # def get_service_credentials(arguments = {}) raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] @@ -48,7 +48,8 @@ def get_service_credentials(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/service/{namespace}/{service}/credential"], + 'security.get_service_credentials') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb index f96a03978a..1f5764cef5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The token request to get (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-token.html # def get_token(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def get_token(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/oauth2/token"], + 'security.get_token') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb index 68254b014c..2c2ba3afeb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :with_profile_uid flag to retrieve profile uid (if exists) associated to the user # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-user.html # def get_user(arguments = {}) arguments = arguments.clone @@ -49,12 +49,14 @@ def get_user(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/user/{username}", "/_security/user"], + 'security.get_user') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/user/{username}", "/_security/user"], + 'security.get_user') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb index 826e3cdf3a..bd357b9ab3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-user-privileges.html # def get_user_privileges(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def get_user_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/user/_privileges"], + 'security.get_user_privileges') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb index 836794286f..d932aec0f5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [List] :data A comma-separated list of keys for which the corresponding application data are retrieved. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-profile.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-user-profile.html # def get_user_profile(arguments = {}) raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] @@ -45,7 +45,8 @@ def get_user_profile(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/profile/{uid}"], + 'security.get_user_profile') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb index bf1803e561..f611e886b3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The api key request to create an API key (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-grant-api-key.html # def grant_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -43,7 +43,8 @@ def grant_api_key(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/api_key/grant"], + 'security.grant_api_key') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb index f607ce5d2a..5cbd13698f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The privileges to test (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-has-privileges.html # def has_privileges(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,7 +49,8 @@ def has_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_security/user/_has_privileges", "/_security/user/{user}/_has_privileges"], 'security.has_privileges') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb index e292fad425..d82b0c5afe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The privileges to check and the list of profile IDs (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges-user-profile.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-has-privileges-user-profile.html # def has_privileges_user_profile(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def has_privileges_user_profile(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/profile/_has_privileges"], + 'security.has_privileges_user_profile') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb index 4c6af6d104..11d3b2796a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The api key request to invalidate API key(s) (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-invalidate-api-key.html # def invalidate_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def invalidate_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/api_key"], + 'security.invalidate_api_key') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb index 00c7321015..6f2f82b28e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The token to invalidate (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-invalidate-token.html # def invalidate_token(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def invalidate_token(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/oauth2/token"], + 'security.invalidate_token') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb index e2e0d93456..7ca0805f96 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The OpenID Connect response to authenticate (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-authenticate.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-oidc-authenticate.html # def oidc_authenticate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def oidc_authenticate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/oidc/authenticate"], + 'security.oidc_authenticate') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb index 93985d9fde..5bc13ea5ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Access token and refresh token to invalidate (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-logout.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-oidc-logout.html # def oidc_logout(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def oidc_logout(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/oidc/logout"], + 'security.oidc_logout') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb index b79da8ad73..6f630730c1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The OpenID Connect authentication realm configuration (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-prepare-authentication.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-oidc-prepare-authentication.html # def oidc_prepare_authentication(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def oidc_prepare_authentication(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/oidc/prepare"], + 'security.oidc_prepare_authentication') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb index d2cfd8dd15..44fa2011ab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The privilege(s) to add (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-put-privileges.html # def put_privileges(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -43,7 +43,8 @@ def put_privileges(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/privilege/"], + 'security.put_privileges') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb index b8e7ca155c..68c1cd6d93 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The role to add (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-put-role.html # def put_role(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -47,7 +47,7 @@ def put_role(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/role/{name}"], 'security.put_role') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb index 7de6143ab4..5cb3aa72df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The role mapping to add (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-put-role-mapping.html # def put_role_mapping(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -47,7 +47,8 @@ def put_role_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/role_mapping/{name}"], + 'security.put_role_mapping') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb index 966d8131ef..3dce5ecbbe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The user to add (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-put-user.html # def put_user(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -47,7 +47,8 @@ def put_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/user/{username}"], + 'security.put_user') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb index d60d86253b..a88d022c14 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body From, size, query, sort and search_after # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-query-api-key.html # def query_api_keys(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def query_api_keys(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/_query/api_key"], + 'security.query_api_keys') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb index d743628c83..7dcbc29d8b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The SAML response to authenticate (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-saml-authenticate.html # def saml_authenticate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def saml_authenticate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/saml/authenticate"], + 'security.saml_authenticate') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb index f78b2278e7..049590c371 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The logout response to verify (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-saml-complete-logout.html # def saml_complete_logout(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def saml_complete_logout(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/saml/complete_logout"], + 'security.saml_complete_logout') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb index 264dfad171..449d82c55e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The LogoutRequest message (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-saml-invalidate.html # def saml_invalidate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def saml_invalidate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/saml/invalidate"], + 'security.saml_invalidate') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb index c3a9b3ed53..47430d5ef4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The tokens to invalidate (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-saml-logout.html # def saml_logout(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def saml_logout(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/saml/logout"], + 'security.saml_logout') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb index 38ada9f603..18467b691d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The realm for which to create the authentication request, identified by either its name or the ACS URL (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-saml-prepare-authentication.html # def saml_prepare_authentication(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def saml_prepare_authentication(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/saml/prepare"], + 'security.saml_prepare_authentication') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb index ef67353889..149bb42222 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :realm_name The name of the SAML realm to get the metadata for # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-saml-sp-metadata.html # def saml_service_provider_metadata(arguments = {}) raise ArgumentError, "Required argument 'realm_name' missing" unless arguments[:realm_name] @@ -44,7 +44,8 @@ def saml_service_provider_metadata(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/saml/metadata/{realm_name}"], + 'security.saml_service_provider_metadata') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb index 8f11761af6..2877f8bae3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The suggestion definition for user profiles # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-suggest-user-profile.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-suggest-user-profile.html # def suggest_user_profiles(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def suggest_user_profiles(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/profile/_suggest"], + 'security.suggest_user_profiles') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb index 2939d02627..7791874242 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The API key request to update attributes of an API key. # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-update-api-key.html # def update_api_key(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -45,7 +45,8 @@ def update_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/api_key/{id}"], + 'security.update_api_key') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb index 4d677d39c2..5e4dd2dee4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request to update attributes of a cross-cluster API key. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-update-cross-cluster-api-key.html # def update_cross_cluster_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,8 @@ def update_cross_cluster_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/cross_cluster/api_key/{id}"], + 'security.update_cross_cluster_api_key') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb index 41d7f5bf3d..83c882dd6e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The application data to update (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-user-profile-data.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-update-user-profile-data.html # def update_user_profile_data(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,7 +49,8 @@ def update_user_profile_data(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_security/profile/{uid}/_data"], + 'security.update_user_profile_data') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb index dcb95bab40..382f1abd52 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb @@ -44,7 +44,8 @@ def delete_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_nodes/{node_id}/shutdown"], + 'shutdown.delete_node') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb index 2ccfb56563..2cfb2d6104 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb @@ -46,7 +46,8 @@ def get_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_nodes/shutdown", "/_nodes/{node_id}/shutdown"], + 'shutdown.get_node') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb index 768b5cc0c9..44b8c85725 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb @@ -46,7 +46,8 @@ def put_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_nodes/{node_id}/shutdown"], + 'shutdown.put_node') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb index 43f94739af..be90360ab2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clean-up-snapshot-repo-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/clean-up-snapshot-repo-api.html # def cleanup_repository(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -46,7 +46,8 @@ def cleanup_repository(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/_cleanup"], + 'snapshot.cleanup_repository') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb index a4804c4d3c..e3b2d1b221 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The snapshot clone definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html # def clone(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -55,7 +55,8 @@ def clone(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}"], 'snapshot.clone') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb index 1adf0321e7..c8e3dba555 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The snapshot definition # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html # def create(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -51,7 +51,8 @@ def create(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}"], + 'snapshot.create') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb index 239b0e656f..48a92f6dde 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The repository definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html # def create_repository(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,7 +49,8 @@ def create_repository(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}"], + 'snapshot.create_repository') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb index ee154a709b..1e6d160ab1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -51,12 +51,14 @@ def delete(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}"], + 'snapshot.delete') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}"], + 'snapshot.delete') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb index 7570265903..b83bb19c58 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html # def delete_repository(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -48,12 +48,14 @@ def delete_repository(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}"], + 'snapshot.delete_repository') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}"], + 'snapshot.delete_repository') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb index 4d42438caf..26245c4a27 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb @@ -41,7 +41,7 @@ module Actions # @option arguments [Boolean] :verbose Whether to show verbose snapshot info or only show the basic info found in the repository index blob # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html # def get(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -63,12 +63,14 @@ def get(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}"], + 'snapshot.get') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}"], + 'snapshot.get') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb index a15f903d52..ab637dc3f7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html # def get_repository(arguments = {}) arguments = arguments.clone @@ -50,12 +50,14 @@ def get_repository(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot", "/_snapshot/{repository}"], + 'snapshot.get_repository') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot", "/_snapshot/{repository}"], + 'snapshot.get_repository') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb index cee6820ec2..d91ec952f9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb @@ -38,7 +38,7 @@ module Actions # @option arguments [Boolean] :rarely_abort_writes Whether to rarely abort writes before they complete. Defaults to 'true'. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html # def repository_analyze(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -55,7 +55,8 @@ def repository_analyze(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/_analyze"], + 'snapshot.repository_analyze') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb index b304cb43c7..83108627c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Details of what to restore # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html # def restore(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -51,7 +51,8 @@ def restore(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}/_restore"], + 'snapshot.restore') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb index c2a024cd9d..0159f32a32 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html # def status(arguments = {}) arguments = arguments.clone @@ -55,12 +55,14 @@ def status(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_snapshot/_status", "/_snapshot/{repository}/_status", "/_snapshot/{repository}/{snapshot}/_status"], 'snapshot.status') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_snapshot/_status", "/_snapshot/{repository}/_status", "/_snapshot/{repository}/{snapshot}/_status"], 'snapshot.status') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb index 35c02f62e1..31b8d2edb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html # def verify_repository(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -46,7 +46,8 @@ def verify_repository(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/_verify"], + 'snapshot.verify_repository') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb index 0781577c3b..3226c81312 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :policy_id The id of the snapshot lifecycle policy to remove # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-delete-policy.html # def delete_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id] @@ -44,7 +44,8 @@ def delete_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_slm/policy/{policy_id}"], + 'slm.delete_lifecycle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb index a4e11a1c67..5b9006d30d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :policy_id The id of the snapshot lifecycle policy to be executed # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-execute-lifecycle.html # def execute_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id] @@ -44,7 +44,8 @@ def execute_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_slm/policy/{policy_id}/_execute"], + 'slm.execute_lifecycle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb index 6f49f1bb91..8c4a1813e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-execute-retention.html # def execute_retention(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def execute_retention(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_slm/_execute_retention"], 'slm.execute_retention') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb index cbd8f3e3a7..94881c1a9a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :policy_id Comma-separated list of snapshot lifecycle policies to retrieve # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-get-policy.html # def get_lifecycle(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def get_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_slm/policy/{policy_id}", "/_slm/policy"], + 'slm.get_lifecycle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb index 3463f48a12..2769993cd6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-get-stats.html # def get_stats(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def get_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_slm/stats"], 'slm.get_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb index 1801e72b97..74f2edea66 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-get-status.html # def get_status(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def get_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_slm/status"], 'slm.get_status') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb index 86106c0d82..0e558e063f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The snapshot lifecycle policy definition to register # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-put-policy.html # def put_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id] @@ -45,7 +45,8 @@ def put_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_slm/policy/{policy_id}"], + 'slm.put_lifecycle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb index 92b091f26e..77340cc06e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-start.html # def start(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def start(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_slm/start"], 'slm.start') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb index 0fe259257e..1d50dcda04 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-stop.html # def stop(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def stop(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_slm/stop"], 'slm.stop') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb index aa97e9efca..5325ce3ece 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Specify the cursor value in the `cursor` element to clean the cursor. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/clear-sql-cursor-api.html # def clear_cursor(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,7 @@ def clear_cursor(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_sql/close"], 'sql.clear_cursor') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb index 5801dcc08d..adfc93bc2b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The async search ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-async-sql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-async-sql-search-api.html # def delete_async(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,7 @@ def delete_async(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_sql/async/delete/{id}"], 'sql.delete_async') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb index a2347e9717..6538fd21d3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Time] :wait_for_completion_timeout Duration to wait for complete results # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-async-sql-search-api.html # def get_async(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -48,7 +48,7 @@ def get_async(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_sql/async/{id}"], 'sql.get_async') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb index bc7a91522f..e43ed71f51 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The async search ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-status-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-async-sql-search-status-api.html # def get_async_status(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,8 @@ def get_async_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_sql/async/status/{id}"], + 'sql.get_async_status') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb index 90f4875669..091ee8c8bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Use the `query` element to start a query. Use the `cursor` element to continue a query. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/sql-search-api.html # def query(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -43,7 +43,7 @@ def query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_sql"], 'sql.query') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb index 3f9764e75f..d8fe8a25b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Specify the query in the `query` element. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/sql-translate-api.html # def translate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,7 @@ def translate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_sql/translate"], 'sql.translate') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb index 549c149c9a..7d4f9a559b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-ssl.html # def certificates(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def certificates(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_ssl/certificates"], 'ssl.certificates') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb index 15063d7f63..ddde4518a4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Synonym rule (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonym-rule.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-synonym-rule.html # def put(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -54,7 +54,8 @@ def put(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_synonyms/{synonyms_set}/{synonym_rule}"], + 'synonym_rule.put') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb index c7d64979c3..50b105f87c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :synonyms_set The name of the synonyms set to be deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonyms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-synonyms.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] @@ -48,7 +48,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_synonyms/{synonyms_set}"], 'synonyms.delete') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb index f20ae634da..97d8cd53aa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of results to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonyms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-synonyms.html # def get(arguments = {}) raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] @@ -50,7 +50,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_synonyms/{synonyms_set}"], 'synonyms.get') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb index 4b0cd02143..057fa8bbd0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Synonyms set rules (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonyms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-synonyms.html # def put(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,7 @@ def put(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_synonyms/{synonyms_set}"], 'synonyms.put') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb index 8a20c6b9da..bbaf66f79d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of results to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-synonyms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/list-synonyms.html # def get(arguments = {}) arguments = arguments.clone @@ -45,7 +45,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_synonyms"], 'synonyms_sets.get') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb index 076fb91d80..3e5e0c05fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :wait_for_completion Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/tasks.html # def cancel(arguments = {}) arguments = arguments.clone @@ -54,7 +54,8 @@ def cancel(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_tasks/_cancel", "/_tasks/{task_id}/_cancel"], + 'tasks.cancel') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb index b94d91bc6b..a2e4f4a0ad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/tasks.html # def get(arguments = {}) arguments = arguments.clone @@ -48,7 +48,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_tasks/{task_id}"], 'tasks.get') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb index a16ef69c36..5e8aef85b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb @@ -37,7 +37,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/tasks.html # def list(arguments = {}) arguments = arguments.clone @@ -50,7 +50,7 @@ def list(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_tasks"], 'tasks.list') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb index 9dbfd23551..c3859bb9be 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body field name, string which is the prefix expected in matching terms, timeout and size for max number of results # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-terms-enum.html # def terms_enum(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -49,7 +49,7 @@ def terms_enum(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_terms_enum"], 'terms_enum') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb index 1e6f2eea98..8e41ddc366 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb @@ -39,7 +39,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Define parameters and or supply a document to get termvectors for. See documentation. # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-termvectors.html # def termvectors(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -68,7 +68,8 @@ def termvectors(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_termvectors/{id}", "/{index}/_termvectors"], + 'termvectors') ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb index 56ea7efbfa..de35e312b8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb @@ -42,7 +42,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The contents of the file to be analyzed (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/find-structure.html # def find_structure(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -64,7 +64,8 @@ def find_structure(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, ["/_text_structure/find_structure"], + 'text_structure.find_structure') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb index 0be922e61b..92b87242e4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Time] :timeout Controls the time to wait for the transform deletion # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-transform.html # def delete_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -47,7 +47,8 @@ def delete_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_transform/{transform_id}"], + 'transform.delete_transform') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb index 957645fca5..ee17b25d8f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on transform PUT # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-transform.html # def get_transform(arguments = {}) arguments = arguments.clone @@ -50,7 +50,8 @@ def get_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_transform/{transform_id}", "/_transform"], + 'transform.get_transform') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb index 72c8b5f0d3..10b9318a8c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-transform-stats.html # def get_transform_stats(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -48,7 +48,8 @@ def get_transform_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_transform/{transform_id}/_stats"], + 'transform.get_transform_stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb index ec438cd5d6..134298a1e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The definition for the transform to preview # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/preview-transform.html # def preview_transform(arguments = {}) arguments = arguments.clone @@ -53,7 +53,8 @@ def preview_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_transform/{transform_id}/_preview", "/_transform/_preview"], 'transform.preview_transform') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb index ceab00abbc..4cf0771dd9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The transform definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-transform.html # def put_transform(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -48,7 +48,8 @@ def put_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_transform/{transform_id}"], + 'transform.put_transform') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb index b05517f375..97eb291323 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Controls the time to wait for the transform to reset # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/reset-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/reset-transform.html # def reset_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -46,7 +46,8 @@ def reset_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_transform/{transform_id}/_reset"], + 'transform.reset_transform') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb index c609724e69..9d3699fd9e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Time] :timeout Controls the time to wait for the scheduling to take place # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/schedule-now-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/schedule-now-transform.html # def schedule_now_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -45,7 +45,8 @@ def schedule_now_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_transform/{transform_id}/_schedule_now"], + 'transform.schedule_now_transform') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb index d41773766d..cbcbc04367 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Controls the time to wait for the transform to start # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/start-transform.html # def start_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -46,7 +46,8 @@ def start_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_transform/{transform_id}/_start"], + 'transform.start_transform') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb index 42743b657c..6ad4ca786a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Boolean] :wait_for_checkpoint Whether to wait for the transform to reach a checkpoint before stopping. Default to false # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/stop-transform.html # def stop_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -49,7 +49,8 @@ def stop_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_transform/{transform_id}/_stop"], + 'transform.stop_transform') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb index f5b8e245c7..69bf9f03ec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The update transform definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/update-transform.html # def update_transform(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -48,7 +48,8 @@ def update_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_transform/{transform_id}/_update"], + 'transform.update_transform') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb index 22bf4c0353..6cb34ec1cb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Time] :timeout Controls the time to wait for the upgrade # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/upgrade-transforms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/upgrade-transforms.html # def upgrade_transforms(arguments = {}) arguments = arguments.clone @@ -41,7 +41,8 @@ def upgrade_transforms(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_transform/_upgrade"], + 'transform.upgrade_transforms') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb index 93cdb4b992..acd516a15e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb @@ -40,7 +40,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request definition requires either `script` or partial `doc` (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-update.html # def update(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -63,12 +63,12 @@ def update(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_update/{id}"], 'update') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_update/{id}"], 'update') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb index 54d1d63102..d64a084deb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb @@ -59,7 +59,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition using the Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-update-by-query.html # def update_by_query(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -76,7 +76,7 @@ def update_by_query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/{index}/_update_by_query"], 'update_by_query') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb index b34ecd28b4..65b5e4cd4b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-update-by-query.html # def update_by_query_rethrottle(arguments = {}) raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] @@ -44,7 +44,8 @@ def update_by_query_rethrottle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_update_by_query/{task_id}/_rethrottle"], + 'update_by_query_rethrottle') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb index 985ca3db1d..2eebf39522 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [List] :action_id A comma-separated list of the action ids to be acked # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-ack-watch.html # def ack_watch(arguments = {}) raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id] @@ -51,7 +51,8 @@ def ack_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_watcher/watch/{watch_id}/_ack", "/_watcher/watch/{watch_id}/_ack/{action_id}"], 'watcher.ack_watch') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb index c973d60dac..2f9ca81459 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :watch_id Watch ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-activate-watch.html # def activate_watch(arguments = {}) raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id] @@ -44,7 +44,8 @@ def activate_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_watcher/watch/{watch_id}/_activate"], + 'watcher.activate_watch') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb index 25cbeabd9d..ed93ecb15e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :watch_id Watch ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-deactivate-watch.html # def deactivate_watch(arguments = {}) raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id] @@ -44,7 +44,8 @@ def deactivate_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_watcher/watch/{watch_id}/_deactivate"], + 'watcher.deactivate_watch') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb index 46a19f167b..d5bc8c7cf3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id Watch ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-delete-watch.html # def delete_watch(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,12 +46,13 @@ def delete_watch(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_watcher/watch/{id}"], + 'watcher.delete_watch') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_watcher/watch/{id}"], 'watcher.delete_watch') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb index d0bf8b1c26..7f83faace2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Execution control # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-execute-watch.html # def execute_watch(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def execute_watch(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, + ["/_watcher/watch/{id}/_execute", "/_watcher/watch/_execute"], 'watcher.execute_watch') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb index 565a6b8840..69dc9a7340 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-settings.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-get-settings.html # def get_settings(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def get_settings(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_watcher/settings"], 'watcher.get_settings') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb index f6d28bea93..a45e09c4fd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id Watch ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-get-watch.html # def get_watch(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,7 @@ def get_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_watcher/watch/{id}"], 'watcher.get_watch') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb index a582e0016e..12304bb354 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The watch # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-put-watch.html # def put_watch(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -49,7 +49,7 @@ def put_watch(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_watcher/watch/{id}"], 'watcher.put_watch') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb index 5a952ca40a..3186ba2e9a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body From, size, query, sort and search_after # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-query-watches.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-query-watches.html # def query_watches(arguments = {}) arguments = arguments.clone @@ -45,7 +45,7 @@ def query_watches(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_watcher/_query/watches"], 'watcher.query_watches') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb index fa71261a8a..9ebb681554 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-start.html # def start(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def start(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_watcher/_start"], 'watcher.start') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb index cea1d31c91..3eb5f17a9d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :emit_stacktraces Emits stack traces of currently running watches # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-stats.html # def stats(arguments = {}) arguments = arguments.clone @@ -47,7 +47,8 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_watcher/stats", "/_watcher/stats/{metric}"], + 'watcher.stats') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb index 5d2394caf4..25211eb04e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-stop.html # def stop(arguments = {}) arguments = arguments.clone @@ -39,7 +39,7 @@ def stop(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_watcher/_stop"], 'watcher.stop') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb index 6e4c27c223..2f34d6681b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object with the new index settings (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-update-settings.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-update-settings.html # def update_settings(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def update_settings(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_watcher/settings"], + 'watcher.update_settings') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb index 6dc2b6e496..11e6f4d109 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :accept_enterprise If this param is used it must be set to true *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/info-api.html # def info(arguments = {}) arguments = arguments.clone @@ -41,7 +41,7 @@ def info(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_xpack"], 'xpack.info') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb index b15346c02a..ce6e44aa7a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for watch write operation # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/usage-api.html # def usage(arguments = {}) arguments = arguments.clone @@ -40,7 +40,7 @@ def usage(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, ["/_xpack/usage"], 'xpack.usage') ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb index 06cac3f73a..12f675944a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb @@ -34,8 +34,8 @@ def initialize(client) # Delegates the `perform_request` method to the wrapped client # - def perform_request(method, path, params={}, body=nil, headers=nil) - client.perform_request method, path, params, body, headers + def perform_request(method, path, params={}, body=nil, headers=nil, paths=nil, endpoint=nil) + client.perform_request method, path, params, body, headers, paths, endpoint end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb index 934e4d3aa0..4f02f5728e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb @@ -25,7 +25,9 @@ '_cat/aliases', {}, nil, - {} + {}, + ["/_cat/aliases", "/_cat/aliases/{name}"], + "cat.aliases" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb index ee5db7275e..7253cc5506 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb @@ -25,7 +25,9 @@ '_cat/allocation', {}, nil, - {} + {}, + ["/_cat/allocation", "/_cat/allocation/{node_id}"], + "cat.allocation" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb index eb03af9102..97e4809ce0 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb @@ -24,7 +24,9 @@ url, {}, nil, - {} + {}, + ["/_cat/component_templates", "/_cat/component_templates/{name}"], + "cat.component_templates" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb index e1c335032a..5026bb0587 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb @@ -25,7 +25,9 @@ '_cat/count', {}, nil, - {} + {}, + ["/_cat/count", "/_cat/count/{index}"], + "cat.count" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb index 051622921d..6ecd4d6910 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb @@ -25,7 +25,9 @@ '_cat/fielddata', {}, nil, - {} + {}, + ["/_cat/fielddata", "/_cat/fielddata/{fields}"], + "cat.fielddata" ] end @@ -41,7 +43,9 @@ '_cat/fielddata/foo,bar', {}, nil, - {} + {}, + ["/_cat/fielddata", "/_cat/fielddata/{fields}"], + "cat.fielddata" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb index 32afd710f2..50e0070c20 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb @@ -25,7 +25,9 @@ '_cat/health', {}, nil, - {} + {}, + ["/_cat/health"], + "cat.health" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb index eccfa32c29..f6f06ef31b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb @@ -25,7 +25,9 @@ '_cat', {}, nil, - {} + {}, + ["/_cat"], + "cat.help" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb index 823ec1f8fa..20f9d5537d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb @@ -25,7 +25,9 @@ '_cat/indices', {}, nil, - {} + {}, + ["/_cat/indices", "/_cat/indices/{index}"], + "cat.indices" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb index 906c67fe05..145ce3a886 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb @@ -25,7 +25,9 @@ '_cat/master', {}, nil, - {} + {}, + ["/_cat/master"], + "cat.master" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb index b7caa40ea9..b5c3bad57c 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb @@ -25,7 +25,9 @@ '_cat/nodeattrs', {}, nil, - {} + {}, + ["/_cat/nodeattrs"], + "cat.nodeattrs" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb index 8c21eeb698..22cfc4813f 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb @@ -25,7 +25,9 @@ '_cat/nodes', {}, nil, - {} + {}, + ["/_cat/nodes"], + "cat.nodes" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb index f61e07ba34..63f387fbea 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb @@ -25,7 +25,9 @@ '_cat/pending_tasks', {}, nil, - {} + {}, + ["/_cat/pending_tasks"], + + "cat.pending_tasks" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb index 186b3a4903..d52ce1971d 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb @@ -25,7 +25,9 @@ '_cat/plugins', {}, nil, - {} + {}, + ["/_cat/plugins"], + "cat.plugins" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb index c2b08ba799..825240a431 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb @@ -25,7 +25,9 @@ '_cat/recovery', {}, nil, - {} + {}, + ["/_cat/recovery", "/_cat/recovery/{index}"], + "cat.recovery" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb index ac22e49eef..8daa365aed 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb @@ -25,7 +25,9 @@ '_cat/repositories', {}, nil, - {} + {}, + ["/_cat/repositories"], + "cat.repositories" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb index f85fd7e623..e5d8cb50dd 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb @@ -25,7 +25,9 @@ url, {}, nil, - {} + {}, + ["/_cat/segments", "/_cat/segments/{index}"], + "cat.segments" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb index acad84f522..1ba88bcb14 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb @@ -25,7 +25,9 @@ '_cat/shards', {}, nil, - {} + {}, + ["/_cat/shards", "/_cat/shards/{index}"], + "cat.shards" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb index 476fe1c3e3..1d308cad18 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb @@ -25,7 +25,9 @@ '_cat/snapshots/foo', {}, nil, - {} + {}, + ["/_cat/snapshots", "/_cat/snapshots/{repository}"], + "cat.snapshots" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb index 5d64e3747b..c0a3d1173b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb @@ -25,7 +25,9 @@ '_cat/tasks', {}, nil, - {} + {}, + ["/_cat/tasks"], + "cat.tasks" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb index 102031870a..866c55c439 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb @@ -25,7 +25,9 @@ '_cat/templates', {}, nil, - {} + {}, + ["/_cat/templates", "/_cat/templates/{name}"], + "cat.templates" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb index 7ff9f7c374..53d964522e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb @@ -25,7 +25,9 @@ '_cat/thread_pool', {}, nil, - {} + {}, + ["/_cat/thread_pool", "/_cat/thread_pool/{thread_pool_patterns}"], + "cat.thread_pool" ] end diff --git a/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb b/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb index 013358087e..f41862dbe3 100644 --- a/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb +++ b/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb @@ -84,7 +84,7 @@ def module_name_helper(name) def ping_perform_request <<~SRC begin - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, #{@paths}, '#{@endpoint_name}').status == 200 ? true : false rescue Exception => e if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not\s*Found|404|ConnectionFailed/i false diff --git a/elasticsearch-api/utils/thor/templates/_perform_request.erb b/elasticsearch-api/utils/thor/templates/_perform_request.erb index 0d874ce388..f77ac1dc11 100644 --- a/elasticsearch-api/utils/thor/templates/_perform_request.erb +++ b/elasticsearch-api/utils/thor/templates/_perform_request.erb @@ -20,30 +20,30 @@ <%= self.send("#{@method_name}_body_helper".to_s) %> headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers) + perform_request(method, path, params, payload, headers, <%= @paths %>, '<%= @endpoint_name %>') ) <%- elsif @method_name == 'ping' -%> <%= ping_perform_request %> <%- else -%> <%- if needs_ignore_404?(@endpoint_name) %> Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers).status == 200 ? true : false + perform_request(method, path, params, body, headers, <%= @paths %>, '<%= @endpoint_name %>').status == 200 ? true : false end <%- elsif needs_complex_ignore_404?(@endpoint_name) -%> if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, <%= @paths %>, '<%= @endpoint_name %>') ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, <%= @paths %>, '<%= @endpoint_name %>') ) end <%- else -%> Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, <%= @paths %>, '<%= @endpoint_name %>') ) <%- end -%> <%- end -%> From 65e080d9ddc85351d00b9d0923f4fc1ec0c6e11c Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Tue, 4 Jul 2023 12:59:57 +0200 Subject: [PATCH 2/5] Update perform_request method signature to use opts hash --- .../api/actions/async_search/delete.rb | 5 +- .../api/actions/async_search/get.rb | 5 +- .../api/actions/async_search/status.rb | 6 +- .../api/actions/async_search/submit.rb | 6 +- .../autoscaling/delete_autoscaling_policy.rb | 6 +- .../autoscaling/get_autoscaling_capacity.rb | 6 +- .../autoscaling/get_autoscaling_policy.rb | 6 +- .../autoscaling/put_autoscaling_policy.rb | 6 +- .../lib/elasticsearch/api/actions/bulk.rb | 5 +- .../elasticsearch/api/actions/cat/aliases.rb | 6 +- .../api/actions/cat/allocation.rb | 6 +- .../api/actions/cat/component_templates.rb | 4 +- .../elasticsearch/api/actions/cat/count.rb | 5 +- .../api/actions/cat/fielddata.rb | 6 +- .../elasticsearch/api/actions/cat/health.rb | 5 +- .../lib/elasticsearch/api/actions/cat/help.rb | 5 +- .../elasticsearch/api/actions/cat/indices.rb | 6 +- .../elasticsearch/api/actions/cat/master.rb | 5 +- .../actions/cat/ml_data_frame_analytics.rb | 4 +- .../api/actions/cat/ml_datafeeds.rb | 6 +- .../elasticsearch/api/actions/cat/ml_jobs.rb | 4 +- .../api/actions/cat/ml_trained_models.rb | 4 +- .../api/actions/cat/nodeattrs.rb | 5 +- .../elasticsearch/api/actions/cat/nodes.rb | 5 +- .../api/actions/cat/pending_tasks.rb | 5 +- .../elasticsearch/api/actions/cat/plugins.rb | 5 +- .../elasticsearch/api/actions/cat/recovery.rb | 6 +- .../api/actions/cat/repositories.rb | 5 +- .../elasticsearch/api/actions/cat/segments.rb | 6 +- .../elasticsearch/api/actions/cat/shards.rb | 5 +- .../api/actions/cat/snapshots.rb | 6 +- .../elasticsearch/api/actions/cat/tasks.rb | 5 +- .../api/actions/cat/templates.rb | 6 +- .../api/actions/cat/thread_pool.rb | 4 +- .../api/actions/cat/transforms.rb | 6 +- .../elasticsearch/api/actions/clear_scroll.rb | 10 +-- .../api/actions/close_point_in_time.rb | 5 +- .../api/actions/cluster/allocation_explain.rb | 6 +- .../cluster/delete_component_template.rb | 6 +- .../delete_voting_config_exclusions.rb | 6 +- .../cluster/exists_component_template.rb | 6 +- .../actions/cluster/get_component_template.rb | 6 +- .../api/actions/cluster/get_settings.rb | 5 +- .../api/actions/cluster/health.rb | 6 +- .../elasticsearch/api/actions/cluster/info.rb | 5 +- .../api/actions/cluster/pending_tasks.rb | 5 +- .../cluster/post_voting_config_exclusions.rb | 6 +- .../actions/cluster/put_component_template.rb | 6 +- .../api/actions/cluster/put_settings.rb | 5 +- .../api/actions/cluster/remote_info.rb | 5 +- .../api/actions/cluster/reroute.rb | 5 +- .../api/actions/cluster/state.rb | 4 +- .../api/actions/cluster/stats.rb | 6 +- .../lib/elasticsearch/api/actions/count.rb | 5 +- .../lib/elasticsearch/api/actions/create.rb | 2 +- .../delete_auto_follow_pattern.rb | 6 +- .../cross_cluster_replication/follow.rb | 5 +- .../cross_cluster_replication/follow_info.rb | 5 +- .../cross_cluster_replication/follow_stats.rb | 5 +- .../forget_follower.rb | 6 +- .../get_auto_follow_pattern.rb | 6 +- .../pause_auto_follow_pattern.rb | 6 +- .../cross_cluster_replication/pause_follow.rb | 6 +- .../put_auto_follow_pattern.rb | 6 +- .../resume_auto_follow_pattern.rb | 6 +- .../resume_follow.rb | 6 +- .../cross_cluster_replication/stats.rb | 5 +- .../cross_cluster_replication/unfollow.rb | 5 +- .../dangling_indices/delete_dangling_index.rb | 6 +- .../dangling_indices/import_dangling_index.rb | 6 +- .../dangling_indices/list_dangling_indices.rb | 6 +- .../lib/elasticsearch/api/actions/delete.rb | 8 ++- .../api/actions/delete_by_query.rb | 5 +- .../api/actions/delete_by_query_rethrottle.rb | 6 +- .../api/actions/delete_script.rb | 5 +- .../api/actions/enrich/delete_policy.rb | 6 +- .../api/actions/enrich/execute_policy.rb | 6 +- .../api/actions/enrich/get_policy.rb | 6 +- .../api/actions/enrich/put_policy.rb | 5 +- .../elasticsearch/api/actions/enrich/stats.rb | 5 +- .../elasticsearch/api/actions/eql/delete.rb | 5 +- .../lib/elasticsearch/api/actions/eql/get.rb | 5 +- .../api/actions/eql/get_status.rb | 5 +- .../elasticsearch/api/actions/eql/search.rb | 5 +- .../lib/elasticsearch/api/actions/exists.rb | 6 +- .../api/actions/exists_source.rb | 5 +- .../lib/elasticsearch/api/actions/explain.rb | 5 +- .../api/actions/features/get_features.rb | 5 +- .../api/actions/features/reset_features.rb | 5 +- .../elasticsearch/api/actions/field_caps.rb | 5 +- .../api/actions/fleet/global_checkpoints.rb | 6 +- .../api/actions/fleet/msearch.rb | 2 +- .../elasticsearch/api/actions/fleet/search.rb | 4 +- .../lib/elasticsearch/api/actions/get.rb | 8 ++- .../elasticsearch/api/actions/get_script.rb | 5 +- .../api/actions/get_script_context.rb | 5 +- .../api/actions/get_script_languages.rb | 5 +- .../elasticsearch/api/actions/get_source.rb | 5 +- .../api/actions/graph/explore.rb | 5 +- .../api/actions/health_report.rb | 6 +- .../lib/elasticsearch/api/actions/index.rb | 5 +- .../delete_lifecycle.rb | 6 +- .../explain_lifecycle.rb | 6 +- .../get_lifecycle.rb | 6 +- .../index_lifecycle_management/get_status.rb | 5 +- .../migrate_to_data_tiers.rb | 6 +- .../move_to_step.rb | 5 +- .../put_lifecycle.rb | 5 +- .../remove_policy.rb | 5 +- .../index_lifecycle_management/retry.rb | 5 +- .../index_lifecycle_management/start.rb | 5 +- .../index_lifecycle_management/stop.rb | 5 +- .../api/actions/indices/add_block.rb | 5 +- .../api/actions/indices/analyze.rb | 5 +- .../api/actions/indices/clear_cache.rb | 6 +- .../api/actions/indices/clone.rb | 5 +- .../api/actions/indices/close.rb | 5 +- .../api/actions/indices/create.rb | 5 +- .../api/actions/indices/create_data_stream.rb | 6 +- .../api/actions/indices/data_streams_stats.rb | 6 +- .../api/actions/indices/delete.rb | 8 ++- .../api/actions/indices/delete_alias.rb | 6 +- .../actions/indices/delete_data_lifecycle.rb | 4 +- .../api/actions/indices/delete_data_stream.rb | 6 +- .../actions/indices/delete_index_template.rb | 6 +- .../api/actions/indices/delete_template.rb | 9 +-- .../api/actions/indices/disk_usage.rb | 5 +- .../api/actions/indices/downsample.rb | 6 +- .../api/actions/indices/exists.rb | 6 +- .../api/actions/indices/exists_alias.rb | 6 +- .../actions/indices/exists_index_template.rb | 6 +- .../api/actions/indices/exists_template.rb | 6 +- .../actions/indices/explain_data_lifecycle.rb | 4 +- .../api/actions/indices/field_usage_stats.rb | 6 +- .../api/actions/indices/flush.rb | 5 +- .../api/actions/indices/forcemerge.rb | 6 +- .../elasticsearch/api/actions/indices/get.rb | 5 +- .../api/actions/indices/get_alias.rb | 4 +- .../api/actions/indices/get_data_lifecycle.rb | 4 +- .../api/actions/indices/get_data_stream.rb | 6 +- .../api/actions/indices/get_field_mapping.rb | 4 +- .../api/actions/indices/get_index_template.rb | 6 +- .../api/actions/indices/get_mapping.rb | 6 +- .../api/actions/indices/get_settings.rb | 4 +- .../api/actions/indices/get_template.rb | 6 +- .../actions/indices/migrate_to_data_stream.rb | 6 +- .../api/actions/indices/modify_data_stream.rb | 6 +- .../elasticsearch/api/actions/indices/open.rb | 5 +- .../actions/indices/promote_data_stream.rb | 6 +- .../api/actions/indices/put_alias.rb | 6 +- .../api/actions/indices/put_data_lifecycle.rb | 4 +- .../api/actions/indices/put_index_template.rb | 6 +- .../api/actions/indices/put_mapping.rb | 5 +- .../api/actions/indices/put_settings.rb | 6 +- .../api/actions/indices/put_template.rb | 5 +- .../api/actions/indices/recovery.rb | 6 +- .../api/actions/indices/refresh.rb | 5 +- .../indices/reload_search_analyzers.rb | 7 +-- .../api/actions/indices/resolve_index.rb | 6 +- .../api/actions/indices/rollover.rb | 6 +- .../api/actions/indices/segments.rb | 6 +- .../api/actions/indices/shard_stores.rb | 6 +- .../api/actions/indices/shrink.rb | 5 +- .../indices/simulate_index_template.rb | 6 +- .../api/actions/indices/simulate_template.rb | 4 +- .../api/actions/indices/split.rb | 5 +- .../api/actions/indices/stats.rb | 4 +- .../api/actions/indices/unfreeze.rb | 5 +- .../api/actions/indices/update_aliases.rb | 5 +- .../api/actions/indices/validate_query.rb | 6 +- .../lib/elasticsearch/api/actions/info.rb | 4 +- .../api/actions/ingest/delete_pipeline.rb | 6 +- .../api/actions/ingest/geo_ip_stats.rb | 5 +- .../api/actions/ingest/get_pipeline.rb | 6 +- .../api/actions/ingest/processor_grok.rb | 5 +- .../api/actions/ingest/put_pipeline.rb | 6 +- .../api/actions/ingest/simulate.rb | 4 +- .../elasticsearch/api/actions/knn_search.rb | 5 +- .../api/actions/license/delete.rb | 5 +- .../elasticsearch/api/actions/license/get.rb | 5 +- .../api/actions/license/get_basic_status.rb | 5 +- .../api/actions/license/get_trial_status.rb | 5 +- .../elasticsearch/api/actions/license/post.rb | 5 +- .../api/actions/license/post_start_basic.rb | 5 +- .../api/actions/license/post_start_trial.rb | 5 +- .../api/actions/logstash/delete_pipeline.rb | 6 +- .../api/actions/logstash/get_pipeline.rb | 6 +- .../api/actions/logstash/put_pipeline.rb | 6 +- .../clear_trained_model_deployment_cache.rb | 6 +- .../api/actions/machine_learning/close_job.rb | 6 +- .../machine_learning/delete_calendar.rb | 6 +- .../machine_learning/delete_calendar_event.rb | 6 +- .../machine_learning/delete_calendar_job.rb | 6 +- .../delete_data_frame_analytics.rb | 6 +- .../machine_learning/delete_datafeed.rb | 6 +- .../machine_learning/delete_expired_data.rb | 4 +- .../actions/machine_learning/delete_filter.rb | 5 +- .../machine_learning/delete_forecast.rb | 4 +- .../actions/machine_learning/delete_job.rb | 6 +- .../machine_learning/delete_model_snapshot.rb | 4 +- .../machine_learning/delete_trained_model.rb | 6 +- .../delete_trained_model_alias.rb | 4 +- .../machine_learning/estimate_model_memory.rb | 6 +- .../machine_learning/evaluate_data_frame.rb | 6 +- .../explain_data_frame_analytics.rb | 4 +- .../api/actions/machine_learning/flush_job.rb | 6 +- .../api/actions/machine_learning/forecast.rb | 6 +- .../actions/machine_learning/get_buckets.rb | 4 +- .../machine_learning/get_calendar_events.rb | 6 +- .../actions/machine_learning/get_calendars.rb | 6 +- .../machine_learning/get_categories.rb | 4 +- .../get_data_frame_analytics.rb | 4 +- .../get_data_frame_analytics_stats.rb | 4 +- .../machine_learning/get_datafeed_stats.rb | 4 +- .../actions/machine_learning/get_datafeeds.rb | 6 +- .../actions/machine_learning/get_filters.rb | 6 +- .../machine_learning/get_influencers.rb | 6 +- .../actions/machine_learning/get_job_stats.rb | 4 +- .../api/actions/machine_learning/get_jobs.rb | 4 +- .../machine_learning/get_memory_stats.rb | 6 +- .../get_model_snapshot_upgrade_stats.rb | 4 +- .../machine_learning/get_model_snapshots.rb | 4 +- .../machine_learning/get_overall_buckets.rb | 6 +- .../actions/machine_learning/get_records.rb | 6 +- .../machine_learning/get_trained_models.rb | 6 +- .../get_trained_models_stats.rb | 4 +- .../machine_learning/infer_trained_model.rb | 4 +- .../api/actions/machine_learning/info.rb | 5 +- .../api/actions/machine_learning/open_job.rb | 6 +- .../machine_learning/post_calendar_events.rb | 6 +- .../api/actions/machine_learning/post_data.rb | 6 +- .../preview_data_frame_analytics.rb | 4 +- .../machine_learning/preview_datafeed.rb | 4 +- .../actions/machine_learning/put_calendar.rb | 6 +- .../machine_learning/put_calendar_job.rb | 6 +- .../put_data_frame_analytics.rb | 6 +- .../actions/machine_learning/put_datafeed.rb | 6 +- .../actions/machine_learning/put_filter.rb | 5 +- .../api/actions/machine_learning/put_job.rb | 6 +- .../machine_learning/put_trained_model.rb | 6 +- .../put_trained_model_alias.rb | 4 +- .../put_trained_model_definition_part.rb | 6 +- .../put_trained_model_vocabulary.rb | 6 +- .../api/actions/machine_learning/reset_job.rb | 6 +- .../machine_learning/revert_model_snapshot.rb | 4 +- .../machine_learning/set_upgrade_mode.rb | 5 +- .../start_data_frame_analytics.rb | 6 +- .../machine_learning/start_datafeed.rb | 6 +- .../start_trained_model_deployment.rb | 6 +- .../stop_data_frame_analytics.rb | 6 +- .../actions/machine_learning/stop_datafeed.rb | 6 +- .../stop_trained_model_deployment.rb | 6 +- .../update_data_frame_analytics.rb | 6 +- .../machine_learning/update_datafeed.rb | 6 +- .../actions/machine_learning/update_filter.rb | 6 +- .../actions/machine_learning/update_job.rb | 6 +- .../machine_learning/update_model_snapshot.rb | 4 +- .../update_trained_model_deployment.rb | 6 +- .../machine_learning/upgrade_job_snapshot.rb | 4 +- .../api/actions/machine_learning/validate.rb | 6 +- .../machine_learning/validate_detector.rb | 6 +- .../lib/elasticsearch/api/actions/mget.rb | 5 +- .../api/actions/migration/deprecations.rb | 4 +- .../migration/get_feature_upgrade_status.rb | 6 +- .../actions/migration/post_feature_upgrade.rb | 6 +- .../api/actions/monitoring/bulk.rb | 6 +- .../lib/elasticsearch/api/actions/msearch.rb | 5 +- .../api/actions/msearch_template.rb | 6 +- .../elasticsearch/api/actions/mtermvectors.rb | 6 +- .../clear_repositories_metering_archive.rb | 4 +- .../nodes/get_repositories_metering_info.rb | 6 +- .../api/actions/nodes/hot_threads.rb | 6 +- .../elasticsearch/api/actions/nodes/info.rb | 4 +- .../actions/nodes/reload_secure_settings.rb | 4 +- .../elasticsearch/api/actions/nodes/stats.rb | 4 +- .../elasticsearch/api/actions/nodes/usage.rb | 4 +- .../api/actions/open_point_in_time.rb | 5 +- .../lib/elasticsearch/api/actions/ping.rb | 5 +- .../elasticsearch/api/actions/put_script.rb | 6 +- .../api/actions/query_ruleset/delete.rb | 6 +- .../api/actions/query_ruleset/get.rb | 6 +- .../api/actions/query_ruleset/list.rb | 54 ---------------- .../api/actions/query_ruleset/put.rb | 6 +- .../elasticsearch/api/actions/rank_eval.rb | 6 +- .../lib/elasticsearch/api/actions/reindex.rb | 5 +- .../api/actions/reindex_rethrottle.rb | 6 +- .../api/actions/render_search_template.rb | 6 +- .../api/actions/rollup/delete_job.rb | 5 +- .../api/actions/rollup/get_jobs.rb | 6 +- .../api/actions/rollup/get_rollup_caps.rb | 6 +- .../actions/rollup/get_rollup_index_caps.rb | 6 +- .../api/actions/rollup/put_job.rb | 5 +- .../api/actions/rollup/rollup_search.rb | 6 +- .../api/actions/rollup/start_job.rb | 5 +- .../api/actions/rollup/stop_job.rb | 5 +- .../api/actions/scripts_painless_execute.rb | 6 +- .../lib/elasticsearch/api/actions/scroll.rb | 6 +- .../lib/elasticsearch/api/actions/search.rb | 5 +- .../api/actions/search_application/delete.rb | 6 +- .../delete_behavioral_analytics.rb | 6 +- .../api/actions/search_application/get.rb | 6 +- .../get_behavioral_analytics.rb | 4 +- .../api/actions/search_application/list.rb | 6 +- .../post_behavioral_analytics_event.rb | 2 +- .../api/actions/search_application/put.rb | 6 +- .../put_behavioral_analytics.rb | 6 +- .../search_application/render_query.rb | 6 +- .../api/actions/search_application/search.rb | 6 +- .../elasticsearch/api/actions/search_mvt.rb | 6 +- .../api/actions/search_shards.rb | 6 +- .../api/actions/search_template.rb | 6 +- .../searchable_snapshots/cache_stats.rb | 4 +- .../searchable_snapshots/clear_cache.rb | 4 +- .../api/actions/searchable_snapshots/mount.rb | 6 +- .../api/actions/searchable_snapshots/stats.rb | 4 +- .../actions/security/activate_user_profile.rb | 6 +- .../api/actions/security/authenticate.rb | 5 +- .../actions/security/bulk_update_api_keys.rb | 6 +- .../api/actions/security/change_password.rb | 4 +- .../actions/security/clear_api_key_cache.rb | 6 +- .../security/clear_cached_privileges.rb | 6 +- .../actions/security/clear_cached_realms.rb | 6 +- .../actions/security/clear_cached_roles.rb | 6 +- .../security/clear_cached_service_tokens.rb | 4 +- .../api/actions/security/create_api_key.rb | 6 +- .../security/create_cross_cluster_api_key.rb | 6 +- .../actions/security/create_service_token.rb | 4 +- .../api/actions/security/delete_privileges.rb | 6 +- .../api/actions/security/delete_role.rb | 6 +- .../actions/security/delete_role_mapping.rb | 6 +- .../actions/security/delete_service_token.rb | 4 +- .../api/actions/security/delete_user.rb | 6 +- .../api/actions/security/disable_user.rb | 6 +- .../actions/security/disable_user_profile.rb | 6 +- .../api/actions/security/enable_user.rb | 6 +- .../actions/security/enable_user_profile.rb | 6 +- .../api/actions/security/enroll_kibana.rb | 5 +- .../api/actions/security/enroll_node.rb | 5 +- .../api/actions/security/get_api_key.rb | 5 +- .../security/get_builtin_privileges.rb | 6 +- .../api/actions/security/get_privileges.rb | 4 +- .../api/actions/security/get_role.rb | 10 +-- .../api/actions/security/get_role_mapping.rb | 4 +- .../actions/security/get_service_accounts.rb | 4 +- .../security/get_service_credentials.rb | 6 +- .../api/actions/security/get_token.rb | 6 +- .../api/actions/security/get_user.rb | 10 +-- .../actions/security/get_user_privileges.rb | 6 +- .../api/actions/security/get_user_profile.rb | 6 +- .../api/actions/security/grant_api_key.rb | 6 +- .../api/actions/security/has_privileges.rb | 4 +- .../security/has_privileges_user_profile.rb | 6 +- .../actions/security/invalidate_api_key.rb | 6 +- .../api/actions/security/invalidate_token.rb | 6 +- .../api/actions/security/oidc_authenticate.rb | 6 +- .../api/actions/security/oidc_logout.rb | 6 +- .../security/oidc_prepare_authentication.rb | 6 +- .../api/actions/security/put_privileges.rb | 6 +- .../api/actions/security/put_role.rb | 5 +- .../api/actions/security/put_role_mapping.rb | 6 +- .../api/actions/security/put_user.rb | 6 +- .../api/actions/security/query_api_keys.rb | 6 +- .../api/actions/security/saml_authenticate.rb | 6 +- .../actions/security/saml_complete_logout.rb | 6 +- .../api/actions/security/saml_invalidate.rb | 6 +- .../api/actions/security/saml_logout.rb | 6 +- .../security/saml_prepare_authentication.rb | 6 +- .../saml_service_provider_metadata.rb | 6 +- .../actions/security/suggest_user_profiles.rb | 6 +- .../api/actions/security/update_api_key.rb | 6 +- .../security/update_cross_cluster_api_key.rb | 6 +- .../security/update_user_profile_data.rb | 6 +- .../api/actions/shutdown/delete_node.rb | 4 +- .../api/actions/shutdown/get_node.rb | 4 +- .../api/actions/shutdown/put_node.rb | 4 +- .../actions/snapshot/cleanup_repository.rb | 6 +- .../api/actions/snapshot/clone.rb | 4 +- .../api/actions/snapshot/create.rb | 6 +- .../api/actions/snapshot/create_repository.rb | 6 +- .../api/actions/snapshot/delete.rb | 10 +-- .../api/actions/snapshot/delete_repository.rb | 10 +-- .../elasticsearch/api/actions/snapshot/get.rb | 10 +-- .../api/actions/snapshot/get_repository.rb | 10 +-- .../actions/snapshot/repository_analyze.rb | 6 +- .../api/actions/snapshot/restore.rb | 6 +- .../api/actions/snapshot/status.rb | 6 +- .../api/actions/snapshot/verify_repository.rb | 6 +- .../delete_lifecycle.rb | 6 +- .../execute_lifecycle.rb | 6 +- .../execute_retention.rb | 5 +- .../get_lifecycle.rb | 6 +- .../get_stats.rb | 5 +- .../get_status.rb | 5 +- .../put_lifecycle.rb | 6 +- .../snapshot_lifecycle_management/start.rb | 5 +- .../snapshot_lifecycle_management/stop.rb | 5 +- .../api/actions/sql/clear_cursor.rb | 5 +- .../api/actions/sql/delete_async.rb | 5 +- .../api/actions/sql/get_async.rb | 5 +- .../api/actions/sql/get_async_status.rb | 6 +- .../elasticsearch/api/actions/sql/query.rb | 5 +- .../api/actions/sql/translate.rb | 5 +- .../api/actions/ssl/certificates.rb | 5 +- .../api/actions/synonym_rule/get.rb | 61 ------------------- .../api/actions/synonym_rule/put.rb | 6 +- .../api/actions/synonyms/delete.rb | 5 +- .../elasticsearch/api/actions/synonyms/get.rb | 5 +- .../elasticsearch/api/actions/synonyms/put.rb | 5 +- .../api/actions/synonyms_sets/get.rb | 5 +- .../elasticsearch/api/actions/tasks/cancel.rb | 6 +- .../elasticsearch/api/actions/tasks/get.rb | 5 +- .../elasticsearch/api/actions/tasks/list.rb | 5 +- .../elasticsearch/api/actions/terms_enum.rb | 5 +- .../elasticsearch/api/actions/termvectors.rb | 6 +- .../actions/text_structure/find_structure.rb | 6 +- .../api/actions/transform/delete_transform.rb | 6 +- .../api/actions/transform/get_transform.rb | 6 +- .../actions/transform/get_transform_stats.rb | 6 +- .../actions/transform/preview_transform.rb | 4 +- .../api/actions/transform/put_transform.rb | 6 +- .../api/actions/transform/reset_transform.rb | 6 +- .../transform/schedule_now_transform.rb | 6 +- .../api/actions/transform/start_transform.rb | 6 +- .../api/actions/transform/stop_transform.rb | 6 +- .../api/actions/transform/update_transform.rb | 6 +- .../actions/transform/upgrade_transforms.rb | 6 +- .../lib/elasticsearch/api/actions/update.rb | 8 ++- .../api/actions/update_by_query.rb | 5 +- .../api/actions/update_by_query_rethrottle.rb | 6 +- .../api/actions/watcher/ack_watch.rb | 4 +- .../api/actions/watcher/activate_watch.rb | 6 +- .../api/actions/watcher/deactivate_watch.rb | 6 +- .../api/actions/watcher/delete_watch.rb | 9 +-- .../api/actions/watcher/execute_watch.rb | 4 +- .../api/actions/watcher/get_settings.rb | 5 +- .../api/actions/watcher/get_watch.rb | 5 +- .../api/actions/watcher/put_watch.rb | 5 +- .../api/actions/watcher/query_watches.rb | 5 +- .../api/actions/watcher/start.rb | 5 +- .../api/actions/watcher/stats.rb | 6 +- .../elasticsearch/api/actions/watcher/stop.rb | 5 +- .../api/actions/watcher/update_settings.rb | 6 +- .../elasticsearch/api/actions/xpack/info.rb | 5 +- .../elasticsearch/api/actions/xpack/usage.rb | 5 +- .../lib/elasticsearch/api/namespace/common.rb | 4 +- .../api/actions/cat/aliases_spec.rb | 4 +- .../api/actions/cat/allocation_spec.rb | 4 +- .../actions/cat/component_templates_spec.rb | 4 +- .../api/actions/cat/count_spec.rb | 4 +- .../api/actions/cat/fielddata_spec.rb | 8 +-- .../api/actions/cat/health_spec.rb | 4 +- .../api/actions/cat/help_spec.rb | 4 +- .../api/actions/cat/indices_spec.rb | 4 +- .../api/actions/cat/master_spec.rb | 4 +- .../api/actions/cat/nodeattrs_spec.rb | 4 +- .../api/actions/cat/nodes_spec.rb | 4 +- .../api/actions/cat/pending_tasks_spec.rb | 4 +- .../api/actions/cat/plugins_spec.rb | 4 +- .../api/actions/cat/recovery_spec.rb | 4 +- .../api/actions/cat/repositories_spec.rb | 4 +- .../api/actions/cat/segments_spec.rb | 4 +- .../api/actions/cat/shards_spec.rb | 4 +- .../api/actions/cat/snapshot_spec.rb | 4 +- .../api/actions/cat/tasks_spec.rb | 4 +- .../api/actions/cat/templates_spec.rb | 4 +- .../api/actions/cat/thread_pool_spec.rb | 4 +- .../thor/generator/endpoint_specifics.rb | 2 +- .../utils/thor/templates/_perform_request.erb | 10 +-- 468 files changed, 1333 insertions(+), 1314 deletions(-) delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb delete mode 100644 elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/get.rb diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb index 811ede77c4..746a45316f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The async search ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/async-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,8 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_async_search/{id}"], 'async_search.delete') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_async_search/{id}"], :endpoint => 'async_search.delete' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb index bea8c303ee..e54a09c86e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/async-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def get(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -47,7 +47,8 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_async_search/{id}"], 'async_search.get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_async_search/{id}"], :endpoint => 'async_search.get' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb index 77d0bf9a7b..8425404424 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The async search ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/async-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def status(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,8 +44,8 @@ def status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_async_search/status/{id}"], - 'async_search.status') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_async_search/status/{id}"], :endpoint => 'async_search.status' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb index 9adbfed7b4..6b4dea7f87 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb @@ -69,7 +69,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition using the Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/async-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def submit(arguments = {}) arguments = arguments.clone @@ -88,8 +88,8 @@ def submit(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_async_search", "/{index}/_async_search"], - 'async_search.submit') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_async_search", "/{index}/_async_search"], :endpoint => 'async_search.submit' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb index d749e199e3..5a7fe355c1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name the name of the autoscaling policy # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/autoscaling-delete-autoscaling-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html # def delete_autoscaling_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,8 +44,8 @@ def delete_autoscaling_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_autoscaling/policy/{name}"], - 'autoscaling.delete_autoscaling_policy') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_autoscaling/policy/{name}"], :endpoint => 'autoscaling.delete_autoscaling_policy' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb index 72528f22aa..bf344e9bf4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/autoscaling-get-autoscaling-capacity.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html # def get_autoscaling_capacity(arguments = {}) arguments = arguments.clone @@ -39,8 +39,8 @@ def get_autoscaling_capacity(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_autoscaling/capacity"], - 'autoscaling.get_autoscaling_capacity') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_autoscaling/capacity"], :endpoint => 'autoscaling.get_autoscaling_capacity' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb index 9603f2d7ed..aff721075c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name the name of the autoscaling policy # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/autoscaling-get-autoscaling-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html # def get_autoscaling_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,8 +44,8 @@ def get_autoscaling_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_autoscaling/policy/{name}"], - 'autoscaling.get_autoscaling_policy') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_autoscaling/policy/{name}"], :endpoint => 'autoscaling.get_autoscaling_policy' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb index 04a6202e6e..2035fde564 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body the specification of the autoscaling policy (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/autoscaling-put-autoscaling-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html # def put_autoscaling_policy(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,8 +46,8 @@ def put_autoscaling_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_autoscaling/policy/{name}"], - 'autoscaling.put_autoscaling_policy') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_autoscaling/policy/{name}"], :endpoint => 'autoscaling.put_autoscaling_policy' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index 9f64fa8914..9370fc9b24 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -38,7 +38,7 @@ module Actions # @option arguments [String|Array] :body The operation definition and data (action-data pairs), separated by newlines. Array of Strings, Header/Data pairs, # or the conveniency "combined" format can be passed, refer to Elasticsearch::API::Utils.__bulkify documentation. # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-bulk.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html # def bulk(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -66,7 +66,8 @@ def bulk(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, ["/_bulk", "/{index}/_bulk"], 'bulk') + perform_request(method, path, params, payload, headers, + { :path_templates => ["/_bulk", "/{index}/_bulk"], :endpoint => 'bulk' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index 33843c0eb3..76ae536fe4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-alias.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-alias.html # def aliases(arguments = {}) arguments = arguments.clone @@ -54,8 +54,8 @@ def aliases(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/aliases", "/_cat/aliases/{name}"], - 'cat.aliases') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/aliases", "/_cat/aliases/{name}"], :endpoint => 'cat.aliases' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb index df82cf1f7c..0d5211511f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-allocation.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html # def allocation(arguments = {}) arguments = arguments.clone @@ -55,8 +55,8 @@ def allocation(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/allocation", "/_cat/allocation/{node_id}"], - 'cat.allocation') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/allocation", "/_cat/allocation/{node_id}"], :endpoint => 'cat.allocation' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb index e5d1c2bd77..19b5962e67 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-component-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-component-templates.html # def component_templates(arguments = {}) arguments = arguments.clone @@ -54,7 +54,7 @@ def component_templates(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_cat/component_templates", "/_cat/component_templates/{name}"], 'cat.component_templates') + { :path_templates => ["/_cat/component_templates", "/_cat/component_templates/{name}"], :endpoint => 'cat.component_templates' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb index 5bf2364f5b..3d1095bf1f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-count.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html # def count(arguments = {}) arguments = arguments.clone @@ -52,7 +52,8 @@ def count(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/count", "/_cat/count/{index}"], 'cat.count') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/count", "/_cat/count/{index}"], :endpoint => 'cat.count' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb index 042409a204..7ef8758164 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-fielddata.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html # def fielddata(arguments = {}) arguments = arguments.clone @@ -52,8 +52,8 @@ def fielddata(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/fielddata", "/_cat/fielddata/{fields}"], - 'cat.fielddata') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/fielddata", "/_cat/fielddata/{fields}"], :endpoint => 'cat.fielddata' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb index b47902c141..9340e997d7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-health.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-health.html # def health(arguments = {}) arguments = arguments.clone @@ -47,7 +47,8 @@ def health(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/health"], 'cat.health') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/health"], :endpoint => 'cat.health' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb index 6b14a04e90..d9b145eda1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html # def help(arguments = {}) arguments = arguments.clone @@ -41,7 +41,8 @@ def help(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat"], 'cat.help') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat"], :endpoint => 'cat.help' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb index 52c29c6eab..a21c503208 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb @@ -39,7 +39,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-indices.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html # def indices(arguments = {}) arguments = arguments.clone @@ -59,8 +59,8 @@ def indices(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/indices", "/_cat/indices/{index}"], - 'cat.indices') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/indices", "/_cat/indices/{index}"], :endpoint => 'cat.indices' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb index 32b0b7c419..25569a2c87 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-master.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-master.html # def master(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def master(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/master"], 'cat.master') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/master"], :endpoint => 'cat.master' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb index c9265c0077..75715ff358 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-dfanalytics.html + # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html # def ml_data_frame_analytics(arguments = {}) arguments = arguments.clone @@ -55,7 +55,7 @@ def ml_data_frame_analytics(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_cat/ml/data_frame/analytics", "/_cat/ml/data_frame/analytics/{id}"], 'cat.ml_data_frame_analytics') + { :path_templates => ["/_cat/ml/data_frame/analytics", "/_cat/ml/data_frame/analytics/{id}"], :endpoint => 'cat.ml_data_frame_analytics' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb index 350484c9ef..41427dbf04 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-datafeeds.html + # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html # def ml_datafeeds(arguments = {}) arguments = arguments.clone @@ -53,8 +53,8 @@ def ml_datafeeds(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/ml/datafeeds", "/_cat/ml/datafeeds/{datafeed_id}"], - 'cat.ml_datafeeds') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/ml/datafeeds", "/_cat/ml/datafeeds/{datafeed_id}"], :endpoint => 'cat.ml_datafeeds' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb index 3d41d4cd5f..016f97d688 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-anomaly-detectors.html + # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html # def ml_jobs(arguments = {}) arguments = arguments.clone @@ -55,7 +55,7 @@ def ml_jobs(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_cat/ml/anomaly_detectors", "/_cat/ml/anomaly_detectors/{job_id}"], 'cat.ml_jobs') + { :path_templates => ["/_cat/ml/anomaly_detectors", "/_cat/ml/anomaly_detectors/{job_id}"], :endpoint => 'cat.ml_jobs' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb index 723818a115..64448fbf59 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb @@ -37,7 +37,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-trained-model.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html # def ml_trained_models(arguments = {}) arguments = arguments.clone @@ -57,7 +57,7 @@ def ml_trained_models(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_cat/ml/trained_models", "/_cat/ml/trained_models/{model_id}"], 'cat.ml_trained_models') + { :path_templates => ["/_cat/ml/trained_models", "/_cat/ml/trained_models/{model_id}"], :endpoint => 'cat.ml_trained_models' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb index 4487191fe8..5b63123bfa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-nodeattrs.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodeattrs.html # def nodeattrs(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def nodeattrs(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/nodeattrs"], 'cat.nodeattrs') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/nodeattrs"], :endpoint => 'cat.nodeattrs' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb index 84b677cce6..583997b95a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-nodes.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html # def nodes(arguments = {}) arguments = arguments.clone @@ -50,7 +50,8 @@ def nodes(arguments = {}) params[:h] = Utils.__listify(params[:h], escape: false) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/nodes"], 'cat.nodes') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/nodes"], :endpoint => 'cat.nodes' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb index dad0564fbf..d299af5c82 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-pending-tasks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-pending-tasks.html # def pending_tasks(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def pending_tasks(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/pending_tasks"], 'cat.pending_tasks') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/pending_tasks"], :endpoint => 'cat.pending_tasks' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb index ad60a29104..8b4f9396f3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-plugins.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html # def plugins(arguments = {}) arguments = arguments.clone @@ -47,7 +47,8 @@ def plugins(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/plugins"], 'cat.plugins') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/plugins"], :endpoint => 'cat.plugins' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb index dcc030649e..9dc11d0947 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-recovery.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html # def recovery(arguments = {}) arguments = arguments.clone @@ -56,8 +56,8 @@ def recovery(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/recovery", "/_cat/recovery/{index}"], - 'cat.recovery') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/recovery", "/_cat/recovery/{index}"], :endpoint => 'cat.recovery' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb index 09d5e6d2ba..544e48ce99 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-repositories.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-repositories.html # def repositories(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def repositories(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/repositories"], 'cat.repositories') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/repositories"], :endpoint => 'cat.repositories' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb index cb7193173c..1143eeaf49 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-segments.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html # def segments(arguments = {}) arguments = arguments.clone @@ -52,8 +52,8 @@ def segments(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/segments", "/_cat/segments/{index}"], - 'cat.segments') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/segments", "/_cat/segments/{index}"], :endpoint => 'cat.segments' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb index dcbf42ac07..a18dd7a510 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-shards.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html # def shards(arguments = {}) arguments = arguments.clone @@ -55,7 +55,8 @@ def shards(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/shards", "/_cat/shards/{index}"], 'cat.shards') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/shards", "/_cat/shards/{index}"], :endpoint => 'cat.shards' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb index dbbc5312fa..12be35f680 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html # def snapshots(arguments = {}) arguments = arguments.clone @@ -54,8 +54,8 @@ def snapshots(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/snapshots", "/_cat/snapshots/{repository}"], - 'cat.snapshots') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/snapshots", "/_cat/snapshots/{repository}"], :endpoint => 'cat.snapshots' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb index e0ff8868a6..8637989abd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb @@ -40,7 +40,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/tasks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html # def tasks(arguments = {}) arguments = arguments.clone @@ -53,7 +53,8 @@ def tasks(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/tasks"], 'cat.tasks') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/tasks"], :endpoint => 'cat.tasks' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb index 3155067ef2..72f9100633 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html # def templates(arguments = {}) arguments = arguments.clone @@ -53,8 +53,8 @@ def templates(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/templates", "/_cat/templates/{name}"], - 'cat.templates') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/templates", "/_cat/templates/{name}"], :endpoint => 'cat.templates' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb index ded632fc2f..345002862c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-thread-pool.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html # def thread_pool(arguments = {}) arguments = arguments.clone @@ -57,7 +57,7 @@ def thread_pool(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_cat/thread_pool", "/_cat/thread_pool/{thread_pool_patterns}"], 'cat.thread_pool') + { :path_templates => ["/_cat/thread_pool", "/_cat/thread_pool/{thread_pool_patterns}"], :endpoint => 'cat.thread_pool' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb index f0ec74f6b2..fe141f5743 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Boolean] :v Verbose mode. Display column headers # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cat-transforms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html # def transforms(arguments = {}) arguments = arguments.clone @@ -55,8 +55,8 @@ def transforms(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cat/transforms", "/_cat/transforms/{transform_id}"], - 'cat.transforms') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cat/transforms", "/_cat/transforms/{transform_id}"], :endpoint => 'cat.transforms' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb index e5773ddd04..960a01ad3d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb @@ -32,7 +32,7 @@ module Actions # Deprecated since version 7.0.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/clear-scroll-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html # def clear_scroll(arguments = {}) arguments = arguments.clone @@ -53,14 +53,14 @@ def clear_scroll(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_search/scroll", "/_search/scroll/{scroll_id}"], - 'clear_scroll') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_search/scroll", "/_search/scroll/{scroll_id}"], :endpoint => 'clear_scroll' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_search/scroll", "/_search/scroll/{scroll_id}"], - 'clear_scroll') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_search/scroll", "/_search/scroll/{scroll_id}"], :endpoint => 'clear_scroll' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb index 38c403e10a..26152f2d35 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb @@ -26,7 +26,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body a point-in-time id to close # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/point-in-time-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html # def close_point_in_time(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def close_point_in_time(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_pit"], 'close_point_in_time') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_pit"], :endpoint => 'close_point_in_time' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb index de92dc0b96..02815878e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The index, shard, and primary flag to explain. Empty means 'explain a randomly-chosen unassigned shard' # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-allocation-explain.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html # def allocation_explain(arguments = {}) arguments = arguments.clone @@ -47,8 +47,8 @@ def allocation_explain(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cluster/allocation/explain"], - 'cluster.allocation_explain') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cluster/allocation/explain"], :endpoint => 'cluster.allocation_explain' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb index 5aa641373b..da8dfe4983 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-component-template.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html # def delete_component_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -46,8 +46,8 @@ def delete_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_component_template/{name}"], - 'cluster.delete_component_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_component_template/{name}"], :endpoint => 'cluster.delete_component_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb index d6777d7477..995013caa6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Time] :master_timeout Timeout for submitting request to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/voting-config-exclusions.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/voting-config-exclusions.html # def delete_voting_config_exclusions(arguments = {}) arguments = arguments.clone @@ -41,8 +41,8 @@ def delete_voting_config_exclusions(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cluster/voting_config_exclusions"], - 'cluster.delete_voting_config_exclusions') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cluster/voting_config_exclusions"], :endpoint => 'cluster.delete_voting_config_exclusions' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb index 028d0bd9bc..a596df3301 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-component-template.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html # def exists_component_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -46,8 +46,8 @@ def exists_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_component_template/{name}"], - 'cluster.exists_component_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_component_template/{name}"], :endpoint => 'cluster.exists_component_template' }) ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb index 4bc4501102..19dcf61103 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :include_defaults Return all default configurations for the component template (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-component-template.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html # def get_component_template(arguments = {}) arguments = arguments.clone @@ -49,8 +49,8 @@ def get_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_component_template", "/_component_template/{name}"], - 'cluster.get_component_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_component_template", "/_component_template/{name}"], :endpoint => 'cluster.get_component_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb index c8932068dc..1905b1c44c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :include_defaults Whether to return all default clusters setting. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-get-settings.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-get-settings.html # def get_settings(arguments = {}) arguments = arguments.clone @@ -43,7 +43,8 @@ def get_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cluster/settings"], 'cluster.get_settings') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cluster/settings"], :endpoint => 'cluster.get_settings' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb index f398a0d0f0..346b8a318a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb @@ -38,7 +38,7 @@ module Actions # @option arguments [String] :wait_for_status Wait until cluster is in a specific state (options: green, yellow, red) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-health.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html # def health(arguments = {}) arguments = arguments.clone @@ -57,8 +57,8 @@ def health(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cluster/health", "/_cluster/health/{index}"], - 'cluster.health') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cluster/health", "/_cluster/health/{index}"], :endpoint => 'cluster.health' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb index e30c40d628..1eb2c367df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :target Limit the information returned to the specified target. (options: _all, http, ingest, thread_pool, script) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-info.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-info.html # def info(arguments = {}) raise ArgumentError, "Required argument 'target' missing" unless arguments[:target] @@ -44,7 +44,8 @@ def info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_info/{target}"], 'cluster.info') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_info/{target}"], :endpoint => 'cluster.info' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb index 42024b2442..f6806f55dc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-pending.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-pending.html # def pending_tasks(arguments = {}) arguments = arguments.clone @@ -42,7 +42,8 @@ def pending_tasks(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cluster/pending_tasks"], 'cluster.pending_tasks') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cluster/pending_tasks"], :endpoint => 'cluster.pending_tasks' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb index 4da72153e2..a772de0426 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Time] :master_timeout Timeout for submitting request to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/voting-config-exclusions.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/voting-config-exclusions.html # def post_voting_config_exclusions(arguments = {}) arguments = arguments.clone @@ -43,8 +43,8 @@ def post_voting_config_exclusions(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cluster/voting_config_exclusions"], - 'cluster.post_voting_config_exclusions') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cluster/voting_config_exclusions"], :endpoint => 'cluster.post_voting_config_exclusions' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb index c158b9fce0..9ac57955b1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The template definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-component-template.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html # def put_component_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,8 +49,8 @@ def put_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_component_template/{name}"], - 'cluster.put_component_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_component_template/{name}"], :endpoint => 'cluster.put_component_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb index ba1aee53c2..aaaeec7cc6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-update-settings.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html # def put_settings(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -45,7 +45,8 @@ def put_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cluster/settings"], 'cluster.put_settings') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cluster/settings"], :endpoint => 'cluster.put_settings' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb index a70c68569a..ad4d7ea1ce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-remote-info.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-remote-info.html # def remote_info(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def remote_info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_remote/info"], 'cluster.remote_info') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_remote/info"], :endpoint => 'cluster.remote_info' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb index 32ef92c7cf..75ca14f9b0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The definition of `commands` to perform (`move`, `cancel`, `allocate`) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-reroute.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html # def reroute(arguments = {}) arguments = arguments.clone @@ -46,7 +46,8 @@ def reroute(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cluster/reroute"], 'cluster.reroute') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cluster/reroute"], :endpoint => 'cluster.reroute' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb index 2d56504dad..b7b6058b73 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-state.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html # def state(arguments = {}) arguments = arguments.clone @@ -60,7 +60,7 @@ def state(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_cluster/state", "/_cluster/state/{metric}", "/_cluster/state/{metric}/{index}"], 'cluster.state') + { :path_templates => ["/_cluster/state", "/_cluster/state/{metric}", "/_cluster/state/{metric}/{index}"], :endpoint => 'cluster.state' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb index c177f34be0..68221feac2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html # def stats(arguments = {}) arguments = arguments.clone @@ -48,8 +48,8 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cluster/stats", "/_cluster/stats/nodes/{node_id}"], - 'cluster.stats') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cluster/stats", "/_cluster/stats/nodes/{node_id}"], :endpoint => 'cluster.stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb index 883e9d4490..ffc8e43fce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb @@ -41,7 +41,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body A query to restrict the results specified with the Query DSL (optional) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-count.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html # def count(arguments = {}) arguments = arguments.clone @@ -65,7 +65,8 @@ def count(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_count", "/{index}/_count"], 'count') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_count", "/{index}/_count"], :endpoint => 'count' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb index 084db15529..d4f3676fdb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/create.rb @@ -37,7 +37,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The document (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-index_.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html # def create(arguments = {}) if arguments[:id] diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb index 2af2c296f3..3d68c27187 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the auto follow pattern. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-delete-auto-follow-pattern.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html # def delete_auto_follow_pattern(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,8 +44,8 @@ def delete_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ccr/auto_follow/{name}"], - 'ccr.delete_auto_follow_pattern') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ccr/auto_follow/{name}"], :endpoint => 'ccr.delete_auto_follow_pattern' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb index d7edd87aa7..172ebed859 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The name of the leader index and other optional ccr related parameters (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-put-follow.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html # def follow(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -47,7 +47,8 @@ def follow(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_ccr/follow"], 'ccr.follow') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_ccr/follow"], :endpoint => 'ccr.follow' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb index 9acf2c781a..87456db0d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :index A comma-separated list of index patterns; use `_all` to perform the operation on all indices # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-get-follow-info.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html # def follow_info(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -44,7 +44,8 @@ def follow_info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_ccr/info"], 'ccr.follow_info') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_ccr/info"], :endpoint => 'ccr.follow_info' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb index 1e06c53799..eadfb23a03 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :index A comma-separated list of index patterns; use `_all` to perform the operation on all indices # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-get-follow-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html # def follow_stats(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -44,7 +44,8 @@ def follow_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_ccr/stats"], 'ccr.follow_stats') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_ccr/stats"], :endpoint => 'ccr.follow_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb index 8d7f6b7ee5..5bffc61307 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-post-forget-follower.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html # def forget_follower(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,8 +46,8 @@ def forget_follower(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_ccr/forget_follower"], - 'ccr.forget_follower') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_ccr/forget_follower"], :endpoint => 'ccr.forget_follower' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb index 3115d925c5..d9eeef0c27 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the auto follow pattern. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-get-auto-follow-pattern.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html # def get_auto_follow_pattern(arguments = {}) arguments = arguments.clone @@ -46,8 +46,8 @@ def get_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ccr/auto_follow", "/_ccr/auto_follow/{name}"], - 'ccr.get_auto_follow_pattern') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ccr/auto_follow", "/_ccr/auto_follow/{name}"], :endpoint => 'ccr.get_auto_follow_pattern' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb index b09f12cc7a..3079fee814 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the auto follow pattern that should pause discovering new indices to follow. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-pause-auto-follow-pattern.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html # def pause_auto_follow_pattern(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,8 +44,8 @@ def pause_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ccr/auto_follow/{name}/pause"], - 'ccr.pause_auto_follow_pattern') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ccr/auto_follow/{name}/pause"], :endpoint => 'ccr.pause_auto_follow_pattern' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb index 50c5535814..49dc89def6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :index The name of the follower index that should pause following its leader index. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-post-pause-follow.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html # def pause_follow(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -44,8 +44,8 @@ def pause_follow(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_ccr/pause_follow"], - 'ccr.pause_follow') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_ccr/pause_follow"], :endpoint => 'ccr.pause_follow' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb index 862fb7d6f5..1a485eb2b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The specification of the auto follow pattern (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-put-auto-follow-pattern.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html # def put_auto_follow_pattern(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,8 +46,8 @@ def put_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ccr/auto_follow/{name}"], - 'ccr.put_auto_follow_pattern') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ccr/auto_follow/{name}"], :endpoint => 'ccr.put_auto_follow_pattern' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb index 5e37b5eb76..e02bd3c702 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the auto follow pattern to resume discovering new indices to follow. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-resume-auto-follow-pattern.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html # def resume_auto_follow_pattern(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,8 +44,8 @@ def resume_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ccr/auto_follow/{name}/resume"], - 'ccr.resume_auto_follow_pattern') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ccr/auto_follow/{name}/resume"], :endpoint => 'ccr.resume_auto_follow_pattern' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb index 9b5d41f078..181eb02228 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The name of the leader index and other optional ccr related parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-post-resume-follow.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html # def resume_follow(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -45,8 +45,8 @@ def resume_follow(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_ccr/resume_follow"], - 'ccr.resume_follow') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_ccr/resume_follow"], :endpoint => 'ccr.resume_follow' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb index dd05f84fcc..fec80ad6d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-get-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html # def stats(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ccr/stats"], 'ccr.stats') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ccr/stats"], :endpoint => 'ccr.stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb index 8e471aac47..3f5a5662eb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :index The name of the follower index that should be turned into a regular index. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-post-unfollow.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html # def unfollow(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -44,7 +44,8 @@ def unfollow(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_ccr/unfollow"], 'ccr.unfollow') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_ccr/unfollow"], :endpoint => 'ccr.unfollow' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb index 885135fc62..f0029b087d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-gateway-dangling-indices.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html # def delete_dangling_index(arguments = {}) raise ArgumentError, "Required argument 'index_uuid' missing" unless arguments[:index_uuid] @@ -47,8 +47,8 @@ def delete_dangling_index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_dangling/{index_uuid}"], - 'dangling_indices.delete_dangling_index') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_dangling/{index_uuid}"], :endpoint => 'dangling_indices.delete_dangling_index' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb index 4127f06250..30cbbd209f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-gateway-dangling-indices.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html # def import_dangling_index(arguments = {}) raise ArgumentError, "Required argument 'index_uuid' missing" unless arguments[:index_uuid] @@ -47,8 +47,8 @@ def import_dangling_index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_dangling/{index_uuid}"], - 'dangling_indices.import_dangling_index') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_dangling/{index_uuid}"], :endpoint => 'dangling_indices.import_dangling_index' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb index cb6acff990..867b2829bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-gateway-dangling-indices.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway-dangling-indices.html # def list_dangling_indices(arguments = {}) arguments = arguments.clone @@ -39,8 +39,8 @@ def list_dangling_indices(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_dangling"], - 'dangling_indices.list_dangling_indices') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_dangling"], :endpoint => 'dangling_indices.list_dangling_indices' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb index 2be73e8968..d23364794e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-delete.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -57,12 +57,14 @@ def delete(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_doc/{id}"], 'delete') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_doc/{id}"], :endpoint => 'delete' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_doc/{id}"], 'delete') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_doc/{id}"], :endpoint => 'delete' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb index f2622b30d6..0754839c18 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb @@ -56,7 +56,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition using the Query DSL (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-delete-by-query.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html # def delete_by_query(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -74,7 +74,8 @@ def delete_by_query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_delete_by_query"], 'delete_by_query') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_delete_by_query"], :endpoint => 'delete_by_query' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb index d84e843b36..b752f12a8b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-delete-by-query.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html # def delete_by_query_rethrottle(arguments = {}) raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] @@ -44,8 +44,8 @@ def delete_by_query_rethrottle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_delete_by_query/{task_id}/_rethrottle"], - 'delete_by_query_rethrottle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_delete_by_query/{task_id}/_rethrottle"], :endpoint => 'delete_by_query_rethrottle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb index 9b140c1cb2..bf0df87f23 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-scripting.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html # def delete_script(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -45,7 +45,8 @@ def delete_script(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_scripts/{id}"], 'delete_script') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_scripts/{id}"], :endpoint => 'delete_script' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb index 1da4a5ca8b..721834a2ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the enrich policy # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-enrich-policy-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html # def delete_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,8 +44,8 @@ def delete_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_enrich/policy/{name}"], - 'enrich.delete_policy') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_enrich/policy/{name}"], :endpoint => 'enrich.delete_policy' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb index e5e5c36e2e..d62fb762bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :wait_for_completion Should the request should block until the execution is complete. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/execute-enrich-policy-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html # def execute_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -45,8 +45,8 @@ def execute_policy(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_enrich/policy/{name}/_execute"], - 'enrich.execute_policy') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_enrich/policy/{name}/_execute"], :endpoint => 'enrich.execute_policy' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb index 8ed5f85ac3..6cbedd8023 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :name A comma-separated list of enrich policy names # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-enrich-policy-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html # def get_policy(arguments = {}) arguments = arguments.clone @@ -46,8 +46,8 @@ def get_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_enrich/policy/{name}", "/_enrich/policy"], - 'enrich.get_policy') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_enrich/policy/{name}", "/_enrich/policy"], :endpoint => 'enrich.get_policy' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb index 13d7239fc3..6ae7abb10d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The enrich policy to register (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-enrich-policy-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html # def put_policy(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def put_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_enrich/policy/{name}"], 'enrich.put_policy') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_enrich/policy/{name}"], :endpoint => 'enrich.put_policy' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb index d0e22bfc8f..4c3374ee3f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/enrich-stats-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html # def stats(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_enrich/_stats"], 'enrich.stats') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_enrich/_stats"], :endpoint => 'enrich.stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb index 3ead66d716..acda290276 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The async search ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/eql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,8 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_eql/search/{id}"], 'eql.delete') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_eql/search/{id}"], :endpoint => 'eql.delete' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb index 2ddb54404c..e6da098cbb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :keep_alive Update the time interval in which the results (partial or final) for this search will be available # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/eql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html # def get(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,7 +46,8 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_eql/search/{id}"], 'eql.get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_eql/search/{id}"], :endpoint => 'eql.get' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb index 6ac5891afa..27d1618975 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The async search ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/eql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html # def get_status(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,8 @@ def get_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_eql/search/status/{id}"], 'eql.get_status') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_eql/search/status/{id}"], :endpoint => 'eql.get_status' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb index e24e29b506..6605b61466 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Eql request body. Use the `query` to limit the query scope. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/eql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html # def search(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,7 +49,8 @@ def search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_eql/search"], 'eql.search') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_eql/search"], :endpoint => 'eql.search' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb index 171d425c7b..7566e05b75 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb @@ -37,7 +37,7 @@ module Actions # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-get.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html # def exists(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -57,8 +57,8 @@ def exists(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, ["/{index}/_doc/{id}"], - 'exists').status == 200 ? true : false + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_doc/{id}"], :endpoint => 'exists' }).status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb index a9b24852ce..1941af4851 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-get.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html # def exists_source(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -56,7 +56,8 @@ def exists_source(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_source/{id}"], 'exists_source') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_source/{id}"], :endpoint => 'exists_source' }) ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb index 4c4b1d0e4c..0bdca81b69 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb @@ -40,7 +40,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The query definition using the Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-explain.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html # def explain(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -65,7 +65,8 @@ def explain(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_explain/{id}"], 'explain') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_explain/{id}"], :endpoint => 'explain' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb index 1f2cfdfbe7..4b7ee4a949 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-features-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-features-api.html # def get_features(arguments = {}) arguments = arguments.clone @@ -40,7 +40,8 @@ def get_features(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_features"], 'features.get_features') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_features"], :endpoint => 'features.get_features' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb index bdfaaed467..59ccb3e6be 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb @@ -30,7 +30,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def reset_features(arguments = {}) arguments = arguments.clone @@ -43,7 +43,8 @@ def reset_features(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_features/_reset"], 'features.reset_features') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_features/_reset"], :endpoint => 'features.reset_features' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb index 53a7280f7d..e2c303019b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An index filter specified with the Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-field-caps.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html # def field_caps(arguments = {}) arguments = arguments.clone @@ -58,7 +58,8 @@ def field_caps(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_field_caps", "/{index}/_field_caps"], 'field_caps') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_field_caps", "/{index}/_field_caps"], :endpoint => 'field_caps' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb index a2a95d41e1..c78ec67a00 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Time] :timeout Timeout to wait for global checkpoint to advance # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-global-checkpoints.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-global-checkpoints.html # def global_checkpoints(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -48,8 +48,8 @@ def global_checkpoints(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_fleet/global_checkpoints"], - 'fleet.global_checkpoints') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_fleet/global_checkpoints"], :endpoint => 'fleet.global_checkpoints' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb index c7f3e2d690..3ae2848661 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb @@ -77,7 +77,7 @@ def msearch(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( perform_request(method, path, params, payload, headers, - ["/_fleet/_fleet_msearch", "/{index}/_fleet/_fleet_msearch"], 'fleet.msearch') + { :path_templates => ["/_fleet/_fleet_msearch", "/{index}/_fleet/_fleet_msearch"], :endpoint => 'fleet.msearch' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb index 22b35df2ae..9914462cea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb @@ -57,8 +57,8 @@ def search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_fleet/_fleet_search"], - 'fleet.search') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_fleet/_fleet_search"], :endpoint => 'fleet.search' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb index 96497565c5..f5b60bb374 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb @@ -38,7 +38,7 @@ module Actions # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-get.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html # def get(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -60,12 +60,14 @@ def get(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_doc/{id}"], 'get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_doc/{id}"], :endpoint => 'get' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_doc/{id}"], 'get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_doc/{id}"], :endpoint => 'get' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb index 8b34167d41..9b893aec9d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-scripting.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html # def get_script(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,8 @@ def get_script(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_scripts/{id}"], 'get_script') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_scripts/{id}"], :endpoint => 'get_script' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb index 5e480f2abd..2b8e8787e6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb @@ -25,7 +25,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/painless/8.10/painless-contexts.html + # @see https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-contexts.html # def get_script_context(arguments = {}) arguments = arguments.clone @@ -38,7 +38,8 @@ def get_script_context(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_script_context"], 'get_script_context') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_script_context"], :endpoint => 'get_script_context' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb index 67057128a5..13079e3806 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb @@ -25,7 +25,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-scripting.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html # def get_script_languages(arguments = {}) arguments = arguments.clone @@ -38,7 +38,8 @@ def get_script_languages(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_script_language"], 'get_script_languages') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_script_language"], :endpoint => 'get_script_languages' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb index f7240693d8..eab6c43a17 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-get.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html # def get_source(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -56,7 +56,8 @@ def get_source(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_source/{id}"], 'get_source') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_source/{id}"], :endpoint => 'get_source' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb index 0cb3cfc79b..9775fba618 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Graph Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/graph-explore-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html # def explore(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +52,8 @@ def explore(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_graph/explore"], 'graph.explore') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_graph/explore"], :endpoint => 'graph.explore' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb index 1d520c7bfa..45a71fd586 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Integer] :size Limit the number of affected resources the health API returns # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/health-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html # def health_report(arguments = {}) arguments = arguments.clone @@ -48,8 +48,8 @@ def health_report(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_health_report", "/_health_report/{feature}"], - 'health_report') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_health_report", "/_health_report/{feature}"], :endpoint => 'health_report' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb index d10698f390..2c19a0e9d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb @@ -39,7 +39,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The document (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-index_.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html # def index(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -63,7 +63,8 @@ def index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_doc/{id}", "/{index}/_doc"], 'index') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_doc/{id}", "/{index}/_doc"], :endpoint => 'index' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb index ed3a5bc193..0440fb6d84 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :policy The name of the index lifecycle policy # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-delete-lifecycle.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html # def delete_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy' missing" unless arguments[:policy] @@ -44,8 +44,8 @@ def delete_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ilm/policy/{policy}"], - 'ilm.delete_lifecycle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ilm/policy/{policy}"], :endpoint => 'ilm.delete_lifecycle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb index 799fd923cc..7adbd341a9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :only_errors filters the indices included in the response to ones in an ILM error state, implies only_managed # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-explain-lifecycle.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html # def explain_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -46,8 +46,8 @@ def explain_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_ilm/explain"], - 'ilm.explain_lifecycle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_ilm/explain"], :endpoint => 'ilm.explain_lifecycle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb index eb359d68fd..59d22ebcd3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :policy The name of the index lifecycle policy # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-get-lifecycle.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html # def get_lifecycle(arguments = {}) arguments = arguments.clone @@ -46,8 +46,8 @@ def get_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ilm/policy/{policy}", "/_ilm/policy"], - 'ilm.get_lifecycle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ilm/policy/{policy}", "/_ilm/policy"], :endpoint => 'ilm.get_lifecycle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb index 76818ad03d..f0fb70e47c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-get-status.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html # def get_status(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def get_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ilm/status"], 'ilm.get_status') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ilm/status"], :endpoint => 'ilm.get_status' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb index abcdff4f97..f7475f535f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Optionally specify a legacy index template name to delete and optionally specify a node attribute name used for index shard routing (defaults to "data") # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-migrate-to-data-tiers.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html # def migrate_to_data_tiers(arguments = {}) arguments = arguments.clone @@ -41,8 +41,8 @@ def migrate_to_data_tiers(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ilm/migrate_to_data_tiers"], - 'ilm.migrate_to_data_tiers') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ilm/migrate_to_data_tiers"], :endpoint => 'ilm.migrate_to_data_tiers' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb index 40587df14a..fbdb182b41 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The new lifecycle step to move to # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-move-to-step.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html # def move_to_step(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -45,7 +45,8 @@ def move_to_step(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ilm/move/{index}"], 'ilm.move_to_step') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ilm/move/{index}"], :endpoint => 'ilm.move_to_step' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb index f6e0d4b2a0..4e5aef6973 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The lifecycle policy definition to register # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-put-lifecycle.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html # def put_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy' missing" unless arguments[:policy] @@ -45,7 +45,8 @@ def put_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ilm/policy/{policy}"], 'ilm.put_lifecycle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ilm/policy/{policy}"], :endpoint => 'ilm.put_lifecycle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb index f20e15b2d9..b7397047a5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :index The name of the index to remove policy on # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-remove-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html # def remove_policy(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -44,7 +44,8 @@ def remove_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_ilm/remove"], 'ilm.remove_policy') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_ilm/remove"], :endpoint => 'ilm.remove_policy' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb index a926a00637..c807e6c0f1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :index The name of the indices (comma-separated) whose failed lifecycle step is to be retry # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-retry-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html # def retry(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -44,7 +44,8 @@ def retry(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_ilm/retry"], 'ilm.retry') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_ilm/retry"], :endpoint => 'ilm.retry' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb index f26f774976..dc4bf73254 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-start.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html # def start(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def start(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ilm/start"], 'ilm.start') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ilm/start"], :endpoint => 'ilm.start' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb index f509afdc98..68b61d2f57 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ilm-stop.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html # def stop(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def stop(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ilm/stop"], 'ilm.stop') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ilm/stop"], :endpoint => 'ilm.stop' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb index 11a0270e7f..4ddece7aae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/index-modules-blocks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-blocks.html # def add_block(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -53,7 +53,8 @@ def add_block(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_block/{block}"], 'indices.add_block') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_block/{block}"], :endpoint => 'indices.add_block' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb index 05214702b5..4dc073d0fc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Define analyzer/tokenizer parameters and the text on which the analysis should be performed # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-analyze.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html # def analyze(arguments = {}) arguments = arguments.clone @@ -52,7 +52,8 @@ def analyze(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_analyze", "/{index}/_analyze"], 'indices.analyze') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_analyze", "/{index}/_analyze"], :endpoint => 'indices.analyze' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb index 63729abae3..1c78482a7f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :request Clear request cache # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-clearcache.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html # def clear_cache(arguments = {}) arguments = arguments.clone @@ -53,8 +53,8 @@ def clear_cache(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_cache/clear", "/{index}/_cache/clear"], - 'indices.clear_cache') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_cache/clear", "/{index}/_cache/clear"], :endpoint => 'indices.clear_cache' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb index d153371e0d..681932343f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-clone-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clone-index.html # def clone(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +52,8 @@ def clone(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_clone/{target}"], 'indices.clone') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_clone/{target}"], :endpoint => 'indices.clone' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb index cbc50911ce..bfdf6af4f4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [String] :wait_for_active_shards Sets the number of active shards to wait for before the operation returns. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-open-close.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html # def close(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -50,7 +50,8 @@ def close(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_close"], 'indices.close') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_close"], :endpoint => 'indices.close' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb index 5b35750b35..88e3f93357 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The configuration for the index (`settings` and `mappings`) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-create-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html # def create(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -48,7 +48,8 @@ def create(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}"], 'indices.create') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}"], :endpoint => 'indices.create' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb index d6b572c5ee..312bbc6e62 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the data stream # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def create_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,8 +44,8 @@ def create_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_data_stream/{name}"], - 'indices.create_data_stream') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_data_stream/{name}"], :endpoint => 'indices.create_data_stream' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb index 1c5d06b7fa..51962bfb87 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :name A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def data_streams_stats(arguments = {}) arguments = arguments.clone @@ -46,8 +46,8 @@ def data_streams_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_data_stream/_stats", "/_data_stream/{name}/_stats"], - 'indices.data_streams_stats') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_data_stream/_stats", "/_data_stream/{name}/_stats"], :endpoint => 'indices.data_streams_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb index 4ddbd16a28..371a12b320 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open, closed, or hidden indices (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-delete-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -51,12 +51,14 @@ def delete(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}"], 'indices.delete') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}"], :endpoint => 'indices.delete' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}"], 'indices.delete') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}"], :endpoint => 'indices.delete' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb index dad65856c9..9b32636bcc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def delete_alias(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,8 +52,8 @@ def delete_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], - 'indices.delete_alias') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], :endpoint => 'indices.delete_alias' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb index b573a4242a..81c9200e47 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb @@ -51,8 +51,8 @@ def delete_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_data_stream/{name}/_lifecycle"], - 'indices.delete_data_lifecycle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_data_stream/{name}/_lifecycle"], :endpoint => 'indices.delete_data_lifecycle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb index 9d2a5e63d2..f898b47a81 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def delete_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -45,8 +45,8 @@ def delete_data_stream(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_data_stream/{name}"], - 'indices.delete_data_stream') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_data_stream/{name}"], :endpoint => 'indices.delete_data_stream' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb index 792240d9d3..7aa6be8f00 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html # def delete_index_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -46,8 +46,8 @@ def delete_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_index_template/{name}"], - 'indices.delete_index_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_index_template/{name}"], :endpoint => 'indices.delete_index_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb index f0e8ebcaa9..fdd7811698 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html # def delete_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -48,13 +48,14 @@ def delete_template(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_template/{name}"], - 'indices.delete_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_template/{name}"], :endpoint => 'indices.delete_template' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_template/{name}"], 'indices.delete_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_template/{name}"], :endpoint => 'indices.delete_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb index 76f26ebec0..c4bc5e647e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-disk-usage.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-disk-usage.html # def disk_usage(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -53,7 +53,8 @@ def disk_usage(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_disk_usage"], 'indices.disk_usage') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_disk_usage"], :endpoint => 'indices.disk_usage' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb index 0a15e12d98..e7cc4b5c86 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The downsampling configuration (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/xpack-rollup.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html # def downsample(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -54,8 +54,8 @@ def downsample(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_downsample/{target_index}"], - 'indices.downsample') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_downsample/{target_index}"], :endpoint => 'indices.downsample' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb index d3069acab6..db88f3f3bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :include_defaults Whether to return all default setting for each of the indices. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-exists.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html # def exists(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -50,8 +50,8 @@ def exists(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, ["/{index}"], - 'indices.exists').status == 200 ? true : false + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}"], :endpoint => 'indices.exists' }).status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb index 78324141e8..a09ddef550 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def exists_alias(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -55,8 +55,8 @@ def exists_alias(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, ["/_alias/{name}", "/{index}/_alias/{name}"], - 'indices.exists_alias').status == 200 ? true : false + perform_request(method, path, params, body, headers, + { :path_templates => ["/_alias/{name}", "/{index}/_alias/{name}"], :endpoint => 'indices.exists_alias' }).status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb index 346d1d6254..31d4316bac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html # def exists_index_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -47,8 +47,8 @@ def exists_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_index_template/{name}"], - 'indices.exists_index_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_index_template/{name}"], :endpoint => 'indices.exists_index_template' }) ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb index e0c9a15a08..1955f2b731 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html # def exists_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -47,8 +47,8 @@ def exists_template(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, ["/_template/{name}"], - 'indices.exists_template').status == 200 ? true : false + perform_request(method, path, params, body, headers, + { :path_templates => ["/_template/{name}"], :endpoint => 'indices.exists_template' }).status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb index d5f86fffb9..658f5024da 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb @@ -50,8 +50,8 @@ def explain_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_lifecycle/explain"], - 'indices.explain_data_lifecycle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_lifecycle/explain"], :endpoint => 'indices.explain_data_lifecycle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb index 9f5191c72f..46215f1700 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/field-usage-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/field-usage-stats.html # def field_usage_stats(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,8 +52,8 @@ def field_usage_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_field_usage_stats"], - 'indices.field_usage_stats') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_field_usage_stats"], :endpoint => 'indices.field_usage_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb index 593c4bcbf7..3f377ff29f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-flush.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html # def flush(arguments = {}) arguments = arguments.clone @@ -51,7 +51,8 @@ def flush(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_flush", "/{index}/_flush"], 'indices.flush') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_flush", "/{index}/_flush"], :endpoint => 'indices.flush' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb index 0d5e1eeaef..9bb01b0ad2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Boolean] :wait_for_completion Should the request wait until the force merge is completed. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-forcemerge.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html # def forcemerge(arguments = {}) arguments = arguments.clone @@ -53,8 +53,8 @@ def forcemerge(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_forcemerge", "/{index}/_forcemerge"], - 'indices.forcemerge') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_forcemerge", "/{index}/_forcemerge"], :endpoint => 'indices.forcemerge' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb index e58afdd88d..07f327413b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for connection to master # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-get-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html # def get(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +52,8 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}"], 'indices.get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}"], :endpoint => 'indices.get' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb index 77277b08d5..a3e2a51e4d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def get_alias(arguments = {}) arguments = arguments.clone @@ -58,7 +58,7 @@ def get_alias(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_alias", "/_alias/{name}", "/{index}/_alias/{name}", "/{index}/_alias"], 'indices.get_alias') + { :path_templates => ["/_alias", "/_alias/{name}", "/{index}/_alias/{name}", "/{index}/_alias"], :endpoint => 'indices.get_alias' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb index c14b0c0b7c..67290e03b8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb @@ -50,8 +50,8 @@ def get_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_data_stream/{name}/_lifecycle"], - 'indices.get_data_lifecycle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_data_stream/{name}/_lifecycle"], :endpoint => 'indices.get_data_lifecycle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb index 10f34b3a83..bee12fc107 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :include_defaults Return all relevant default configurations for the data stream (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def get_data_stream(arguments = {}) arguments = arguments.clone @@ -48,8 +48,8 @@ def get_data_stream(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_data_stream", "/_data_stream/{name}"], - 'indices.get_data_stream') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_data_stream", "/_data_stream/{name}"], :endpoint => 'indices.get_data_stream' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb index dafb78690f..bd9012a7d6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-get-field-mapping.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html # def get_field_mapping(arguments = {}) arguments = arguments.clone @@ -56,7 +56,7 @@ def get_field_mapping(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}"], 'indices.get_field_mapping') + { :path_templates => ["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}"], :endpoint => 'indices.get_field_mapping' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb index 692fdda1d1..9ee989e418 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Boolean] :include_defaults Return all relevant default configurations for the index template (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html # def get_index_template(arguments = {}) arguments = arguments.clone @@ -50,8 +50,8 @@ def get_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_index_template", "/_index_template/{name}"], - 'indices.get_index_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_index_template", "/_index_template/{name}"], :endpoint => 'indices.get_index_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb index 33bcff1651..abfbd69016 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-get-mapping.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html # def get_mapping(arguments = {}) arguments = arguments.clone @@ -51,8 +51,8 @@ def get_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_mapping", "/{index}/_mapping"], - 'indices.get_mapping') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_mapping", "/{index}/_mapping"], :endpoint => 'indices.get_mapping' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb index 48039362a0..19b013e87b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :include_defaults Whether to return all default setting for each of the indices. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-get-settings.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html # def get_settings(arguments = {}) arguments = arguments.clone @@ -61,7 +61,7 @@ def get_settings(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_settings", "/{index}/_settings", "/{index}/_settings/{name}", "/_settings/{name}"], 'indices.get_settings') + { :path_templates => ["/_settings", "/{index}/_settings", "/{index}/_settings/{name}", "/_settings/{name}"], :endpoint => 'indices.get_settings' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb index 0014eebcae..531c2a72ad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html # def get_template(arguments = {}) arguments = arguments.clone @@ -49,8 +49,8 @@ def get_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_template", "/_template/{name}"], - 'indices.get_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_template", "/_template/{name}"], :endpoint => 'indices.get_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb index 8d0007301d..93cc132f50 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the alias to migrate # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def migrate_to_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,8 +44,8 @@ def migrate_to_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_data_stream/_migrate/{name}"], - 'indices.migrate_to_data_stream') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_data_stream/_migrate/{name}"], :endpoint => 'indices.migrate_to_data_stream' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb index 139ebed01c..9f145c4a22 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The data stream modifications (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def modify_data_stream(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def modify_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_data_stream/_modify"], - 'indices.modify_data_stream') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_data_stream/_modify"], :endpoint => 'indices.modify_data_stream' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb index 15fc480960..78c7510fac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [String] :wait_for_active_shards Sets the number of active shards to wait for before the operation returns. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-open-close.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html # def open(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -50,7 +50,8 @@ def open(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_open"], 'indices.open') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_open"], :endpoint => 'indices.open' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb index aa39358c0e..cb62312547 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :name The name of the data stream # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/data-streams.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html # def promote_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,8 +44,8 @@ def promote_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_data_stream/_promote/{name}"], - 'indices.promote_data_stream') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_data_stream/_promote/{name}"], :endpoint => 'indices.promote_data_stream' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb index e78b3eb01d..173f67b72a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The settings for the alias, such as `routing` or `filter` # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def put_alias(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -53,8 +53,8 @@ def put_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], - 'indices.put_alias') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], :endpoint => 'indices.put_alias' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb index 89c026a38b..4d197e6f03 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb @@ -52,8 +52,8 @@ def put_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_data_stream/{name}/_lifecycle"], - 'indices.put_data_lifecycle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_data_stream/{name}/_lifecycle"], :endpoint => 'indices.put_data_lifecycle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb index 3704bc5ab6..3661d7025f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The template definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html # def put_index_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,8 +49,8 @@ def put_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_index_template/{name}"], - 'indices.put_index_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_index_template/{name}"], :endpoint => 'indices.put_index_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb index 793b3f3f31..1cd9ee9754 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The mapping definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-put-mapping.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html # def put_mapping(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -52,7 +52,8 @@ def put_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_mapping"], 'indices.put_mapping') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_mapping"], :endpoint => 'indices.put_mapping' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb index 5da218da81..b15f81730e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The index settings to be updated (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-update-settings.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html # def put_settings(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -56,8 +56,8 @@ def put_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_settings", "/{index}/_settings"], - 'indices.put_settings') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_settings", "/{index}/_settings"], :endpoint => 'indices.put_settings' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb index b8b5c58079..3c0a4aa676 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The template definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html # def put_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,7 +49,8 @@ def put_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_template/{name}"], 'indices.put_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_template/{name}"], :endpoint => 'indices.put_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb index aa38cd3ac2..39da73e45e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :active_only Display only those recoveries that are currently on-going # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-recovery.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html # def recovery(arguments = {}) arguments = arguments.clone @@ -48,8 +48,8 @@ def recovery(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_recovery", "/{index}/_recovery"], - 'indices.recovery') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_recovery", "/{index}/_recovery"], :endpoint => 'indices.recovery' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb index 96a495b963..15f2b5df4f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-refresh.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html # def refresh(arguments = {}) arguments = arguments.clone @@ -49,7 +49,8 @@ def refresh(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_refresh", "/{index}/_refresh"], 'indices.refresh') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_refresh", "/{index}/_refresh"], :endpoint => 'indices.refresh' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb index 7d54940903..17eecf2712 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb @@ -28,10 +28,9 @@ module Actions # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [String] :resource changed resource to reload analyzers from if applicable # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-reload-analyzers.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-reload-analyzers.html # def reload_search_analyzers(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -48,8 +47,8 @@ def reload_search_analyzers(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_reload_search_analyzers"], - 'indices.reload_search_analyzers') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_reload_search_analyzers"], :endpoint => 'indices.reload_search_analyzers' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb index 2219d4dfd8..9f5c4069ff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open) (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-resolve-index-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-resolve-index-api.html # def resolve_index(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -45,8 +45,8 @@ def resolve_index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_resolve/index/{name}"], - 'indices.resolve_index') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_resolve/index/{name}"], :endpoint => 'indices.resolve_index' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index d0b206f2c7..ebf281d310 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The conditions that needs to be met for executing rollover # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-rollover-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html # def rollover(arguments = {}) raise ArgumentError, "Required argument 'alias' missing" unless arguments[:alias] @@ -57,8 +57,8 @@ def rollover(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{alias}/_rollover", "/{alias}/_rollover/{new_index}"], - 'indices.rollover') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{alias}/_rollover", "/{alias}/_rollover/{new_index}"], :endpoint => 'indices.rollover' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb index 15be627e5b..a1d073a841 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Boolean] :verbose Includes detailed memory usage by Lucene. *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-segments.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html # def segments(arguments = {}) arguments = arguments.clone @@ -50,8 +50,8 @@ def segments(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_segments", "/{index}/_segments"], - 'indices.segments') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_segments", "/{index}/_segments"], :endpoint => 'indices.segments' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb index 358c018bbd..fec8eb9f92 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-shards-stores.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html # def shard_stores(arguments = {}) arguments = arguments.clone @@ -50,8 +50,8 @@ def shard_stores(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_shard_stores", "/{index}/_shard_stores"], - 'indices.shard_stores') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_shard_stores", "/{index}/_shard_stores"], :endpoint => 'indices.shard_stores' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb index a2b1d7df21..e87780d590 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-shrink-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html # def shrink(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +52,8 @@ def shrink(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_shrink/{target}"], 'indices.shrink') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_shrink/{target}"], :endpoint => 'indices.shrink' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb index 00f9c9585f..d30410abda 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body New index template definition, which will be included in the simulation, as if it already exists in the system # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html # def simulate_index_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -49,8 +49,8 @@ def simulate_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_index_template/_simulate_index/{name}"], - 'indices.simulate_index_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_index_template/_simulate_index/{name}"], :endpoint => 'indices.simulate_index_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb index ecf6490313..87c42863e9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body New index template definition to be simulated, if no index template name is specified # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-templates.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html # def simulate_template(arguments = {}) arguments = arguments.clone @@ -52,7 +52,7 @@ def simulate_template(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_index_template/_simulate", "/_index_template/_simulate/{name}"], 'indices.simulate_template') + { :path_templates => ["/_index_template/_simulate", "/_index_template/_simulate/{name}"], :endpoint => 'indices.simulate_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb index f229397e4a..b130941ec7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-split-index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-split-index.html # def split(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -52,7 +52,8 @@ def split(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_split/{target}"], 'indices.split') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_split/{target}"], :endpoint => 'indices.split' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb index cc113aea1a..5539046fac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb @@ -37,7 +37,7 @@ module Actions # @option arguments [Boolean] :forbid_closed_indices If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html # def stats(arguments = {}) arguments = arguments.clone @@ -63,7 +63,7 @@ def stats(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_stats", "/_stats/{metric}", "/{index}/_stats", "/{index}/_stats/{metric}"], 'indices.stats') + { :path_templates => ["/_stats", "/_stats/{metric}", "/{index}/_stats", "/{index}/_stats/{metric}"], :endpoint => 'indices.stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb index 41c7a4ac08..dcba7103ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb @@ -38,7 +38,7 @@ module Actions # Deprecated since version 7.14.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/unfreeze-index-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html # def unfreeze(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -55,7 +55,8 @@ def unfreeze(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_unfreeze"], 'indices.unfreeze') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_unfreeze"], :endpoint => 'indices.unfreeze' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb index 19d7a3944a..dbd09e81dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The definition of `actions` to perform (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/indices-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html # def update_aliases(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -44,7 +44,8 @@ def update_aliases(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_aliases"], 'indices.update_aliases') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_aliases"], :endpoint => 'indices.update_aliases' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb index f123d02b86..aeb9ffdfe1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb @@ -40,7 +40,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The query definition specified with the Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-validate.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-validate.html # def validate_query(arguments = {}) arguments = arguments.clone @@ -64,8 +64,8 @@ def validate_query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_validate/query", "/{index}/_validate/query"], - 'indices.validate_query') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_validate/query", "/{index}/_validate/query"], :endpoint => 'indices.validate_query' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb index 56b10b80fe..3a440580c4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb @@ -25,7 +25,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html # def info(arguments = {}) arguments = arguments.clone @@ -38,7 +38,7 @@ def info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/"], 'info') + perform_request(method, path, params, body, headers, { :path_templates => ["/"], :endpoint => 'info' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb index f65a3f7277..fc5cc57552 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-pipeline-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-pipeline-api.html # def delete_pipeline(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,8 +46,8 @@ def delete_pipeline(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ingest/pipeline/{id}"], - 'ingest.delete_pipeline') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ingest/pipeline/{id}"], :endpoint => 'ingest.delete_pipeline' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb index 8121056adc..8fdeebb8d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/geoip-stats-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-stats-api.html # def geo_ip_stats(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def geo_ip_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ingest/geoip/stats"], 'ingest.geo_ip_stats') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ingest/geoip/stats"], :endpoint => 'ingest.geo_ip_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb index 9d2544a992..cf5ce889c9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-pipeline-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-pipeline-api.html # def get_pipeline(arguments = {}) arguments = arguments.clone @@ -48,8 +48,8 @@ def get_pipeline(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ingest/pipeline", "/_ingest/pipeline/{id}"], - 'ingest.get_pipeline') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ingest/pipeline", "/_ingest/pipeline/{id}"], :endpoint => 'ingest.get_pipeline' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb index a68b9d3fb8..9a684ae171 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/grok-processor.html#grok-processor-rest-get + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html#grok-processor-rest-get # def processor_grok(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def processor_grok(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ingest/processor/grok"], 'ingest.processor_grok') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ingest/processor/grok"], :endpoint => 'ingest.processor_grok' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb index a529816d92..03ea7854d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The ingest definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-pipeline-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-pipeline-api.html # def put_pipeline(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,8 +49,8 @@ def put_pipeline(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ingest/pipeline/{id}"], - 'ingest.put_pipeline') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ingest/pipeline/{id}"], :endpoint => 'ingest.put_pipeline' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb index e25bd47999..8235f39a06 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The simulate definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/simulate-pipeline-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/simulate-pipeline-api.html # def simulate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -51,7 +51,7 @@ def simulate(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ingest/pipeline/_simulate", "/_ingest/pipeline/{id}/_simulate"], 'ingest.simulate') + { :path_templates => ["/_ingest/pipeline/_simulate", "/_ingest/pipeline/{id}/_simulate"], :endpoint => 'ingest.simulate' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb index 1e629e2af5..07a02f11e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html # def knn_search(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -54,7 +54,8 @@ def knn_search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_knn_search"], 'knn_search') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_knn_search"], :endpoint => 'knn_search' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb index cc051e9eb7..00188004bf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-license.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-license.html # def delete(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_license"], 'license.delete') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_license"], :endpoint => 'license.delete' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb index bab6308483..a23e0bd152 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :accept_enterprise Supported for backwards compatibility with 7.x. If this param is used it must be set to true *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-license.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-license.html # def get(arguments = {}) arguments = arguments.clone @@ -41,7 +41,8 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_license"], 'license.get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_license"], :endpoint => 'license.get' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb index 87887ea411..d969717f68 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-basic-status.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-basic-status.html # def get_basic_status(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def get_basic_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_license/basic_status"], 'license.get_basic_status') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_license/basic_status"], :endpoint => 'license.get_basic_status' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb index 40719882ce..6c40b6cf23 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-trial-status.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trial-status.html # def get_trial_status(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def get_trial_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_license/trial_status"], 'license.get_trial_status') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_license/trial_status"], :endpoint => 'license.get_trial_status' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb index b95394872d..449e160dea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body licenses to be installed # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/update-license.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-license.html # def post(arguments = {}) arguments = arguments.clone @@ -41,7 +41,8 @@ def post(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_license"], 'license.post') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_license"], :endpoint => 'license.post' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb index 23af7cfaf8..80e037f853 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/start-basic.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-basic.html # def post_start_basic(arguments = {}) arguments = arguments.clone @@ -40,7 +40,8 @@ def post_start_basic(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_license/start_basic"], 'license.post_start_basic') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_license/start_basic"], :endpoint => 'license.post_start_basic' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb index 1fcddd7241..44227e5f7e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/start-trial.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trial.html # def post_start_trial(arguments = {}) arguments = arguments.clone @@ -41,7 +41,8 @@ def post_start_trial(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_license/start_trial"], 'license.post_start_trial') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_license/start_trial"], :endpoint => 'license.post_start_trial' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb index e784b52cbb..c7503fc9ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The ID of the Pipeline # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/logstash-api-delete-pipeline.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html # def delete_pipeline(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,8 +44,8 @@ def delete_pipeline(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_logstash/pipeline/{id}"], - 'logstash.delete_pipeline') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_logstash/pipeline/{id}"], :endpoint => 'logstash.delete_pipeline' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb index e2aac07b5c..e4231f4094 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id A comma-separated list of Pipeline IDs # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/logstash-api-get-pipeline.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html # def get_pipeline(arguments = {}) arguments = arguments.clone @@ -46,8 +46,8 @@ def get_pipeline(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_logstash/pipeline", "/_logstash/pipeline/{id}"], - 'logstash.get_pipeline') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_logstash/pipeline", "/_logstash/pipeline/{id}"], :endpoint => 'logstash.get_pipeline' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb index 8bebc4f994..974bb8737f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The Pipeline to add or update (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/logstash-api-put-pipeline.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html # def put_pipeline(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,8 +46,8 @@ def put_pipeline(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_logstash/pipeline/{id}"], - 'logstash.put_pipeline') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_logstash/pipeline/{id}"], :endpoint => 'logstash.put_pipeline' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb index c03e83e35d..a68066532e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :model_id The unique identifier of the trained model. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/clear-trained-model-deployment-cache.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-trained-model-deployment-cache.html # def clear_trained_model_deployment_cache(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -44,8 +44,8 @@ def clear_trained_model_deployment_cache(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}/deployment/cache/_clear"], - 'ml.clear_trained_model_deployment_cache') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/trained_models/{model_id}/deployment/cache/_clear"], :endpoint => 'ml.clear_trained_model_deployment_cache' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb index b9b444ddad..d3087f1c86 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The URL params optionally sent in the body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-close-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html # def close_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -48,8 +48,8 @@ def close_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_close"], - 'ml.close_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_close"], :endpoint => 'ml.close_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb index 5ee6793881..493f6b755b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :calendar_id The ID of the calendar to delete # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-calendar.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html # def delete_calendar(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -44,8 +44,8 @@ def delete_calendar(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}"], - 'ml.delete_calendar') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/calendars/{calendar_id}"], :endpoint => 'ml.delete_calendar' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb index 916e7be7d7..1db96e8df1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :event_id The ID of the event to remove from the calendar # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-calendar-event.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html # def delete_calendar_event(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -48,8 +48,8 @@ def delete_calendar_event(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}/events/{event_id}"], - 'ml.delete_calendar_event') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/calendars/{calendar_id}/events/{event_id}"], :endpoint => 'ml.delete_calendar_event' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb index 7c7fac1d40..6917473f3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :job_id The ID of the job to remove from the calendar # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-calendar-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html # def delete_calendar_job(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -48,8 +48,8 @@ def delete_calendar_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}/jobs/{job_id}"], - 'ml.delete_calendar_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/calendars/{calendar_id}/jobs/{job_id}"], :endpoint => 'ml.delete_calendar_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb index 808fa9a2a5..047c296b11 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb @@ -29,7 +29,7 @@ module Actions # @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 https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html # def delete_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,8 +46,8 @@ def delete_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/data_frame/analytics/{id}"], - 'ml.delete_data_frame_analytics') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/data_frame/analytics/{id}"], :endpoint => 'ml.delete_data_frame_analytics' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb index 98f5a024b9..94310528de 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :force True if the datafeed should be forcefully deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html # def delete_datafeed(arguments = {}) raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] @@ -45,8 +45,8 @@ def delete_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/datafeeds/{datafeed_id}"], - 'ml.delete_datafeed') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/datafeeds/{datafeed_id}"], :endpoint => 'ml.delete_datafeed' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb index 140711875d..3d4d27b8ed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body deleting expired data parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-expired-data.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html # def delete_expired_data(arguments = {}) arguments = arguments.clone @@ -50,7 +50,7 @@ def delete_expired_data(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/_delete_expired_data/{job_id}", "/_ml/_delete_expired_data"], 'ml.delete_expired_data') + { :path_templates => ["/_ml/_delete_expired_data/{job_id}", "/_ml/_delete_expired_data"], :endpoint => 'ml.delete_expired_data' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb index 0eff9a3dc4..5ca2f57b23 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :filter_id The ID of the filter to delete # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-filter.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html # def delete_filter(arguments = {}) raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id] @@ -44,7 +44,8 @@ def delete_filter(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/filters/{filter_id}"], 'ml.delete_filter') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/filters/{filter_id}"], :endpoint => 'ml.delete_filter' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb index 2f9b59b472..e2f8282812 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb @@ -30,7 +30,7 @@ module Actions # @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 https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-forecast.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html # def delete_forecast(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -54,7 +54,7 @@ def delete_forecast(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/anomaly_detectors/{job_id}/_forecast", "/_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}"], 'ml.delete_forecast') + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_forecast", "/_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}"], :endpoint => 'ml.delete_forecast' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb index 3415a13f8b..381c8fca55 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :delete_user_annotations Should annotations added by the user be deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html # def delete_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -47,8 +47,8 @@ def delete_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}"], - 'ml.delete_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/{job_id}"], :endpoint => 'ml.delete_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb index 55d9fe48ea..d49ed41c81 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :snapshot_id The ID of the snapshot to delete # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-delete-snapshot.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html # def delete_model_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -49,7 +49,7 @@ def delete_model_snapshot(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}"], 'ml.delete_model_snapshot') + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}"], :endpoint => 'ml.delete_model_snapshot' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb index c7b4f33517..f5678aea1c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :force True if the model should be forcefully deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-trained-models.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html # def delete_trained_model(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -46,8 +46,8 @@ def delete_trained_model(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}"], - 'ml.delete_trained_model') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/trained_models/{model_id}"], :endpoint => 'ml.delete_trained_model' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb index 2e83bb339c..1481e15475 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :model_id The trained model where the model alias is assigned # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-trained-models-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html # def delete_trained_model_alias(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -49,7 +49,7 @@ def delete_trained_model_alias(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/trained_models/{model_id}/model_aliases/{model_alias}"], 'ml.delete_trained_model_alias') + { :path_templates => ["/_ml/trained_models/{model_id}/model_aliases/{model_alias}"], :endpoint => 'ml.delete_trained_model_alias' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb index 5217e55dbe..746975593e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The analysis config, plus cardinality estimates for fields it references (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html # def estimate_model_memory(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def estimate_model_memory(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/_estimate_model_memory"], - 'ml.estimate_model_memory') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/_estimate_model_memory"], :endpoint => 'ml.estimate_model_memory' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb index 9d7da9c117..13066c07c8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The evaluation definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/evaluate-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html # def evaluate_data_frame(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def evaluate_data_frame(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/data_frame/_evaluate"], - 'ml.evaluate_data_frame') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/data_frame/_evaluate"], :endpoint => 'ml.evaluate_data_frame' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb index 75bc216a44..070862767d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The data frame analytics config to explain # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/8.10/explain-dfanalytics.html + # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html # def explain_data_frame_analytics(arguments = {}) arguments = arguments.clone @@ -53,7 +53,7 @@ def explain_data_frame_analytics(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/data_frame/analytics/_explain", "/_ml/data_frame/analytics/{id}/_explain"], 'ml.explain_data_frame_analytics') + { :path_templates => ["/_ml/data_frame/analytics/_explain", "/_ml/data_frame/analytics/{id}/_explain"], :endpoint => 'ml.explain_data_frame_analytics' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb index 6a31bf4029..79e9d94c96 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Flush parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-flush-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html # def flush_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -50,8 +50,8 @@ def flush_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_flush"], - 'ml.flush_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_flush"], :endpoint => 'ml.flush_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb index f4d12b0d3a..16e794bb84 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Query parameters can be specified in the body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-forecast.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html # def forecast(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -48,8 +48,8 @@ def forecast(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_forecast"], - 'ml.forecast') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_forecast"], :endpoint => 'ml.forecast' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb index c950894bf1..7cb4139fef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb @@ -38,7 +38,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Bucket selection details if not provided in URI # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-bucket.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html # def get_buckets(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -67,7 +67,7 @@ def get_buckets(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}", "/_ml/anomaly_detectors/{job_id}/results/buckets"], 'ml.get_buckets') + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}", "/_ml/anomaly_detectors/{job_id}/results/buckets"], :endpoint => 'ml.get_buckets' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb index 0c3f2ae1fd..fd9b13ffc5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Integer] :size Specifies a max number of events to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-calendar-event.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html # def get_calendar_events(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -49,8 +49,8 @@ def get_calendar_events(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}/events"], - 'ml.get_calendar_events') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/calendars/{calendar_id}/events"], :endpoint => 'ml.get_calendar_events' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb index 461f1d7412..e27051d6d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The from and size parameters optionally sent in the body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-calendar.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html # def get_calendars(arguments = {}) arguments = arguments.clone @@ -54,8 +54,8 @@ def get_calendars(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/calendars", "/_ml/calendars/{calendar_id}"], - 'ml.get_calendars') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/calendars", "/_ml/calendars/{calendar_id}"], :endpoint => 'ml.get_calendars' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb index ed1a4d7b0f..f6b2823cae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Category selection details if not provided in URI # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-category.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html # def get_categories(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -61,7 +61,7 @@ def get_categories(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/anomaly_detectors/{job_id}/results/categories/{category_id}", "/_ml/anomaly_detectors/{job_id}/results/categories/"], 'ml.get_categories') + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/results/categories/{category_id}", "/_ml/anomaly_detectors/{job_id}/results/categories/"], :endpoint => 'ml.get_categories' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb index 86fc3e8bf5..644c3aea16 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb @@ -31,7 +31,7 @@ module Actions # @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 https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html # def get_data_frame_analytics(arguments = {}) arguments = arguments.clone @@ -51,7 +51,7 @@ def get_data_frame_analytics(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/data_frame/analytics/{id}", "/_ml/data_frame/analytics"], 'ml.get_data_frame_analytics') + { :path_templates => ["/_ml/data_frame/analytics/{id}", "/_ml/data_frame/analytics"], :endpoint => 'ml.get_data_frame_analytics' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb index 736aa849a8..f63767657a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Boolean] :verbose whether the stats response should be verbose # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-dfanalytics-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html # def get_data_frame_analytics_stats(arguments = {}) arguments = arguments.clone @@ -51,7 +51,7 @@ def get_data_frame_analytics_stats(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/data_frame/analytics/_stats", "/_ml/data_frame/analytics/{id}/_stats"], 'ml.get_data_frame_analytics_stats') + { :path_templates => ["/_ml/data_frame/analytics/_stats", "/_ml/data_frame/analytics/{id}/_stats"], :endpoint => 'ml.get_data_frame_analytics_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb index cdf34fecfb..24c6811001 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb @@ -28,7 +28,7 @@ module Actions # @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 [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-datafeed-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html # def get_datafeed_stats(arguments = {}) arguments = arguments.clone @@ -48,7 +48,7 @@ def get_datafeed_stats(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/datafeeds/{datafeed_id}/_stats", "/_ml/datafeeds/_stats"], 'ml.get_datafeed_stats') + { :path_templates => ["/_ml/datafeeds/{datafeed_id}/_stats", "/_ml/datafeeds/_stats"], :endpoint => 'ml.get_datafeed_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb index 810307655f..89104bb41f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on datafeed PUT # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html # def get_datafeeds(arguments = {}) arguments = arguments.clone @@ -48,8 +48,8 @@ def get_datafeeds(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/datafeeds/{datafeed_id}", "/_ml/datafeeds"], - 'ml.get_datafeeds') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/datafeeds/{datafeed_id}", "/_ml/datafeeds"], :endpoint => 'ml.get_datafeeds' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb index 9483b31940..32f8097982 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of filters to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-filter.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html # def get_filters(arguments = {}) arguments = arguments.clone @@ -48,8 +48,8 @@ def get_filters(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/filters", "/_ml/filters/{filter_id}"], - 'ml.get_filters') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/filters", "/_ml/filters/{filter_id}"], :endpoint => 'ml.get_filters' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb index 4ae675c287..3bc833ba11 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Influencer selection criteria # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-influencer.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html # def get_influencers(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -58,8 +58,8 @@ def get_influencers(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/results/influencers"], - 'ml.get_influencers') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/results/influencers"], :endpoint => 'ml.get_influencers' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb index 3b87a2135c..b9f43ef0d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb @@ -28,7 +28,7 @@ module Actions # @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 [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-job-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html # def get_job_stats(arguments = {}) arguments = arguments.clone @@ -48,7 +48,7 @@ def get_job_stats(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/anomaly_detectors/_stats", "/_ml/anomaly_detectors/{job_id}/_stats"], 'ml.get_job_stats') + { :path_templates => ["/_ml/anomaly_detectors/_stats", "/_ml/anomaly_detectors/{job_id}/_stats"], :endpoint => 'ml.get_job_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb index 5006f08dc0..92c9b6595f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on job PUT # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html # def get_jobs(arguments = {}) arguments = arguments.clone @@ -49,7 +49,7 @@ def get_jobs(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/anomaly_detectors/{job_id}", "/_ml/anomaly_detectors"], 'ml.get_jobs') + { :path_templates => ["/_ml/anomaly_detectors/{job_id}", "/_ml/anomaly_detectors"], :endpoint => 'ml.get_jobs' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb index b6fcbb69c2..e7ba7b1452 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-ml-memory.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html # def get_memory_stats(arguments = {}) arguments = arguments.clone @@ -48,8 +48,8 @@ def get_memory_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/memory/_stats", "/_ml/memory/{node_id}/_stats"], - 'ml.get_memory_stats') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/memory/_stats", "/_ml/memory/{node_id}/_stats"], :endpoint => 'ml.get_memory_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb index 4763e87947..282792cb0a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs or no snapshots. (This includes the `_all` string.) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-job-model-snapshot-upgrade-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html # def get_model_snapshot_upgrade_stats(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -50,7 +50,7 @@ def get_model_snapshot_upgrade_stats(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade/_stats"], 'ml.get_model_snapshot_upgrade_stats') + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade/_stats"], :endpoint => 'ml.get_model_snapshot_upgrade_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb index 3f82c875cc..ea1eaf3811 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Model snapshot selection criteria # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-snapshot.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html # def get_model_snapshots(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -64,7 +64,7 @@ def get_model_snapshots(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}", "/_ml/anomaly_detectors/{job_id}/model_snapshots"], 'ml.get_model_snapshots') + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}", "/_ml/anomaly_detectors/{job_id}/model_snapshots"], :endpoint => 'ml.get_model_snapshots' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb index b2077fabd9..c7aeb00d24 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Overall bucket selection details if not provided in URI # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-overall-buckets.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html # def get_overall_buckets(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -57,8 +57,8 @@ def get_overall_buckets(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/results/overall_buckets"], - 'ml.get_overall_buckets') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/results/overall_buckets"], :endpoint => 'ml.get_overall_buckets' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb index e2839bd551..a10d2af940 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Record selection criteria # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-get-record.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html # def get_records(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -58,8 +58,8 @@ def get_records(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/results/records"], - 'ml.get_records') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/results/records"], :endpoint => 'ml.get_records' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb index 56552825d2..89438cd8c9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on model PUT # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-trained-models.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html # def get_trained_models(arguments = {}) arguments = arguments.clone @@ -54,8 +54,8 @@ def get_trained_models(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}", "/_ml/trained_models"], - 'ml.get_trained_models') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/trained_models/{model_id}", "/_ml/trained_models"], :endpoint => 'ml.get_trained_models' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb index 10834fe770..8942668dae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of trained models to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-trained-models-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html # def get_trained_models_stats(arguments = {}) arguments = arguments.clone @@ -50,7 +50,7 @@ def get_trained_models_stats(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/trained_models/{model_id}/_stats", "/_ml/trained_models/_stats"], 'ml.get_trained_models_stats') + { :path_templates => ["/_ml/trained_models/{model_id}/_stats", "/_ml/trained_models/_stats"], :endpoint => 'ml.get_trained_models_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb index 76f6a065fb..21789f10ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb @@ -34,7 +34,7 @@ module Actions # Deprecated since version 8.3.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/infer-trained-model.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-trained-model.html # def infer_trained_model(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -55,7 +55,7 @@ def infer_trained_model(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/trained_models/{model_id}/_infer", "/_ml/trained_models/{model_id}/deployment/_infer"], 'ml.infer_trained_model') + { :path_templates => ["/_ml/trained_models/{model_id}/_infer", "/_ml/trained_models/{model_id}/deployment/_infer"], :endpoint => 'ml.infer_trained_model' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb index 8d2fde628e..6cdd9a65e1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-ml-info.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html # def info(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/info"], 'ml.info') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/info"], :endpoint => 'ml.info' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb index 6155d5d425..526aeec920 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Query parameters can be specified in the body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-open-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html # def open_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -45,8 +45,8 @@ def open_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_open"], - 'ml.open_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_open"], :endpoint => 'ml.open_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb index 23efc21a08..c7d3370aa3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body A list of events (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-post-calendar-event.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html # def post_calendar_events(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,8 +46,8 @@ def post_calendar_events(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}/events"], - 'ml.post_calendar_events') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/calendars/{calendar_id}/events"], :endpoint => 'ml.post_calendar_events' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb index 1d1e474fc8..ebce105156 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The data to process (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-post-data.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html # def post_data(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -48,8 +48,8 @@ def post_data(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_data"], - 'ml.post_data') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_data"], :endpoint => 'ml.post_data' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb index 807b21ab97..bee19f3a52 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The data frame analytics config to preview # - # @see http://www.elastic.co/guide/en/elasticsearch/reference/8.10/preview-dfanalytics.html + # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html # def preview_data_frame_analytics(arguments = {}) arguments = arguments.clone @@ -53,7 +53,7 @@ def preview_data_frame_analytics(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/data_frame/analytics/_preview", "/_ml/data_frame/analytics/{id}/_preview"], 'ml.preview_data_frame_analytics') + { :path_templates => ["/_ml/data_frame/analytics/_preview", "/_ml/data_frame/analytics/{id}/_preview"], :endpoint => 'ml.preview_data_frame_analytics' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb index 5934513517..4bf5a7c964 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The datafeed config and job config with which to execute the preview # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-preview-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html # def preview_datafeed(arguments = {}) arguments = arguments.clone @@ -55,7 +55,7 @@ def preview_datafeed(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/datafeeds/{datafeed_id}/_preview", "/_ml/datafeeds/_preview"], 'ml.preview_datafeed') + { :path_templates => ["/_ml/datafeeds/{datafeed_id}/_preview", "/_ml/datafeeds/_preview"], :endpoint => 'ml.preview_datafeed' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb index 6275329588..2dcde5ad07 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The calendar details # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-put-calendar.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html # def put_calendar(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -45,8 +45,8 @@ def put_calendar(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}"], - 'ml.put_calendar') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/calendars/{calendar_id}"], :endpoint => 'ml.put_calendar' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb index 069b819f32..d0f1cfecb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :job_id The ID of the job to add to the calendar # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-put-calendar-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html # def put_calendar_job(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] @@ -48,8 +48,8 @@ def put_calendar_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/calendars/{calendar_id}/jobs/{job_id}"], - 'ml.put_calendar_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/calendars/{calendar_id}/jobs/{job_id}"], :endpoint => 'ml.put_calendar_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb index 0bbb504e17..16d97541c4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The data frame analytics configuration (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html # def put_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,8 +46,8 @@ def put_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/data_frame/analytics/{id}"], - 'ml.put_data_frame_analytics') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/data_frame/analytics/{id}"], :endpoint => 'ml.put_data_frame_analytics' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb index abd21d44b8..8764d2204b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The datafeed config (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-put-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html # def put_datafeed(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,8 +50,8 @@ def put_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/datafeeds/{datafeed_id}"], - 'ml.put_datafeed') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/datafeeds/{datafeed_id}"], :endpoint => 'ml.put_datafeed' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb index 908c82d51d..577017641d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The filter details (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-put-filter.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html # def put_filter(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,7 +46,8 @@ def put_filter(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/filters/{filter_id}"], 'ml.put_filter') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/filters/{filter_id}"], :endpoint => 'ml.put_filter' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb index f1bf3810ed..0b13f70a0b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The job (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-put-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html # def put_job(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,8 +50,8 @@ def put_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}"], - 'ml.put_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/{job_id}"], :endpoint => 'ml.put_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb index 5acffb75c3..037879488d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The trained model configuration (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-trained-models.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html # def put_trained_model(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -48,8 +48,8 @@ def put_trained_model(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}"], - 'ml.put_trained_model') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/trained_models/{model_id}"], :endpoint => 'ml.put_trained_model' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb index d99e74267e..63848996cd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb @@ -29,7 +29,7 @@ module Actions # @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 https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-trained-models-aliases.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html # def put_trained_model_alias(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -50,7 +50,7 @@ def put_trained_model_alias(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/trained_models/{model_id}/model_aliases/{model_alias}"], 'ml.put_trained_model_alias') + { :path_templates => ["/_ml/trained_models/{model_id}/model_aliases/{model_alias}"], :endpoint => 'ml.put_trained_model_alias' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb index ed30a60666..34f7dac9d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The trained model definition part (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-trained-model-definition-part.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html # def put_trained_model_definition_part(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,8 +50,8 @@ def put_trained_model_definition_part(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}/definition/{part}"], - 'ml.put_trained_model_definition_part') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/trained_models/{model_id}/definition/{part}"], :endpoint => 'ml.put_trained_model_definition_part' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb index dfb4356cf4..8506a662b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The trained model vocabulary (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-trained-model-vocabulary.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html # def put_trained_model_vocabulary(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,8 +46,8 @@ def put_trained_model_vocabulary(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}/vocabulary"], - 'ml.put_trained_model_vocabulary') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/trained_models/{model_id}/vocabulary"], :endpoint => 'ml.put_trained_model_vocabulary' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb index 106876c955..3c7db074ec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :delete_user_annotations Should annotations added by the user be deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-reset-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html # def reset_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -46,8 +46,8 @@ def reset_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_reset"], - 'ml.reset_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_reset"], :endpoint => 'ml.reset_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb index 2ed623eb6e..0a59fc5dde 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Reversion options # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-revert-snapshot.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html # def revert_model_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -51,7 +51,7 @@ def revert_model_snapshot(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert"], 'ml.revert_model_snapshot') + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert"], :endpoint => 'ml.revert_model_snapshot' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb index aba8d9b5c6..9500299496 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb @@ -28,7 +28,7 @@ module Actions # @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 https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-set-upgrade-mode.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html # def set_upgrade_mode(arguments = {}) arguments = arguments.clone @@ -41,7 +41,8 @@ def set_upgrade_mode(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/set_upgrade_mode"], 'ml.set_upgrade_mode') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/set_upgrade_mode"], :endpoint => 'ml.set_upgrade_mode' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb index a2e44ca7e7..554a691fd1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The start data frame analytics parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/start-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html # def start_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,8 +46,8 @@ def start_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/data_frame/analytics/{id}/_start"], - 'ml.start_data_frame_analytics') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/data_frame/analytics/{id}/_start"], :endpoint => 'ml.start_data_frame_analytics' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb index b5bebb5056..9505603844 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The start datafeed parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-start-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html # def start_datafeed(arguments = {}) raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] @@ -48,8 +48,8 @@ def start_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/datafeeds/{datafeed_id}/_start"], - 'ml.start_datafeed') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/datafeeds/{datafeed_id}/_start"], :endpoint => 'ml.start_datafeed' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb index 965f26e7bd..df6134738c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [String] :wait_for The allocation status for which to wait (options: starting, started, fully_allocated) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/start-trained-model-deployment.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trained-model-deployment.html # def start_trained_model_deployment(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -52,8 +52,8 @@ def start_trained_model_deployment(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}/deployment/_start"], - 'ml.start_trained_model_deployment') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/trained_models/{model_id}/deployment/_start"], :endpoint => 'ml.start_trained_model_deployment' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb index 16102a6ecc..ff0b1610fc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The stop data frame analytics parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/stop-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html # def stop_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -48,8 +48,8 @@ def stop_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/data_frame/analytics/{id}/_stop"], - 'ml.stop_data_frame_analytics') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/data_frame/analytics/{id}/_stop"], :endpoint => 'ml.stop_data_frame_analytics' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb index 38cb890d2c..b3ac123e10 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The URL params optionally sent in the body # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-stop-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html # def stop_datafeed(arguments = {}) raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] @@ -49,8 +49,8 @@ def stop_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/datafeeds/{datafeed_id}/_stop"], - 'ml.stop_datafeed') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/datafeeds/{datafeed_id}/_stop"], :endpoint => 'ml.stop_datafeed' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb index ec9d28861c..022c5ed9ca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The stop deployment parameters # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/stop-trained-model-deployment.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-trained-model-deployment.html # def stop_trained_model_deployment(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] @@ -47,8 +47,8 @@ def stop_trained_model_deployment(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}/deployment/_stop"], - 'ml.stop_trained_model_deployment') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/trained_models/{model_id}/deployment/_stop"], :endpoint => 'ml.stop_trained_model_deployment' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb index 8e739e8ad0..899339c214 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The data frame analytics settings to update (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/update-dfanalytics.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html # def update_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,8 +46,8 @@ def update_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/data_frame/analytics/{id}/_update"], - 'ml.update_data_frame_analytics') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/data_frame/analytics/{id}/_update"], :endpoint => 'ml.update_data_frame_analytics' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb index 36b2f702d3..8902566526 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The datafeed update settings (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-update-datafeed.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html # def update_datafeed(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,8 +50,8 @@ def update_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/datafeeds/{datafeed_id}/_update"], - 'ml.update_datafeed') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/datafeeds/{datafeed_id}/_update"], :endpoint => 'ml.update_datafeed' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb index f19af6b3d9..bf8c5f5b40 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The filter update (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-update-filter.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html # def update_filter(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,8 +46,8 @@ def update_filter(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/filters/{filter_id}/_update"], - 'ml.update_filter') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/filters/{filter_id}/_update"], :endpoint => 'ml.update_filter' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb index 16a7c594b2..8d89218738 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The job update settings (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-update-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html # def update_job(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,8 +46,8 @@ def update_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/{job_id}/_update"], - 'ml.update_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_update"], :endpoint => 'ml.update_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb index eb0740ccc9..e4dc3bc5e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The model snapshot properties to update (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-update-snapshot.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html # def update_model_snapshot(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -51,7 +51,7 @@ def update_model_snapshot(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update"], 'ml.update_model_snapshot') + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update"], :endpoint => 'ml.update_model_snapshot' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb index ac1e9b993d..48e43ae950 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The updated trained model deployment settings (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/update-trained-model-deployment.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html # def update_trained_model_deployment(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,8 +50,8 @@ def update_trained_model_deployment(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/trained_models/{model_id}/deployment/_update"], - 'ml.update_trained_model_deployment') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/trained_models/{model_id}/deployment/_update"], :endpoint => 'ml.update_trained_model_deployment' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb index eefa430727..9f17dc9808 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb @@ -30,7 +30,7 @@ module Actions # @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 https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ml-upgrade-job-model-snapshot.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html # def upgrade_job_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] @@ -51,7 +51,7 @@ def upgrade_job_snapshot(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade"], 'ml.upgrade_job_snapshot') + { :path_templates => ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade"], :endpoint => 'ml.upgrade_job_snapshot' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb index 9b75376337..a45509b6c4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The job config (*Required*) # - # @see https://www.elastic.co/guide/en/machine-learning/8.10/ml-jobs.html + # @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html # def validate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def validate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/_validate"], - 'ml.validate') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/_validate"], :endpoint => 'ml.validate' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb index 1cda144f33..832125493b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The detector (*Required*) # - # @see https://www.elastic.co/guide/en/machine-learning/8.10/ml-jobs.html + # @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html # def validate_detector(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def validate_detector(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ml/anomaly_detectors/_validate/detector"], - 'ml.validate_detector') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ml/anomaly_detectors/_validate/detector"], :endpoint => 'ml.validate_detector' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb index aae04c0b89..2f287ec1bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-multi-get.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html # def mget(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -57,7 +57,8 @@ def mget(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_mget", "/{index}/_mget"], 'mget') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_mget", "/{index}/_mget"], :endpoint => 'mget' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb index 547f2462c7..2ba3f26382 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :index Index pattern # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/migration-api-deprecation.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html # def deprecations(arguments = {}) arguments = arguments.clone @@ -47,7 +47,7 @@ def deprecations(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_migration/deprecations", "/{index}/_migration/deprecations"], 'migration.deprecations') + { :path_templates => ["/_migration/deprecations", "/{index}/_migration/deprecations"], :endpoint => 'migration.deprecations' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb index 6d1beb7ae7..4cd354d19c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/migration-api-feature-upgrade.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html # def get_feature_upgrade_status(arguments = {}) arguments = arguments.clone @@ -39,8 +39,8 @@ def get_feature_upgrade_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_migration/system_features"], - 'migration.get_feature_upgrade_status') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_migration/system_features"], :endpoint => 'migration.get_feature_upgrade_status' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb index d5b452cf38..db21766cec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/migration-api-feature-upgrade.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html # def post_feature_upgrade(arguments = {}) arguments = arguments.clone @@ -39,8 +39,8 @@ def post_feature_upgrade(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_migration/system_features"], - 'migration.post_feature_upgrade') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_migration/system_features"], :endpoint => 'migration.post_feature_upgrade' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb index cb790395ed..59792beaef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb @@ -37,7 +37,7 @@ module Actions # Deprecated since version 7.0.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/monitor-elasticsearch-cluster.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/monitor-elasticsearch-cluster.html # def bulk(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -65,8 +65,8 @@ def bulk(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, ["/_monitoring/bulk", "/_monitoring/{type}/bulk"], - 'monitoring.bulk') + perform_request(method, path, params, payload, headers, + { :path_templates => ["/_monitoring/bulk", "/_monitoring/{type}/bulk"], :endpoint => 'monitoring.bulk' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb index 62cab04ac4..d984a9bda7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request definitions (metadata-search request definition pairs), separated by newlines (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-multi-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html # def msearch(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -78,7 +78,8 @@ def msearch(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, ["/_msearch", "/{index}/_msearch"], 'msearch') + perform_request(method, path, params, payload, headers, + { :path_templates => ["/_msearch", "/{index}/_msearch"], :endpoint => 'msearch' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb index 3321500f23..0e68c56b6f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request definitions (metadata-search request definition pairs), separated by newlines (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-multi-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html # def msearch_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -64,8 +64,8 @@ def msearch_template(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, ["/_msearch/template", "/{index}/_msearch/template"], - 'msearch_template') + perform_request(method, path, params, payload, headers, + { :path_templates => ["/_msearch/template", "/{index}/_msearch/template"], :endpoint => 'msearch_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb index 6110f71022..c7fa66ef3e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb @@ -39,7 +39,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-multi-termvectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html # def mtermvectors(arguments = {}) arguments = arguments.clone @@ -67,8 +67,8 @@ def mtermvectors(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_mtermvectors", "/{index}/_mtermvectors"], - 'mtermvectors') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_mtermvectors", "/{index}/_mtermvectors"], :endpoint => 'mtermvectors' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb index 1025ed46e0..b58925dff0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Long] :max_archive_version Specifies the maximum archive_version to be cleared from the archive. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/clear-repositories-metering-archive-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html # def clear_repositories_metering_archive(arguments = {}) raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] @@ -55,7 +55,7 @@ def clear_repositories_metering_archive(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_nodes/{node_id}/_repositories_metering/{max_archive_version}"], 'nodes.clear_repositories_metering_archive') + { :path_templates => ["/_nodes/{node_id}/_repositories_metering/{max_archive_version}"], :endpoint => 'nodes.clear_repositories_metering_archive' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb index 07c7ff7377..7f7393450e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-repositories-metering-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html # def get_repositories_metering_info(arguments = {}) raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] @@ -48,8 +48,8 @@ def get_repositories_metering_info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_nodes/{node_id}/_repositories_metering"], - 'nodes.get_repositories_metering_info') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_nodes/{node_id}/_repositories_metering"], :endpoint => 'nodes.get_repositories_metering_info' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb index 7992d87e97..ee7f0af754 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-nodes-hot-threads.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html # def hot_threads(arguments = {}) arguments = arguments.clone @@ -53,8 +53,8 @@ def hot_threads(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_nodes/hot_threads", "/_nodes/{node_id}/hot_threads"], - 'nodes.hot_threads') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_nodes/hot_threads", "/_nodes/{node_id}/hot_threads"], :endpoint => 'nodes.hot_threads' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb index bd6b5f3bfb..dfc8c35d2e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-nodes-info.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html # def info(arguments = {}) arguments = arguments.clone @@ -56,7 +56,7 @@ def info(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_nodes", "/_nodes/{node_id}", "/_nodes/{metric}", "/_nodes/{node_id}/{metric}"], 'nodes.info') + { :path_templates => ["/_nodes", "/_nodes/{node_id}", "/_nodes/{metric}", "/_nodes/{node_id}/{metric}"], :endpoint => 'nodes.info' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb index c258c8872c..ce13b4cd72 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object containing the password for the elasticsearch keystore # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/secure-settings.html#reloadable-secure-settings + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/secure-settings.html#reloadable-secure-settings # def reload_secure_settings(arguments = {}) arguments = arguments.clone @@ -49,7 +49,7 @@ def reload_secure_settings(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_nodes/reload_secure_settings", "/_nodes/{node_id}/reload_secure_settings"], 'nodes.reload_secure_settings') + { :path_templates => ["/_nodes/reload_secure_settings", "/_nodes/{node_id}/reload_secure_settings"], :endpoint => 'nodes.reload_secure_settings' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb index b753f991a2..5753f01b47 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb @@ -38,7 +38,7 @@ module Actions # @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-nodes-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html # def stats(arguments = {}) arguments = arguments.clone @@ -70,7 +70,7 @@ def stats(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_nodes/stats", "/_nodes/{node_id}/stats", "/_nodes/stats/{metric}", "/_nodes/{node_id}/stats/{metric}", "/_nodes/stats/{metric}/{index_metric}", "/_nodes/{node_id}/stats/{metric}/{index_metric}"], 'nodes.stats') + { :path_templates => ["/_nodes/stats", "/_nodes/{node_id}/stats", "/_nodes/stats/{metric}", "/_nodes/{node_id}/stats/{metric}", "/_nodes/stats/{metric}/{index_metric}", "/_nodes/{node_id}/stats/{metric}/{index_metric}"], :endpoint => 'nodes.stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb index 4627ad87e7..0d1aa373dc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/cluster-nodes-usage.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-usage.html # def usage(arguments = {}) arguments = arguments.clone @@ -55,7 +55,7 @@ def usage(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_nodes/usage", "/_nodes/{node_id}/usage", "/_nodes/usage/{metric}", "/_nodes/{node_id}/usage/{metric}"], 'nodes.usage') + { :path_templates => ["/_nodes/usage", "/_nodes/{node_id}/usage", "/_nodes/usage/{metric}", "/_nodes/{node_id}/usage/{metric}"], :endpoint => 'nodes.usage' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index e66101fb93..950c803989 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :keep_alive Specific the time to live for the point in time (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/point-in-time-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html # def open_point_in_time(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -48,7 +48,8 @@ def open_point_in_time(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_pit"], 'open_point_in_time') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_pit"], :endpoint => 'open_point_in_time' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb index 4afe49a6e6..8ce33819da 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb @@ -25,7 +25,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/index.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html # def ping(arguments = {}) arguments = arguments.clone @@ -38,7 +38,8 @@ def ping(arguments = {}) params = {} begin - perform_request(method, path, params, body, headers, ["/"], 'ping').status == 200 ? true : false + perform_request(method, path, params, body, headers, + { :path_templates => ["/"], :endpoint => 'ping' }).status == 200 ? true : false rescue Exception => e if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not *Found|404|ConnectionFailed/i false diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb index 7e56af8340..7e07628905 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The document (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-scripting.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html # def put_script(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -54,8 +54,8 @@ def put_script(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_scripts/{id}", "/_scripts/{id}/{context}"], - 'put_script') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_scripts/{id}", "/_scripts/{id}/{context}"], :endpoint => 'put_script' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb index 9112edb7bf..e055729040 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :ruleset_id The unique identifier of the query ruleset to delete # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-query-ruleset.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-query-ruleset.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'ruleset_id' missing" unless arguments[:ruleset_id] @@ -48,8 +48,8 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_query_rules/{ruleset_id}"], - 'query_ruleset.delete') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_query_rules/{ruleset_id}"], :endpoint => 'query_ruleset.delete' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb index 1e7bced675..5e42809e95 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :ruleset_id The unique identifier of the query ruleset # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-query-ruleset.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-query-ruleset.html # def get(arguments = {}) raise ArgumentError, "Required argument 'ruleset_id' missing" unless arguments[:ruleset_id] @@ -48,8 +48,8 @@ def get(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_query_rules/{ruleset_id}"], - 'query_ruleset.get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_query_rules/{ruleset_id}"], :endpoint => 'query_ruleset.get' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb deleted file mode 100644 index 06c425809b..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/list.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Licensed to Elasticsearch B.V. under one or more contributor -# license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright -# ownership. Elasticsearch B.V. licenses this file to you under -# the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module QueryRuleset - module Actions - # Lists query rulesets. - # 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 [Integer] :from Starting offset (default: 0) - # @option arguments [Integer] :size specifies a max number of results to get (default: 100) - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-query-rulesets.html - # - def list(arguments = {}) - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - method = Elasticsearch::API::HTTP_GET - path = "_query_rules" - params = Utils.process_params(arguments) - - Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) - ) - end - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb index 89d603bc80..6c3e0dcedd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The query ruleset configuration, including `rules` (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-query-ruleset.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-query-ruleset.html # def put(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,8 +50,8 @@ def put(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_query_rules/{ruleset_id}"], - 'query_ruleset.put') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_query_rules/{ruleset_id}"], :endpoint => 'query_ruleset.put' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb index 9299eeb26f..74482ba578 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-rank-eval.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-rank-eval.html # def rank_eval(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -52,8 +52,8 @@ def rank_eval(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_rank_eval", "/{index}/_rank_eval"], - 'rank_eval') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_rank_eval", "/{index}/_rank_eval"], :endpoint => 'rank_eval' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb index bca538d787..2fe6c09bc2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb @@ -36,7 +36,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition using the Query DSL and the prototype for the index request. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-reindex.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html # def reindex(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -51,7 +51,8 @@ def reindex(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_reindex"], 'reindex') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_reindex"], :endpoint => 'reindex' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb index 731a7199c3..5c3d3c1344 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-reindex.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html # def reindex_rethrottle(arguments = {}) raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] @@ -44,8 +44,8 @@ def reindex_rethrottle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_reindex/{task_id}/_rethrottle"], - 'reindex_rethrottle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_reindex/{task_id}/_rethrottle"], :endpoint => 'reindex_rethrottle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb index 9a05435bc3..1b918e9422 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition template and its params # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/render-search-template-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html # def render_search_template(arguments = {}) arguments = arguments.clone @@ -51,8 +51,8 @@ def render_search_template(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_render/template", "/_render/template/{id}"], - 'render_search_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_render/template", "/_render/template/{id}"], :endpoint => 'render_search_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb index 1bfc349099..26e4ab65d3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :id The ID of the job to delete # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-delete-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-delete-job.html # def delete_job(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -48,7 +48,8 @@ def delete_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_rollup/job/{id}"], 'rollup.delete_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_rollup/job/{id}"], :endpoint => 'rollup.delete_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb index 2246fd7ba1..39c7315191 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :id The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-get-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-job.html # def get_jobs(arguments = {}) arguments = arguments.clone @@ -50,8 +50,8 @@ def get_jobs(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_rollup/job/{id}", "/_rollup/job/"], - 'rollup.get_jobs') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_rollup/job/{id}", "/_rollup/job/"], :endpoint => 'rollup.get_jobs' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb index b8c1148b52..fc5c5f3baf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :id The ID of the index to check rollup capabilities on, or left blank for all jobs # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-get-rollup-caps.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-caps.html # def get_rollup_caps(arguments = {}) arguments = arguments.clone @@ -50,8 +50,8 @@ def get_rollup_caps(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_rollup/data/{id}", "/_rollup/data/"], - 'rollup.get_rollup_caps') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_rollup/data/{id}", "/_rollup/data/"], :endpoint => 'rollup.get_rollup_caps' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb index a518711b12..5823a67bfd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :index The rollup index or index pattern to obtain rollup capabilities from. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-get-rollup-index-caps.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-index-caps.html # def get_rollup_index_caps(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -48,8 +48,8 @@ def get_rollup_index_caps(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_rollup/data"], - 'rollup.get_rollup_index_caps') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_rollup/data"], :endpoint => 'rollup.get_rollup_index_caps' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb index 64e2f6bcf0..d027640848 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The job configuration (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-put-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-put-job.html # def put_job(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,8 @@ def put_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_rollup/job/{id}"], 'rollup.put_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_rollup/job/{id}"], :endpoint => 'rollup.put_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb index e9f9a4508f..2c2b8f5d9d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search request body (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-search.html # def rollup_search(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -52,8 +52,8 @@ def rollup_search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_rollup_search"], - 'rollup.rollup_search') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_rollup_search"], :endpoint => 'rollup.rollup_search' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb index cf58435135..1e49d56b88 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :id The ID of the job to start # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-start-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-start-job.html # def start_job(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -48,7 +48,8 @@ def start_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_rollup/job/{id}/_start"], 'rollup.start_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_rollup/job/{id}/_start"], :endpoint => 'rollup.start_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb index 49617a0d48..ac614a2566 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Time] :timeout Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-stop-job.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-stop-job.html # def stop_job(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -50,7 +50,8 @@ def stop_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_rollup/job/{id}/_stop"], 'rollup.stop_job') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_rollup/job/{id}/_stop"], :endpoint => 'rollup.stop_job' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb index 54c38b12a1..779d4bdbfb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The script to execute # - # @see https://www.elastic.co/guide/en/elasticsearch/painless/8.10/painless-execute-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html # def scripts_painless_execute(arguments = {}) arguments = arguments.clone @@ -48,8 +48,8 @@ def scripts_painless_execute(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_scripts/painless/_execute"], - 'scripts_painless_execute') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_scripts/painless/_execute"], :endpoint => 'scripts_painless_execute' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb index fe578dc38c..43525ebb56 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb @@ -34,7 +34,7 @@ module Actions # Deprecated since version 7.0.0 # # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-request-body.html#request-body-search-scroll + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-scroll # def scroll(arguments = {}) arguments = arguments.clone @@ -58,8 +58,8 @@ def scroll(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_search/scroll", "/_search/scroll/{scroll_id}"], - 'scroll') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_search/scroll", "/_search/scroll/{scroll_id}"], :endpoint => 'scroll' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb index b962b654e2..e4130b5725 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb @@ -72,7 +72,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition using the Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html # def search(arguments = {}) arguments = arguments.clone @@ -96,7 +96,8 @@ def search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_search", "/{index}/_search"], 'search') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_search", "/{index}/_search"], :endpoint => 'search' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb index 44bba5ed1d..21d9e4140f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :name The name of the search application # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-search-application.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-search-application.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -48,8 +48,8 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_application/search_application/{name}"], - 'search_application.delete') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_application/search_application/{name}"], :endpoint => 'search_application.delete' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb index 3d79be6568..cca8d27fcf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :name The name of the analytics collection to be deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-analytics-collection.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-analytics-collection.html # def delete_behavioral_analytics(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -48,8 +48,8 @@ def delete_behavioral_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_application/analytics/{name}"], - 'search_application.delete_behavioral_analytics') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_application/analytics/{name}"], :endpoint => 'search_application.delete_behavioral_analytics' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb index 38152a4565..2ff23ef47a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :name The name of the search application # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-search-application.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-search-application.html # def get(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -48,8 +48,8 @@ def get(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_application/search_application/{name}"], - 'search_application.get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_application/search_application/{name}"], :endpoint => 'search_application.get' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb index 63197bf753..46c9df604a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [List] :name A comma-separated list of analytics collections to limit the returned information # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/list-analytics-collection.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-analytics-collection.html # def get_behavioral_analytics(arguments = {}) arguments = arguments.clone @@ -51,7 +51,7 @@ def get_behavioral_analytics(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_application/analytics", "/_application/analytics/{name}"], 'search_application.get_behavioral_analytics') + { :path_templates => ["/_application/analytics", "/_application/analytics/{name}"], :endpoint => 'search_application.get_behavioral_analytics' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb index 3d69a90cd1..56aee8e69c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of results to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/list-search-applications.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-search-applications.html # def list(arguments = {}) arguments = arguments.clone @@ -46,8 +46,8 @@ def list(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_application/search_application"], - 'search_application.list') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_application/search_application"], :endpoint => 'search_application.list' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb index 53284de57c..01ea4e3551 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb @@ -56,7 +56,7 @@ def post_behavioral_analytics_event(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_application/analytics/{collection_name}/event/{event_type}"], 'search_application.post_behavioral_analytics_event') + { :path_templates => ["/_application/analytics/{collection_name}/event/{event_type}"], :endpoint => 'search_application.post_behavioral_analytics_event' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb index f1ca8ca1a0..cc6b50f4e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search application configuration, including `indices` (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-search-application.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-search-application.html # def put(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -51,8 +51,8 @@ def put(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_application/search_application/{name}"], - 'search_application.put') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_application/search_application/{name}"], :endpoint => 'search_application.put' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb index 43db2ed252..cb781c1325 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :name The name of the analytics collection to be created or updated # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-analytics-collection.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-analytics-collection.html # def put_behavioral_analytics(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -48,8 +48,8 @@ def put_behavioral_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_application/analytics/{name}"], - 'search_application.put_behavioral_analytics') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_application/analytics/{name}"], :endpoint => 'search_application.put_behavioral_analytics' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb index 3217c440fa..06518b4bb8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Search parameters, which will override any default search parameters defined in the search application template # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-application-render-query.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-render-query.html # def render_query(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -49,8 +49,8 @@ def render_query(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_application/search_application/{name}/_render_query"], - 'search_application.render_query') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_application/search_application/{name}/_render_query"], :endpoint => 'search_application.render_query' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb index e693fb3f18..4e06e2f3cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Search parameters, including template parameters that override defaults # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-application-search.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-application-search.html # def search(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -54,8 +54,8 @@ def search(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_application/search_application/{name}/_search"], - 'search_application.search') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_application/search_application/{name}/_search"], :endpoint => 'search_application.search' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb index b9c6fe885d..fc29471bc0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb @@ -42,7 +42,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Search request body. # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-vector-tile-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-vector-tile-api.html # def search_mvt(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -71,8 +71,8 @@ def search_mvt(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_mvt/{field}/{zoom}/{x}/{y}"], - 'search_mvt') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_mvt/{field}/{zoom}/{x}/{y}"], :endpoint => 'search_mvt' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb index b26c6ec6ca..4d17ede9bc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-shards.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html # def search_shards(arguments = {}) arguments = arguments.clone @@ -51,8 +51,8 @@ def search_shards(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_search_shards", "/{index}/_search_shards"], - 'search_shards') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_search_shards", "/{index}/_search_shards"], :endpoint => 'search_shards' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb index a8c39b8fff..b945e80bb4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb @@ -40,7 +40,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition template and its params (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-template.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html # def search_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -61,8 +61,8 @@ def search_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_search/template", "/{index}/_search/template"], - 'search_template') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_search/template", "/{index}/_search/template"], :endpoint => 'search_template' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb index a64037fcae..e9071547e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/searchable-snapshots-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html # def cache_stats(arguments = {}) arguments = arguments.clone @@ -51,7 +51,7 @@ def cache_stats(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_searchable_snapshots/cache/stats", "/_searchable_snapshots/{node_id}/cache/stats"], 'searchable_snapshots.cache_stats') + { :path_templates => ["/_searchable_snapshots/cache/stats", "/_searchable_snapshots/{node_id}/cache/stats"], :endpoint => 'searchable_snapshots.cache_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb index 49a7c34ef5..9fc977c6f5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb @@ -34,7 +34,7 @@ module Actions # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, none, all) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/searchable-snapshots-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html # def clear_cache(arguments = {}) arguments = arguments.clone @@ -54,7 +54,7 @@ def clear_cache(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_searchable_snapshots/cache/clear", "/{index}/_searchable_snapshots/cache/clear"], 'searchable_snapshots.clear_cache') + { :path_templates => ["/_searchable_snapshots/cache/clear", "/{index}/_searchable_snapshots/cache/clear"], :endpoint => 'searchable_snapshots.clear_cache' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb index 6247557734..aa4a3e40dc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The restore configuration for mounting the snapshot as searchable (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/searchable-snapshots-api-mount-snapshot.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-mount-snapshot.html # def mount(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -53,8 +53,8 @@ def mount(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}/_mount"], - 'searchable_snapshots.mount') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}/{snapshot}/_mount"], :endpoint => 'searchable_snapshots.mount' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb index 61af57668c..c902f146f3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :level Return stats aggregated at cluster, index or shard level (options: cluster, indices, shards) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/searchable-snapshots-apis.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html # def stats(arguments = {}) arguments = arguments.clone @@ -48,7 +48,7 @@ def stats(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_searchable_snapshots/stats", "/{index}/_searchable_snapshots/stats"], 'searchable_snapshots.stats') + { :path_templates => ["/_searchable_snapshots/stats", "/{index}/_searchable_snapshots/stats"], :endpoint => 'searchable_snapshots.stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb index c819697eb2..1505fdbbf1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The grant type and user's credential (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-activate-user-profile.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-activate-user-profile.html # def activate_user_profile(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def activate_user_profile(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/profile/_activate"], - 'security.activate_user_profile') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/profile/_activate"], :endpoint => 'security.activate_user_profile' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb index 8670c01477..e60d70fe26 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-authenticate.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html # def authenticate(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def authenticate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/_authenticate"], 'security.authenticate') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/_authenticate"], :endpoint => 'security.authenticate' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb index 91319275af..75434afdb7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The API key request to update the attributes of multiple API keys. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-bulk-update-api-keys.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-update-api-keys.html # def bulk_update_api_keys(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def bulk_update_api_keys(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/api_key/_bulk_update"], - 'security.bulk_update_api_keys') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/api_key/_bulk_update"], :endpoint => 'security.bulk_update_api_keys' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb index 0788930472..b6dd300ab4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body the new password for the user (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-change-password.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html # def change_password(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -51,7 +51,7 @@ def change_password(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_security/user/{username}/_password", "/_security/user/_password"], 'security.change_password') + { :path_templates => ["/_security/user/{username}/_password", "/_security/user/_password"], :endpoint => 'security.change_password' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb index f5a85fe569..4f6444ff22 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :ids A comma-separated list of IDs of API keys to clear from the cache # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-clear-api-key-cache.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-api-key-cache.html # def clear_api_key_cache(arguments = {}) raise ArgumentError, "Required argument 'ids' missing" unless arguments[:ids] @@ -44,8 +44,8 @@ def clear_api_key_cache(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/api_key/{ids}/_clear_cache"], - 'security.clear_api_key_cache') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/api_key/{ids}/_clear_cache"], :endpoint => 'security.clear_api_key_cache' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb index faa5ceb9af..6a75eb352e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :application A comma-separated list of application names # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-clear-privilege-cache.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html # def clear_cached_privileges(arguments = {}) raise ArgumentError, "Required argument 'application' missing" unless arguments[:application] @@ -44,8 +44,8 @@ def clear_cached_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/privilege/{application}/_clear_cache"], - 'security.clear_cached_privileges') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/privilege/{application}/_clear_cache"], :endpoint => 'security.clear_cached_privileges' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb index 6fc45288ea..c475afd1b1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [List] :usernames Comma-separated list of usernames to clear from the cache # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-clear-cache.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html # def clear_cached_realms(arguments = {}) raise ArgumentError, "Required argument 'realms' missing" unless arguments[:realms] @@ -45,8 +45,8 @@ def clear_cached_realms(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/realm/{realms}/_clear_cache"], - 'security.clear_cached_realms') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/realm/{realms}/_clear_cache"], :endpoint => 'security.clear_cached_realms' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb index d9489293ad..2dbc678569 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :name Role name # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-clear-role-cache.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html # def clear_cached_roles(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -44,8 +44,8 @@ def clear_cached_roles(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/role/{name}/_clear_cache"], - 'security.clear_cached_roles') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/role/{name}/_clear_cache"], :endpoint => 'security.clear_cached_roles' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb index fd6652998a..9b5ea0b476 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [List] :name A comma-separated list of service token names # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-clear-service-token-caches.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html # def clear_cached_service_tokens(arguments = {}) raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] @@ -53,7 +53,7 @@ def clear_cached_service_tokens(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache"], 'security.clear_cached_service_tokens') + { :path_templates => ["/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache"], :endpoint => 'security.clear_cached_service_tokens' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb index 7ce5309fb8..c363932e20 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The api key request to create an API key (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-create-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html # def create_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -43,8 +43,8 @@ def create_api_key(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/api_key"], - 'security.create_api_key') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/api_key"], :endpoint => 'security.create_api_key' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb index 9db7852dc2..13e4f0e878 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request to create a cross-cluster API key (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-create-cross-cluster-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html # def create_cross_cluster_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -46,8 +46,8 @@ def create_cross_cluster_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/cross_cluster/api_key"], - 'security.create_cross_cluster_api_key') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/cross_cluster/api_key"], :endpoint => 'security.create_cross_cluster_api_key' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb index 8820c1775f..b52efb6b5a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-create-service-token.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html # def create_service_token(arguments = {}) raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] @@ -57,7 +57,7 @@ def create_service_token(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_security/service/{namespace}/{service}/credential/token/{name}", "/_security/service/{namespace}/{service}/credential/token"], 'security.create_service_token') + { :path_templates => ["/_security/service/{namespace}/{service}/credential/token/{name}", "/_security/service/{namespace}/{service}/credential/token"], :endpoint => 'security.create_service_token' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb index 230ecee716..3f3c54c535 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-delete-privilege.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html # def delete_privileges(arguments = {}) raise ArgumentError, "Required argument 'application' missing" unless arguments[:application] @@ -49,8 +49,8 @@ def delete_privileges(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/privilege/{application}/{name}"], - 'security.delete_privileges') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/privilege/{application}/{name}"], :endpoint => 'security.delete_privileges' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb index 1d13fa4024..0320940c61 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-delete-role.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html # def delete_role(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -45,8 +45,8 @@ def delete_role(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/role/{name}"], - 'security.delete_role') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/role/{name}"], :endpoint => 'security.delete_role' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb index 99701f1891..c1b63dfe83 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-delete-role-mapping.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html # def delete_role_mapping(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] @@ -45,8 +45,8 @@ def delete_role_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/role_mapping/{name}"], - 'security.delete_role_mapping') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/role_mapping/{name}"], :endpoint => 'security.delete_role_mapping' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb index cf138d4646..7f89078409 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-delete-service-token.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html # def delete_service_token(arguments = {}) raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] @@ -54,7 +54,7 @@ def delete_service_token(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_security/service/{namespace}/{service}/credential/token/{name}"], 'security.delete_service_token') + { :path_templates => ["/_security/service/{namespace}/{service}/credential/token/{name}"], :endpoint => 'security.delete_service_token' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb index b561d87d63..1d93bf492a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-delete-user.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html # def delete_user(arguments = {}) raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] @@ -45,8 +45,8 @@ def delete_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/user/{username}"], - 'security.delete_user') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/user/{username}"], :endpoint => 'security.delete_user' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb index b9551e68c8..72c705f620 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-disable-user.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html # def disable_user(arguments = {}) raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] @@ -45,8 +45,8 @@ def disable_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/user/{username}/_disable"], - 'security.disable_user') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/user/{username}/_disable"], :endpoint => 'security.disable_user' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb index 4c2eccfa33..251b156f9a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-disable-user-profile.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user-profile.html # def disable_user_profile(arguments = {}) raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] @@ -45,8 +45,8 @@ def disable_user_profile(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/profile/{uid}/_disable"], - 'security.disable_user_profile') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/profile/{uid}/_disable"], :endpoint => 'security.disable_user_profile' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb index 9de2443419..11d2989356 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-enable-user.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html # def enable_user(arguments = {}) raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] @@ -45,8 +45,8 @@ def enable_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/user/{username}/_enable"], - 'security.enable_user') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/user/{username}/_enable"], :endpoint => 'security.enable_user' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb index c5d9ce6b01..d20f5377a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :refresh If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-enable-user-profile.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user-profile.html # def enable_user_profile(arguments = {}) raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] @@ -45,8 +45,8 @@ def enable_user_profile(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/profile/{uid}/_enable"], - 'security.enable_user_profile') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/profile/{uid}/_enable"], :endpoint => 'security.enable_user_profile' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb index efef7f685f..80bdc6eb5b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-kibana-enrollment.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-kibana-enrollment.html # def enroll_kibana(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def enroll_kibana(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/enroll/kibana"], 'security.enroll_kibana') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/enroll/kibana"], :endpoint => 'security.enroll_kibana' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb index c90a6fe5e9..b2631f26aa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-node-enrollment.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-node-enrollment.html # def enroll_node(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def enroll_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/enroll/node"], 'security.enroll_node') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/enroll/node"], :endpoint => 'security.enroll_node' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb index 4229d75968..99a9897ebb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Boolean] :with_limited_by flag to show the limited-by role descriptors of API Keys # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html # def get_api_key(arguments = {}) arguments = arguments.clone @@ -45,7 +45,8 @@ def get_api_key(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/api_key"], 'security.get_api_key') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/api_key"], :endpoint => 'security.get_api_key' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb index fcf90d4990..005e4f5d16 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-builtin-privileges.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html # def get_builtin_privileges(arguments = {}) arguments = arguments.clone @@ -39,8 +39,8 @@ def get_builtin_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/privilege/_builtin"], - 'security.get_builtin_privileges') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/privilege/_builtin"], :endpoint => 'security.get_builtin_privileges' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb index 1f4fbea81c..7157273e85 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :name Privilege name # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-privileges.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html # def get_privileges(arguments = {}) arguments = arguments.clone @@ -52,7 +52,7 @@ def get_privileges(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_security/privilege", "/_security/privilege/{application}", "/_security/privilege/{application}/{name}"], 'security.get_privileges') + { :path_templates => ["/_security/privilege", "/_security/privilege/{application}", "/_security/privilege/{application}/{name}"], :endpoint => 'security.get_privileges' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb index 5a04b09154..ca4fec7c9e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :name A comma-separated list of role names # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-role.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html # def get_role(arguments = {}) arguments = arguments.clone @@ -48,14 +48,14 @@ def get_role(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/role/{name}", "/_security/role"], - 'security.get_role') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/role/{name}", "/_security/role"], :endpoint => 'security.get_role' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/role/{name}", "/_security/role"], - 'security.get_role') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/role/{name}", "/_security/role"], :endpoint => 'security.get_role' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb index c2cfee0665..fbae482275 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :name A comma-separated list of role-mapping names # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-role-mapping.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html # def get_role_mapping(arguments = {}) arguments = arguments.clone @@ -47,7 +47,7 @@ def get_role_mapping(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_security/role_mapping/{name}", "/_security/role_mapping"], 'security.get_role_mapping') + { :path_templates => ["/_security/role_mapping/{name}", "/_security/role_mapping"], :endpoint => 'security.get_role_mapping' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb index da6361be79..676ae11d95 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :service An identifier for the service name # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-service-accounts.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html # def get_service_accounts(arguments = {}) arguments = arguments.clone @@ -52,7 +52,7 @@ def get_service_accounts(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_security/service/{namespace}/{service}", "/_security/service/{namespace}", "/_security/service"], 'security.get_service_accounts') + { :path_templates => ["/_security/service/{namespace}/{service}", "/_security/service/{namespace}", "/_security/service"], :endpoint => 'security.get_service_accounts' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb index 001211433a..d1cf5906d3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [String] :service An identifier for the service name # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-service-credentials.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html # def get_service_credentials(arguments = {}) raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] @@ -48,8 +48,8 @@ def get_service_credentials(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/service/{namespace}/{service}/credential"], - 'security.get_service_credentials') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/service/{namespace}/{service}/credential"], :endpoint => 'security.get_service_credentials' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb index 1f5764cef5..ce3e780c6d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The token request to get (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-token.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html # def get_token(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def get_token(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/oauth2/token"], - 'security.get_token') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/oauth2/token"], :endpoint => 'security.get_token' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb index 2c2ba3afeb..cc04b42995 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :with_profile_uid flag to retrieve profile uid (if exists) associated to the user # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-user.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html # def get_user(arguments = {}) arguments = arguments.clone @@ -49,14 +49,14 @@ def get_user(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/user/{username}", "/_security/user"], - 'security.get_user') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/user/{username}", "/_security/user"], :endpoint => 'security.get_user' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/user/{username}", "/_security/user"], - 'security.get_user') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/user/{username}", "/_security/user"], :endpoint => 'security.get_user' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb index bd357b9ab3..60ee2b876a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-user-privileges.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html # def get_user_privileges(arguments = {}) arguments = arguments.clone @@ -39,8 +39,8 @@ def get_user_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/user/_privileges"], - 'security.get_user_privileges') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/user/_privileges"], :endpoint => 'security.get_user_privileges' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb index d932aec0f5..765b14af1f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [List] :data A comma-separated list of keys for which the corresponding application data are retrieved. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-get-user-profile.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-profile.html # def get_user_profile(arguments = {}) raise ArgumentError, "Required argument 'uid' missing" unless arguments[:uid] @@ -45,8 +45,8 @@ def get_user_profile(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/profile/{uid}"], - 'security.get_user_profile') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/profile/{uid}"], :endpoint => 'security.get_user_profile' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb index f611e886b3..e767ac8485 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The api key request to create an API key (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-grant-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html # def grant_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -43,8 +43,8 @@ def grant_api_key(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/api_key/grant"], - 'security.grant_api_key') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/api_key/grant"], :endpoint => 'security.grant_api_key' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb index 5cbd13698f..00929922d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The privileges to test (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-has-privileges.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html # def has_privileges(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,7 @@ def has_privileges(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_security/user/_has_privileges", "/_security/user/{user}/_has_privileges"], 'security.has_privileges') + { :path_templates => ["/_security/user/_has_privileges", "/_security/user/{user}/_has_privileges"], :endpoint => 'security.has_privileges' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb index d82b0c5afe..85e01af8fe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The privileges to check and the list of profile IDs (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-has-privileges-user-profile.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges-user-profile.html # def has_privileges_user_profile(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def has_privileges_user_profile(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/profile/_has_privileges"], - 'security.has_privileges_user_profile') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/profile/_has_privileges"], :endpoint => 'security.has_privileges_user_profile' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb index 11d3b2796a..fc101afc4f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The api key request to invalidate API key(s) (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-invalidate-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html # def invalidate_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def invalidate_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/api_key"], - 'security.invalidate_api_key') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/api_key"], :endpoint => 'security.invalidate_api_key' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb index 6f2f82b28e..2a79141c6c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The token to invalidate (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-invalidate-token.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html # def invalidate_token(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def invalidate_token(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/oauth2/token"], - 'security.invalidate_token') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/oauth2/token"], :endpoint => 'security.invalidate_token' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb index 7ca0805f96..52b8fc2673 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The OpenID Connect response to authenticate (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-oidc-authenticate.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-authenticate.html # def oidc_authenticate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def oidc_authenticate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/oidc/authenticate"], - 'security.oidc_authenticate') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/oidc/authenticate"], :endpoint => 'security.oidc_authenticate' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb index 5bc13ea5ed..cf343506cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Access token and refresh token to invalidate (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-oidc-logout.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-logout.html # def oidc_logout(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def oidc_logout(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/oidc/logout"], - 'security.oidc_logout') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/oidc/logout"], :endpoint => 'security.oidc_logout' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb index 6f630730c1..de2b330075 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The OpenID Connect authentication realm configuration (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-oidc-prepare-authentication.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-prepare-authentication.html # def oidc_prepare_authentication(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def oidc_prepare_authentication(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/oidc/prepare"], - 'security.oidc_prepare_authentication') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/oidc/prepare"], :endpoint => 'security.oidc_prepare_authentication' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb index 44fa2011ab..73d166b250 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The privilege(s) to add (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-put-privileges.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html # def put_privileges(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -43,8 +43,8 @@ def put_privileges(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/privilege/"], - 'security.put_privileges') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/privilege/"], :endpoint => 'security.put_privileges' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb index 68c1cd6d93..af728f0553 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The role to add (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-put-role.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html # def put_role(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -47,7 +47,8 @@ def put_role(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/role/{name}"], 'security.put_role') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/role/{name}"], :endpoint => 'security.put_role' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb index 5cb3aa72df..4cd6b46d11 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The role mapping to add (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-put-role-mapping.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html # def put_role_mapping(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -47,8 +47,8 @@ def put_role_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/role_mapping/{name}"], - 'security.put_role_mapping') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/role_mapping/{name}"], :endpoint => 'security.put_role_mapping' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb index 3dce5ecbbe..dafe8255f5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The user to add (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-put-user.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html # def put_user(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -47,8 +47,8 @@ def put_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/user/{username}"], - 'security.put_user') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/user/{username}"], :endpoint => 'security.put_user' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb index a88d022c14..def749f8cd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body From, size, query, sort and search_after # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-query-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html # def query_api_keys(arguments = {}) arguments = arguments.clone @@ -46,8 +46,8 @@ def query_api_keys(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/_query/api_key"], - 'security.query_api_keys') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/_query/api_key"], :endpoint => 'security.query_api_keys' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb index 7dcbc29d8b..ec9543a64a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The SAML response to authenticate (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-saml-authenticate.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html # def saml_authenticate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def saml_authenticate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/saml/authenticate"], - 'security.saml_authenticate') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/saml/authenticate"], :endpoint => 'security.saml_authenticate' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb index 049590c371..0b115e682d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The logout response to verify (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-saml-complete-logout.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html # def saml_complete_logout(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def saml_complete_logout(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/saml/complete_logout"], - 'security.saml_complete_logout') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/saml/complete_logout"], :endpoint => 'security.saml_complete_logout' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb index 449d82c55e..57144366c2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The LogoutRequest message (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-saml-invalidate.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html # def saml_invalidate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def saml_invalidate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/saml/invalidate"], - 'security.saml_invalidate') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/saml/invalidate"], :endpoint => 'security.saml_invalidate' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb index 47430d5ef4..74ea33a542 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The tokens to invalidate (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-saml-logout.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html # def saml_logout(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def saml_logout(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/saml/logout"], - 'security.saml_logout') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/saml/logout"], :endpoint => 'security.saml_logout' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb index 18467b691d..9917e08d38 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The realm for which to create the authentication request, identified by either its name or the ACS URL (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-saml-prepare-authentication.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html # def saml_prepare_authentication(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def saml_prepare_authentication(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/saml/prepare"], - 'security.saml_prepare_authentication') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/saml/prepare"], :endpoint => 'security.saml_prepare_authentication' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb index 149bb42222..f589e03718 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :realm_name The name of the SAML realm to get the metadata for # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-saml-sp-metadata.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html # def saml_service_provider_metadata(arguments = {}) raise ArgumentError, "Required argument 'realm_name' missing" unless arguments[:realm_name] @@ -44,8 +44,8 @@ def saml_service_provider_metadata(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/saml/metadata/{realm_name}"], - 'security.saml_service_provider_metadata') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/saml/metadata/{realm_name}"], :endpoint => 'security.saml_service_provider_metadata' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb index 2877f8bae3..daf737c17d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The suggestion definition for user profiles # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-suggest-user-profile.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-suggest-user-profile.html # def suggest_user_profiles(arguments = {}) arguments = arguments.clone @@ -46,8 +46,8 @@ def suggest_user_profiles(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/profile/_suggest"], - 'security.suggest_user_profiles') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/profile/_suggest"], :endpoint => 'security.suggest_user_profiles' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb index 7791874242..8df856c022 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The API key request to update attributes of an API key. # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-update-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-api-key.html # def update_api_key(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -45,8 +45,8 @@ def update_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/api_key/{id}"], - 'security.update_api_key') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/api_key/{id}"], :endpoint => 'security.update_api_key' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb index 5e4dd2dee4..efbd1a1b80 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request to update attributes of a cross-cluster API key. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-update-cross-cluster-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html # def update_cross_cluster_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,8 +50,8 @@ def update_cross_cluster_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/cross_cluster/api_key/{id}"], - 'security.update_cross_cluster_api_key') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/cross_cluster/api_key/{id}"], :endpoint => 'security.update_cross_cluster_api_key' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb index 83c882dd6e..34cc55c723 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The application data to update (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-update-user-profile-data.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-user-profile-data.html # def update_user_profile_data(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,8 +49,8 @@ def update_user_profile_data(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_security/profile/{uid}/_data"], - 'security.update_user_profile_data') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_security/profile/{uid}/_data"], :endpoint => 'security.update_user_profile_data' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb index 382f1abd52..b4359d865d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb @@ -44,8 +44,8 @@ def delete_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_nodes/{node_id}/shutdown"], - 'shutdown.delete_node') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_nodes/{node_id}/shutdown"], :endpoint => 'shutdown.delete_node' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb index 2cfb2d6104..539a72e500 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb @@ -46,8 +46,8 @@ def get_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_nodes/shutdown", "/_nodes/{node_id}/shutdown"], - 'shutdown.get_node') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_nodes/shutdown", "/_nodes/{node_id}/shutdown"], :endpoint => 'shutdown.get_node' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb index 44b8c85725..cde3f4ce32 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb @@ -46,8 +46,8 @@ def put_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_nodes/{node_id}/shutdown"], - 'shutdown.put_node') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_nodes/{node_id}/shutdown"], :endpoint => 'shutdown.put_node' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb index be90360ab2..c2693bbbe3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/clean-up-snapshot-repo-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clean-up-snapshot-repo-api.html # def cleanup_repository(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -46,8 +46,8 @@ def cleanup_repository(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/_cleanup"], - 'snapshot.cleanup_repository') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}/_cleanup"], :endpoint => 'snapshot.cleanup_repository' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb index e3b2d1b221..56c9553fe1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The snapshot clone definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def clone(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -56,7 +56,7 @@ def clone(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}"], 'snapshot.clone') + { :path_templates => ["/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}"], :endpoint => 'snapshot.clone' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb index c8e3dba555..6fef84a166 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The snapshot definition # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def create(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -51,8 +51,8 @@ def create(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}"], - 'snapshot.create') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}/{snapshot}"], :endpoint => 'snapshot.create' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb index 48a92f6dde..04283c0bc5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The repository definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def create_repository(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -49,8 +49,8 @@ def create_repository(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}"], - 'snapshot.create_repository') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}"], :endpoint => 'snapshot.create_repository' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb index 1e6d160ab1..4dd7dc27a5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -51,14 +51,14 @@ def delete(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}"], - 'snapshot.delete') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}/{snapshot}"], :endpoint => 'snapshot.delete' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}"], - 'snapshot.delete') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}/{snapshot}"], :endpoint => 'snapshot.delete' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb index b83bb19c58..9efabda074 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def delete_repository(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -48,14 +48,14 @@ def delete_repository(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}"], - 'snapshot.delete_repository') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}"], :endpoint => 'snapshot.delete_repository' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}"], - 'snapshot.delete_repository') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}"], :endpoint => 'snapshot.delete_repository' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb index 26245c4a27..58b246d84a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb @@ -41,7 +41,7 @@ module Actions # @option arguments [Boolean] :verbose Whether to show verbose snapshot info or only show the basic info found in the repository index blob # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def get(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -63,14 +63,14 @@ def get(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}"], - 'snapshot.get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}/{snapshot}"], :endpoint => 'snapshot.get' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}"], - 'snapshot.get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}/{snapshot}"], :endpoint => 'snapshot.get' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb index ab637dc3f7..c48fb15b7c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def get_repository(arguments = {}) arguments = arguments.clone @@ -50,14 +50,14 @@ def get_repository(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot", "/_snapshot/{repository}"], - 'snapshot.get_repository') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot", "/_snapshot/{repository}"], :endpoint => 'snapshot.get_repository' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot", "/_snapshot/{repository}"], - 'snapshot.get_repository') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot", "/_snapshot/{repository}"], :endpoint => 'snapshot.get_repository' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb index d91ec952f9..30d26b4b13 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb @@ -38,7 +38,7 @@ module Actions # @option arguments [Boolean] :rarely_abort_writes Whether to rarely abort writes before they complete. Defaults to 'true'. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def repository_analyze(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -55,8 +55,8 @@ def repository_analyze(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/_analyze"], - 'snapshot.repository_analyze') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}/_analyze"], :endpoint => 'snapshot.repository_analyze' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb index 83108627c5..ab53215e66 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Details of what to restore # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def restore(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -51,8 +51,8 @@ def restore(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/{snapshot}/_restore"], - 'snapshot.restore') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}/{snapshot}/_restore"], :endpoint => 'snapshot.restore' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb index 0159f32a32..50d74e61e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def status(arguments = {}) arguments = arguments.clone @@ -56,13 +56,13 @@ def status(arguments = {}) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_snapshot/_status", "/_snapshot/{repository}/_status", "/_snapshot/{repository}/{snapshot}/_status"], 'snapshot.status') + { :path_templates => ["/_snapshot/_status", "/_snapshot/{repository}/_status", "/_snapshot/{repository}/{snapshot}/_status"], :endpoint => 'snapshot.status' }) ) } else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_snapshot/_status", "/_snapshot/{repository}/_status", "/_snapshot/{repository}/{snapshot}/_status"], 'snapshot.status') + { :path_templates => ["/_snapshot/_status", "/_snapshot/{repository}/_status", "/_snapshot/{repository}/{snapshot}/_status"], :endpoint => 'snapshot.status' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb index 31b8d2edb3..3a742d9b6d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html # def verify_repository(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] @@ -46,8 +46,8 @@ def verify_repository(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_snapshot/{repository}/_verify"], - 'snapshot.verify_repository') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_snapshot/{repository}/_verify"], :endpoint => 'snapshot.verify_repository' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb index 3226c81312..95bcfa0372 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :policy_id The id of the snapshot lifecycle policy to remove # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-delete-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html # def delete_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id] @@ -44,8 +44,8 @@ def delete_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_slm/policy/{policy_id}"], - 'slm.delete_lifecycle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_slm/policy/{policy_id}"], :endpoint => 'slm.delete_lifecycle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb index 5b9006d30d..1c96230de2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :policy_id The id of the snapshot lifecycle policy to be executed # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-execute-lifecycle.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html # def execute_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id] @@ -44,8 +44,8 @@ def execute_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_slm/policy/{policy_id}/_execute"], - 'slm.execute_lifecycle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_slm/policy/{policy_id}/_execute"], :endpoint => 'slm.execute_lifecycle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb index 8c4a1813e0..8091814043 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-execute-retention.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html # def execute_retention(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def execute_retention(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_slm/_execute_retention"], 'slm.execute_retention') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_slm/_execute_retention"], :endpoint => 'slm.execute_retention' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb index 94881c1a9a..1a6a011cd3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [List] :policy_id Comma-separated list of snapshot lifecycle policies to retrieve # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-get-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html # def get_lifecycle(arguments = {}) arguments = arguments.clone @@ -46,8 +46,8 @@ def get_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_slm/policy/{policy_id}", "/_slm/policy"], - 'slm.get_lifecycle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_slm/policy/{policy_id}", "/_slm/policy"], :endpoint => 'slm.get_lifecycle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb index 2769993cd6..286e969138 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-get-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-stats.html # def get_stats(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def get_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_slm/stats"], 'slm.get_stats') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_slm/stats"], :endpoint => 'slm.get_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb index 74f2edea66..4d27db9e41 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-get-status.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html # def get_status(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def get_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_slm/status"], 'slm.get_status') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_slm/status"], :endpoint => 'slm.get_status' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb index 0e558e063f..7b5505b5a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The snapshot lifecycle policy definition to register # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-put-policy.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html # def put_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id] @@ -45,8 +45,8 @@ def put_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_slm/policy/{policy_id}"], - 'slm.put_lifecycle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_slm/policy/{policy_id}"], :endpoint => 'slm.put_lifecycle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb index 77340cc06e..e5cf0e6e01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-start.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html # def start(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def start(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_slm/start"], 'slm.start') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_slm/start"], :endpoint => 'slm.start' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb index 1d50dcda04..ba33ba6dcd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/slm-api-stop.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html # def stop(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def stop(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_slm/stop"], 'slm.stop') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_slm/stop"], :endpoint => 'slm.stop' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb index 5325ce3ece..0dd92de050 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Specify the cursor value in the `cursor` element to clean the cursor. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/clear-sql-cursor-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html # def clear_cursor(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def clear_cursor(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_sql/close"], 'sql.clear_cursor') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_sql/close"], :endpoint => 'sql.clear_cursor' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb index adfc93bc2b..bff0abd8ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The async search ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-async-sql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-async-sql-search-api.html # def delete_async(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,8 @@ def delete_async(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_sql/async/delete/{id}"], 'sql.delete_async') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_sql/async/delete/{id}"], :endpoint => 'sql.delete_async' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb index 6538fd21d3..7fe19299a1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Time] :wait_for_completion_timeout Duration to wait for complete results # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-async-sql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-api.html # def get_async(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -48,7 +48,8 @@ def get_async(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_sql/async/{id}"], 'sql.get_async') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_sql/async/{id}"], :endpoint => 'sql.get_async' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb index e43ed71f51..fda8db2ee6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id The async search ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-async-sql-search-status-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-async-sql-search-status-api.html # def get_async_status(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,8 +44,8 @@ def get_async_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_sql/async/status/{id}"], - 'sql.get_async_status') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_sql/async/status/{id}"], :endpoint => 'sql.get_async_status' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb index 091ee8c8bb..bbb5d467be 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Use the `query` element to start a query. Use the `cursor` element to continue a query. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/sql-search-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html # def query(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -43,7 +43,8 @@ def query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_sql"], 'sql.query') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_sql"], :endpoint => 'sql.query' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb index d8fe8a25b6..87844342f4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Specify the query in the `query` element. (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/sql-translate-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html # def translate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,7 +42,8 @@ def translate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_sql/translate"], 'sql.translate') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_sql/translate"], :endpoint => 'sql.translate' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb index 7d4f9a559b..d27f18a271 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/security-api-ssl.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html # def certificates(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def certificates(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_ssl/certificates"], 'ssl.certificates') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_ssl/certificates"], :endpoint => 'ssl.certificates' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/get.rb deleted file mode 100644 index 3b09962ca1..0000000000 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/get.rb +++ /dev/null @@ -1,61 +0,0 @@ -# Licensed to Elasticsearch B.V. under one or more contributor -# license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright -# ownership. Elasticsearch B.V. licenses this file to you under -# the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 -# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec -# -module Elasticsearch - module API - module SynonymRule - module Actions - # Retrieves a synonym rule from a synonym set - # 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 [String] :synonyms_set The id of the synonym set to retrieve the synonym rule from - # @option arguments [String] :synonym_rule The id of the synonym rule to retrieve - # @option arguments [Hash] :headers Custom HTTP headers - # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonym-rule.html - # - def get(arguments = {}) - raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] - raise ArgumentError, "Required argument 'synonym_rule' missing" unless arguments[:synonym_rule] - - arguments = arguments.clone - headers = arguments.delete(:headers) || {} - - body = nil - - _synonyms_set = arguments.delete(:synonyms_set) - - _synonym_rule = arguments.delete(:synonym_rule) - - method = Elasticsearch::API::HTTP_GET - path = "_synonyms/#{Utils.__listify(_synonyms_set)}/#{Utils.__listify(_synonym_rule)}" - params = {} - - Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) - ) - end - end - end - end -end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb index ddde4518a4..e83ac55305 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Synonym rule (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-synonym-rule.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonym-rule.html # def put(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -54,8 +54,8 @@ def put(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_synonyms/{synonyms_set}/{synonym_rule}"], - 'synonym_rule.put') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_synonyms/{synonyms_set}/{synonym_rule}"], :endpoint => 'synonym_rule.put' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb index 50b105f87c..89d74c4b9a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :synonyms_set The name of the synonyms set to be deleted # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-synonyms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-synonyms.html # def delete(arguments = {}) raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] @@ -48,7 +48,8 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_synonyms/{synonyms_set}"], 'synonyms.delete') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_synonyms/{synonyms_set}"], :endpoint => 'synonyms.delete' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb index 97d8cd53aa..a399b30056 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of results to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-synonyms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-synonyms.html # def get(arguments = {}) raise ArgumentError, "Required argument 'synonyms_set' missing" unless arguments[:synonyms_set] @@ -50,7 +50,8 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_synonyms/{synonyms_set}"], 'synonyms.get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_synonyms/{synonyms_set}"], :endpoint => 'synonyms.get' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb index 057fa8bbd0..7f73fa3cbc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Synonyms set rules (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-synonyms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-synonyms.html # def put(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -50,7 +50,8 @@ def put(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_synonyms/{synonyms_set}"], 'synonyms.put') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_synonyms/{synonyms_set}"], :endpoint => 'synonyms.put' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb index bbaf66f79d..6e68da7e72 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Integer] :size specifies a max number of results to get # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/list-synonyms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-synonyms.html # def get(arguments = {}) arguments = arguments.clone @@ -45,7 +45,8 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_synonyms"], 'synonyms_sets.get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_synonyms"], :endpoint => 'synonyms_sets.get' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb index 3e5e0c05fa..e47b77f18a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb @@ -35,7 +35,7 @@ module Actions # @option arguments [Boolean] :wait_for_completion Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/tasks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html # def cancel(arguments = {}) arguments = arguments.clone @@ -54,8 +54,8 @@ def cancel(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_tasks/_cancel", "/_tasks/{task_id}/_cancel"], - 'tasks.cancel') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_tasks/_cancel", "/_tasks/{task_id}/_cancel"], :endpoint => 'tasks.cancel' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb index a2e4f4a0ad..054352442c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb @@ -33,7 +33,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/tasks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html # def get(arguments = {}) arguments = arguments.clone @@ -48,7 +48,8 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_tasks/{task_id}"], 'tasks.get') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_tasks/{task_id}"], :endpoint => 'tasks.get' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb index 5e8aef85b7..934751fc85 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb @@ -37,7 +37,7 @@ module Actions # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/tasks.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html # def list(arguments = {}) arguments = arguments.clone @@ -50,7 +50,8 @@ def list(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_tasks"], 'tasks.list') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_tasks"], :endpoint => 'tasks.list' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb index c3859bb9be..cc261f252a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body field name, string which is the prefix expected in matching terms, timeout and size for max number of results # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/search-terms-enum.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html # def terms_enum(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -49,7 +49,8 @@ def terms_enum(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_terms_enum"], 'terms_enum') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_terms_enum"], :endpoint => 'terms_enum' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb index 8e41ddc366..6e8caa7157 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb @@ -39,7 +39,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Define parameters and or supply a document to get termvectors for. See documentation. # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-termvectors.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html # def termvectors(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -68,8 +68,8 @@ def termvectors(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_termvectors/{id}", "/{index}/_termvectors"], - 'termvectors') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_termvectors/{id}", "/{index}/_termvectors"], :endpoint => 'termvectors' }) ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb index de35e312b8..17d143a571 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb @@ -42,7 +42,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The contents of the file to be analyzed (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/find-structure.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html # def find_structure(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -64,8 +64,8 @@ def find_structure(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, ["/_text_structure/find_structure"], - 'text_structure.find_structure') + perform_request(method, path, params, payload, headers, + { :path_templates => ["/_text_structure/find_structure"], :endpoint => 'text_structure.find_structure' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb index 92b87242e4..266f4c9663 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Time] :timeout Controls the time to wait for the transform deletion # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/delete-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html # def delete_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -47,8 +47,8 @@ def delete_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_transform/{transform_id}"], - 'transform.delete_transform') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_transform/{transform_id}"], :endpoint => 'transform.delete_transform' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb index ee17b25d8f..64af48c293 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Boolean] :exclude_generated Omits fields that are illegal to set on transform PUT # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html # def get_transform(arguments = {}) arguments = arguments.clone @@ -50,8 +50,8 @@ def get_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_transform/{transform_id}", "/_transform"], - 'transform.get_transform') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_transform/{transform_id}", "/_transform"], :endpoint => 'transform.get_transform' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb index 10b9318a8c..2578382683 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-transform-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html # def get_transform_stats(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -48,8 +48,8 @@ def get_transform_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_transform/{transform_id}/_stats"], - 'transform.get_transform_stats') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_transform/{transform_id}/_stats"], :endpoint => 'transform.get_transform_stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb index 134298a1e5..357662c8ff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The definition for the transform to preview # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/preview-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html # def preview_transform(arguments = {}) arguments = arguments.clone @@ -54,7 +54,7 @@ def preview_transform(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_transform/{transform_id}/_preview", "/_transform/_preview"], 'transform.preview_transform') + { :path_templates => ["/_transform/{transform_id}/_preview", "/_transform/_preview"], :endpoint => 'transform.preview_transform' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb index 4cf0771dd9..5021572c7e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The transform definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/put-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html # def put_transform(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -48,8 +48,8 @@ def put_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_transform/{transform_id}"], - 'transform.put_transform') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_transform/{transform_id}"], :endpoint => 'transform.put_transform' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb index 97eb291323..7898f6f2d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Controls the time to wait for the transform to reset # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/reset-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/reset-transform.html # def reset_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -46,8 +46,8 @@ def reset_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_transform/{transform_id}/_reset"], - 'transform.reset_transform') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_transform/{transform_id}/_reset"], :endpoint => 'transform.reset_transform' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb index 9d3699fd9e..f4cb5c1684 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Time] :timeout Controls the time to wait for the scheduling to take place # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/schedule-now-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/schedule-now-transform.html # def schedule_now_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -45,8 +45,8 @@ def schedule_now_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_transform/{transform_id}/_schedule_now"], - 'transform.schedule_now_transform') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_transform/{transform_id}/_schedule_now"], :endpoint => 'transform.schedule_now_transform' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb index cbcbc04367..dcca17fe17 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Time] :timeout Controls the time to wait for the transform to start # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/start-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html # def start_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -46,8 +46,8 @@ def start_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_transform/{transform_id}/_start"], - 'transform.start_transform') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_transform/{transform_id}/_start"], :endpoint => 'transform.start_transform' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb index 6ad4ca786a..98c9768ac8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Boolean] :wait_for_checkpoint Whether to wait for the transform to reach a checkpoint before stopping. Default to false # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/stop-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html # def stop_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] @@ -49,8 +49,8 @@ def stop_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_transform/{transform_id}/_stop"], - 'transform.stop_transform') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_transform/{transform_id}/_stop"], :endpoint => 'transform.stop_transform' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb index 69bf9f03ec..3bbd6f79d4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The update transform definition (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/update-transform.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html # def update_transform(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -48,8 +48,8 @@ def update_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_transform/{transform_id}/_update"], - 'transform.update_transform') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_transform/{transform_id}/_update"], :endpoint => 'transform.update_transform' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb index 6cb34ec1cb..151aa8bab5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Time] :timeout Controls the time to wait for the upgrade # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/upgrade-transforms.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/upgrade-transforms.html # def upgrade_transforms(arguments = {}) arguments = arguments.clone @@ -41,8 +41,8 @@ def upgrade_transforms(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_transform/_upgrade"], - 'transform.upgrade_transforms') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_transform/_upgrade"], :endpoint => 'transform.upgrade_transforms' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb index acd516a15e..d83366f397 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb @@ -40,7 +40,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The request definition requires either `script` or partial `doc` (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-update.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html # def update(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -63,12 +63,14 @@ def update(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_update/{id}"], 'update') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_update/{id}"], :endpoint => 'update' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_update/{id}"], 'update') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_update/{id}"], :endpoint => 'update' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb index d64a084deb..06cdf06b7c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb @@ -59,7 +59,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The search definition using the Query DSL # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-update-by-query.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html # def update_by_query(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] @@ -76,7 +76,8 @@ def update_by_query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/{index}/_update_by_query"], 'update_by_query') + perform_request(method, path, params, body, headers, + { :path_templates => ["/{index}/_update_by_query"], :endpoint => 'update_by_query' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb index 65b5e4cd4b..abfb16d6a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (*Required*) # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docs-update-by-query.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html # def update_by_query_rethrottle(arguments = {}) raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] @@ -44,8 +44,8 @@ def update_by_query_rethrottle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_update_by_query/{task_id}/_rethrottle"], - 'update_by_query_rethrottle') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_update_by_query/{task_id}/_rethrottle"], :endpoint => 'update_by_query_rethrottle' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb index 2eebf39522..9a58c8ddc7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [List] :action_id A comma-separated list of the action ids to be acked # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-ack-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html # def ack_watch(arguments = {}) raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id] @@ -52,7 +52,7 @@ def ack_watch(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_watcher/watch/{watch_id}/_ack", "/_watcher/watch/{watch_id}/_ack/{action_id}"], 'watcher.ack_watch') + { :path_templates => ["/_watcher/watch/{watch_id}/_ack", "/_watcher/watch/{watch_id}/_ack/{action_id}"], :endpoint => 'watcher.ack_watch' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb index 2f9ca81459..8f716ef6e1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :watch_id Watch ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-activate-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html # def activate_watch(arguments = {}) raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id] @@ -44,8 +44,8 @@ def activate_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_watcher/watch/{watch_id}/_activate"], - 'watcher.activate_watch') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_watcher/watch/{watch_id}/_activate"], :endpoint => 'watcher.activate_watch' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb index ed93ecb15e..3765b607e7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :watch_id Watch ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-deactivate-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html # def deactivate_watch(arguments = {}) raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id] @@ -44,8 +44,8 @@ def deactivate_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_watcher/watch/{watch_id}/_deactivate"], - 'watcher.deactivate_watch') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_watcher/watch/{watch_id}/_deactivate"], :endpoint => 'watcher.deactivate_watch' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb index d5bc8c7cf3..d4d5726e3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id Watch ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-delete-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html # def delete_watch(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -46,13 +46,14 @@ def delete_watch(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_watcher/watch/{id}"], - 'watcher.delete_watch') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_watcher/watch/{id}"], :endpoint => 'watcher.delete_watch' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_watcher/watch/{id}"], 'watcher.delete_watch') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_watcher/watch/{id}"], :endpoint => 'watcher.delete_watch' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb index 7f83faace2..9b4aaa436f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb @@ -29,7 +29,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body Execution control # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-execute-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html # def execute_watch(arguments = {}) arguments = arguments.clone @@ -49,7 +49,7 @@ def execute_watch(arguments = {}) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, - ["/_watcher/watch/{id}/_execute", "/_watcher/watch/_execute"], 'watcher.execute_watch') + { :path_templates => ["/_watcher/watch/{id}/_execute", "/_watcher/watch/_execute"], :endpoint => 'watcher.execute_watch' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb index 69dc9a7340..f526b80a79 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-get-settings.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-settings.html # def get_settings(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def get_settings(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_watcher/settings"], 'watcher.get_settings') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_watcher/settings"], :endpoint => 'watcher.get_settings' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb index a45e09c4fd..daa05ea745 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [String] :id Watch ID # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-get-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html # def get_watch(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -44,7 +44,8 @@ def get_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_watcher/watch/{id}"], 'watcher.get_watch') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_watcher/watch/{id}"], :endpoint => 'watcher.get_watch' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb index 12304bb354..01e8d2bdd0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb @@ -32,7 +32,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The watch # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-put-watch.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html # def put_watch(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] @@ -49,7 +49,8 @@ def put_watch(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_watcher/watch/{id}"], 'watcher.put_watch') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_watcher/watch/{id}"], :endpoint => 'watcher.put_watch' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb index 3186ba2e9a..430e89a992 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body From, size, query, sort and search_after # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-query-watches.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-query-watches.html # def query_watches(arguments = {}) arguments = arguments.clone @@ -45,7 +45,8 @@ def query_watches(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_watcher/_query/watches"], 'watcher.query_watches') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_watcher/_query/watches"], :endpoint => 'watcher.query_watches' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb index 9ebb681554..b0b11bb0a3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-start.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html # def start(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def start(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_watcher/_start"], 'watcher.start') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_watcher/_start"], :endpoint => 'watcher.start' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb index 3eb5f17a9d..01285b1c1c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :emit_stacktraces Emits stack traces of currently running watches # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-stats.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html # def stats(arguments = {}) arguments = arguments.clone @@ -47,8 +47,8 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_watcher/stats", "/_watcher/stats/{metric}"], - 'watcher.stats') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_watcher/stats", "/_watcher/stats/{metric}"], :endpoint => 'watcher.stats' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb index 25211eb04e..5508a24345 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb @@ -26,7 +26,7 @@ module Actions # # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-stop.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html # def stop(arguments = {}) arguments = arguments.clone @@ -39,7 +39,8 @@ def stop(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_watcher/_stop"], 'watcher.stop') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_watcher/_stop"], :endpoint => 'watcher.stop' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb index 2f34d6681b..ab794f3eaa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body An object with the new index settings (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/watcher-api-update-settings.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-update-settings.html # def update_settings(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] @@ -42,8 +42,8 @@ def update_settings(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_watcher/settings"], - 'watcher.update_settings') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_watcher/settings"], :endpoint => 'watcher.update_settings' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb index 11e6f4d109..334ed06baa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb @@ -28,7 +28,7 @@ module Actions # @option arguments [Boolean] :accept_enterprise If this param is used it must be set to true *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/info-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html # def info(arguments = {}) arguments = arguments.clone @@ -41,7 +41,8 @@ def info(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_xpack"], 'xpack.info') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_xpack"], :endpoint => 'xpack.info' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb index ce6e44aa7a..084b3d8c37 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb @@ -27,7 +27,7 @@ module Actions # @option arguments [Time] :master_timeout Specify timeout for watch write operation # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/usage-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html # def usage(arguments = {}) arguments = arguments.clone @@ -40,7 +40,8 @@ def usage(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, ["/_xpack/usage"], 'xpack.usage') + perform_request(method, path, params, body, headers, + { :path_templates => ["/_xpack/usage"], :endpoint => 'xpack.usage' }) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb b/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb index 12f675944a..72477db380 100644 --- a/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb +++ b/elasticsearch-api/lib/elasticsearch/api/namespace/common.rb @@ -34,8 +34,8 @@ def initialize(client) # Delegates the `perform_request` method to the wrapped client # - def perform_request(method, path, params={}, body=nil, headers=nil, paths=nil, endpoint=nil) - client.perform_request method, path, params, body, headers, paths, endpoint + def perform_request(method, path, params={}, body=nil, headers=nil, opts = {}) + client.perform_request method, path, params, body, headers, opts end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb index 4f02f5728e..fd7fb4e475 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/aliases_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/aliases", "/_cat/aliases/{name}"], - "cat.aliases" + { path_templates: ["/_cat/aliases", "/_cat/aliases/{name}"], + endpoint: "cat.aliases" } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb index 7253cc5506..e2033acfb6 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/allocation_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/allocation", "/_cat/allocation/{node_id}"], - "cat.allocation" + path_templates: ["/_cat/allocation", "/_cat/allocation/{node_id}"], + endpoint: "cat.allocation" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb index 97e4809ce0..563ee1edd5 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/component_templates_spec.rb @@ -25,8 +25,8 @@ {}, nil, {}, - ["/_cat/component_templates", "/_cat/component_templates/{name}"], - "cat.component_templates" + path_templates: ["/_cat/component_templates", "/_cat/component_templates/{name}"], + endpoint: "cat.component_templates" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb index 5026bb0587..967fe638dd 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/count_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/count", "/_cat/count/{index}"], - "cat.count" + path_templates: ["/_cat/count", "/_cat/count/{index}"], + endpoint: "cat.count" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb index 6ecd4d6910..6cb116df64 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/fielddata_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/fielddata", "/_cat/fielddata/{fields}"], - "cat.fielddata" + path_templates: ["/_cat/fielddata", "/_cat/fielddata/{fields}"], + endpoint: "cat.fielddata" ] end @@ -44,8 +44,8 @@ {}, nil, {}, - ["/_cat/fielddata", "/_cat/fielddata/{fields}"], - "cat.fielddata" + path_templates: ["/_cat/fielddata", "/_cat/fielddata/{fields}"], + endpoint: "cat.fielddata" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb index 50e0070c20..51554c8997 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/health_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/health"], - "cat.health" + path_templates: ["/_cat/health"], + endpoint: "cat.health" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb index f6f06ef31b..19f5b67d6e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/help_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat"], - "cat.help" + path_templates: ["/_cat"], + endpoint: "cat.help" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb index 20f9d5537d..4a5f1ae577 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/indices", "/_cat/indices/{index}"], - "cat.indices" + path_templates: ["/_cat/indices", "/_cat/indices/{index}"], + endpoint: "cat.indices" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb index 145ce3a886..698faec7bb 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/master_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/master"], - "cat.master" + path_templates: ["/_cat/master"], + endpoint: "cat.master" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb index b5c3bad57c..2da901ef96 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/nodeattrs"], - "cat.nodeattrs" + path_templates: ["/_cat/nodeattrs"], + endpoint: "cat.nodeattrs" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb index 22cfc4813f..4b8516d1da 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/nodes"], - "cat.nodes" + path_templates: ["/_cat/nodes"], + endpoint: "cat.nodes" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb index 63f387fbea..a2161a0fb2 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/pending_tasks"], - + "cat.pending_tasks" + path_templates: ["/_cat/pending_tasks"], + endpoint: "cat.pending_tasks" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb index d52ce1971d..e657f6183a 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/plugins_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/plugins"], - "cat.plugins" + path_templates: ["/_cat/plugins"], + endpoint: "cat.plugins" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb index 825240a431..e230fe94f6 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/recovery_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/recovery", "/_cat/recovery/{index}"], - "cat.recovery" + path_templates: ["/_cat/recovery", "/_cat/recovery/{index}"], + endpoint: "cat.recovery" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb index 8daa365aed..823028bcfc 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/repositories_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/repositories"], - "cat.repositories" + path_templates: ["/_cat/repositories"], + endpoint: "cat.repositories" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb index e5d8cb50dd..e44b011b65 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/segments_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/segments", "/_cat/segments/{index}"], - "cat.segments" + path_templates: ["/_cat/segments", "/_cat/segments/{index}"], + endpoint: "cat.segments" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb index 1ba88bcb14..42e00f2290 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/shards_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/shards", "/_cat/shards/{index}"], - "cat.shards" + path_templates: ["/_cat/shards", "/_cat/shards/{index}"], + endpoint: "cat.shards" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb index 1d308cad18..5606d17cf4 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/snapshot_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/snapshots", "/_cat/snapshots/{repository}"], - "cat.snapshots" + path_templates: ["/_cat/snapshots", "/_cat/snapshots/{repository}"], + endpoint: "cat.snapshots" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb index c0a3d1173b..77f0a12376 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/tasks_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/tasks"], - "cat.tasks" + path_templates: ["/_cat/tasks"], + endpoint: "cat.tasks" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb index 866c55c439..62846c06fc 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/templates_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/templates", "/_cat/templates/{name}"], - "cat.templates" + path_templates: ["/_cat/templates", "/_cat/templates/{name}"], + endpoint: "cat.templates" ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb index 53d964522e..29caeb8efa 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb @@ -26,8 +26,8 @@ {}, nil, {}, - ["/_cat/thread_pool", "/_cat/thread_pool/{thread_pool_patterns}"], - "cat.thread_pool" + path_templates: ["/_cat/thread_pool", "/_cat/thread_pool/{thread_pool_patterns}"], + endpoint: "cat.thread_pool" ] end diff --git a/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb b/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb index f41862dbe3..1346579d69 100644 --- a/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb +++ b/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb @@ -84,7 +84,7 @@ def module_name_helper(name) def ping_perform_request <<~SRC begin - perform_request(method, path, params, body, headers, #{@paths}, '#{@endpoint_name}').status == 200 ? true : false + perform_request(method, path, params, body, headers, { :path_templates => #{@paths}, :endpoint => '#{@endpoint_name}' }).status == 200 ? true : false rescue Exception => e if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not\s*Found|404|ConnectionFailed/i false diff --git a/elasticsearch-api/utils/thor/templates/_perform_request.erb b/elasticsearch-api/utils/thor/templates/_perform_request.erb index f77ac1dc11..d67b5154e5 100644 --- a/elasticsearch-api/utils/thor/templates/_perform_request.erb +++ b/elasticsearch-api/utils/thor/templates/_perform_request.erb @@ -20,30 +20,30 @@ <%= self.send("#{@method_name}_body_helper".to_s) %> headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, <%= @paths %>, '<%= @endpoint_name %>') + perform_request(method, path, params, payload, headers, { :path_templates => <%= @paths %>, :endpoint => '<%= @endpoint_name %>' }) ) <%- elsif @method_name == 'ping' -%> <%= ping_perform_request %> <%- else -%> <%- if needs_ignore_404?(@endpoint_name) %> Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, <%= @paths %>, '<%= @endpoint_name %>').status == 200 ? true : false + perform_request(method, path, params, body, headers, { :path_templates => <%= @paths %>, :endpoint => '<%= @endpoint_name %>' }).status == 200 ? true : false end <%- elsif needs_complex_ignore_404?(@endpoint_name) -%> if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, <%= @paths %>, '<%= @endpoint_name %>') + perform_request(method, path, params, body, headers, { :path_templates => <%= @paths %>, :endpoint => '<%= @endpoint_name %>' }) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, <%= @paths %>, '<%= @endpoint_name %>') + perform_request(method, path, params, body, headers, { :path_templates => <%= @paths %>, :endpoint => '<%= @endpoint_name %>' }) ) end <%- else -%> Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, <%= @paths %>, '<%= @endpoint_name %>') + perform_request(method, path, params, body, headers, { :path_templates => <%= @paths %>, :endpoint => '<%= @endpoint_name %>' }) ) <%- end -%> <%- end -%> From aae3edc82eed012d1805ddcbed6ca62c04f73b1c Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Tue, 11 Jul 2023 11:00:11 +0200 Subject: [PATCH 3/5] Pass set path variables to perform_request as a hash --- .../api/actions/async_search/delete.rb | 10 ++++++++-- .../elasticsearch/api/actions/async_search/get.rb | 10 ++++++++-- .../api/actions/async_search/status.rb | 10 ++++++++-- .../api/actions/async_search/submit.rb | 10 ++++++++-- .../autoscaling/delete_autoscaling_policy.rb | 10 ++++++++-- .../actions/autoscaling/get_autoscaling_capacity.rb | 4 ++-- .../actions/autoscaling/get_autoscaling_policy.rb | 10 ++++++++-- .../actions/autoscaling/put_autoscaling_policy.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/bulk.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cat/aliases.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cat/allocation.rb | 10 ++++++++-- .../api/actions/cat/component_templates.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cat/count.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cat/fielddata.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cat/health.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/help.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/indices.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cat/master.rb | 4 ++-- .../api/actions/cat/ml_data_frame_analytics.rb | 10 ++++++++-- .../elasticsearch/api/actions/cat/ml_datafeeds.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cat/ml_jobs.rb | 10 ++++++++-- .../api/actions/cat/ml_trained_models.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cat/nodeattrs.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/nodes.rb | 4 ++-- .../elasticsearch/api/actions/cat/pending_tasks.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/plugins.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/recovery.rb | 10 ++++++++-- .../elasticsearch/api/actions/cat/repositories.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/segments.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cat/shards.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cat/snapshots.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cat/tasks.rb | 4 ++-- .../lib/elasticsearch/api/actions/cat/templates.rb | 10 ++++++++-- .../elasticsearch/api/actions/cat/thread_pool.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cat/transforms.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/clear_scroll.rb | 13 +++++++++---- .../api/actions/close_point_in_time.rb | 4 ++-- .../api/actions/cluster/allocation_explain.rb | 4 ++-- .../actions/cluster/delete_component_template.rb | 10 ++++++++-- .../cluster/delete_voting_config_exclusions.rb | 4 ++-- .../actions/cluster/exists_component_template.rb | 10 ++++++++-- .../api/actions/cluster/get_component_template.rb | 10 ++++++++-- .../api/actions/cluster/get_settings.rb | 4 ++-- .../lib/elasticsearch/api/actions/cluster/health.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cluster/info.rb | 10 ++++++++-- .../api/actions/cluster/pending_tasks.rb | 4 ++-- .../cluster/post_voting_config_exclusions.rb | 4 ++-- .../api/actions/cluster/put_component_template.rb | 10 ++++++++-- .../api/actions/cluster/put_settings.rb | 4 ++-- .../api/actions/cluster/remote_info.rb | 4 ++-- .../elasticsearch/api/actions/cluster/reroute.rb | 4 ++-- .../lib/elasticsearch/api/actions/cluster/state.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/cluster/stats.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/count.rb | 10 ++++++++-- .../delete_auto_follow_pattern.rb | 10 ++++++++-- .../api/actions/cross_cluster_replication/follow.rb | 10 ++++++++-- .../cross_cluster_replication/follow_info.rb | 10 ++++++++-- .../cross_cluster_replication/follow_stats.rb | 10 ++++++++-- .../cross_cluster_replication/forget_follower.rb | 10 ++++++++-- .../get_auto_follow_pattern.rb | 10 ++++++++-- .../pause_auto_follow_pattern.rb | 10 ++++++++-- .../cross_cluster_replication/pause_follow.rb | 10 ++++++++-- .../put_auto_follow_pattern.rb | 10 ++++++++-- .../resume_auto_follow_pattern.rb | 10 ++++++++-- .../cross_cluster_replication/resume_follow.rb | 10 ++++++++-- .../api/actions/cross_cluster_replication/stats.rb | 4 ++-- .../actions/cross_cluster_replication/unfollow.rb | 10 ++++++++-- .../dangling_indices/delete_dangling_index.rb | 10 ++++++++-- .../dangling_indices/import_dangling_index.rb | 10 ++++++++-- .../dangling_indices/list_dangling_indices.rb | 4 ++-- .../lib/elasticsearch/api/actions/delete.rb | 13 +++++++++---- .../elasticsearch/api/actions/delete_by_query.rb | 10 ++++++++-- .../api/actions/delete_by_query_rethrottle.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/delete_script.rb | 10 ++++++++-- .../api/actions/enrich/delete_policy.rb | 10 ++++++++-- .../api/actions/enrich/execute_policy.rb | 10 ++++++++-- .../elasticsearch/api/actions/enrich/get_policy.rb | 10 ++++++++-- .../elasticsearch/api/actions/enrich/put_policy.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/enrich/stats.rb | 4 ++-- .../lib/elasticsearch/api/actions/eql/delete.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/eql/get.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/eql/get_status.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/eql/search.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/exists.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/exists_source.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/explain.rb | 10 ++++++++-- .../api/actions/features/get_features.rb | 4 ++-- .../api/actions/features/reset_features.rb | 4 ++-- .../lib/elasticsearch/api/actions/field_caps.rb | 10 ++++++++-- .../api/actions/fleet/global_checkpoints.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/fleet/msearch.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/fleet/search.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/get.rb | 13 +++++++++---- .../lib/elasticsearch/api/actions/get_script.rb | 10 ++++++++-- .../elasticsearch/api/actions/get_script_context.rb | 4 ++-- .../api/actions/get_script_languages.rb | 4 ++-- .../lib/elasticsearch/api/actions/get_source.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/graph/explore.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/health_report.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/index.rb | 10 ++++++++-- .../index_lifecycle_management/delete_lifecycle.rb | 10 ++++++++-- .../index_lifecycle_management/explain_lifecycle.rb | 10 ++++++++-- .../index_lifecycle_management/get_lifecycle.rb | 10 ++++++++-- .../index_lifecycle_management/get_status.rb | 4 ++-- .../migrate_to_data_tiers.rb | 4 ++-- .../index_lifecycle_management/move_to_step.rb | 10 ++++++++-- .../index_lifecycle_management/put_lifecycle.rb | 10 ++++++++-- .../index_lifecycle_management/remove_policy.rb | 10 ++++++++-- .../api/actions/index_lifecycle_management/retry.rb | 10 ++++++++-- .../api/actions/index_lifecycle_management/start.rb | 4 ++-- .../api/actions/index_lifecycle_management/stop.rb | 4 ++-- .../elasticsearch/api/actions/indices/add_block.rb | 10 ++++++++-- .../elasticsearch/api/actions/indices/analyze.rb | 10 ++++++++-- .../api/actions/indices/clear_cache.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/indices/clone.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/indices/close.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/indices/create.rb | 10 ++++++++-- .../api/actions/indices/create_data_stream.rb | 10 ++++++++-- .../api/actions/indices/data_streams_stats.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/indices/delete.rb | 13 +++++++++---- .../api/actions/indices/delete_alias.rb | 10 ++++++++-- .../api/actions/indices/delete_data_lifecycle.rb | 10 ++++++++-- .../api/actions/indices/delete_data_stream.rb | 10 ++++++++-- .../api/actions/indices/delete_index_template.rb | 10 ++++++++-- .../api/actions/indices/delete_template.rb | 13 +++++++++---- .../elasticsearch/api/actions/indices/disk_usage.rb | 10 ++++++++-- .../elasticsearch/api/actions/indices/downsample.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/indices/exists.rb | 10 ++++++++-- .../api/actions/indices/exists_alias.rb | 10 ++++++++-- .../api/actions/indices/exists_index_template.rb | 10 ++++++++-- .../api/actions/indices/exists_template.rb | 10 ++++++++-- .../api/actions/indices/explain_data_lifecycle.rb | 10 ++++++++-- .../api/actions/indices/field_usage_stats.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/indices/flush.rb | 10 ++++++++-- .../elasticsearch/api/actions/indices/forcemerge.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/indices/get.rb | 10 ++++++++-- .../elasticsearch/api/actions/indices/get_alias.rb | 10 ++++++++-- .../api/actions/indices/get_data_lifecycle.rb | 10 ++++++++-- .../api/actions/indices/get_data_stream.rb | 10 ++++++++-- .../api/actions/indices/get_field_mapping.rb | 10 ++++++++-- .../api/actions/indices/get_index_template.rb | 10 ++++++++-- .../api/actions/indices/get_mapping.rb | 10 ++++++++-- .../api/actions/indices/get_settings.rb | 10 ++++++++-- .../api/actions/indices/get_template.rb | 10 ++++++++-- .../api/actions/indices/migrate_to_data_stream.rb | 10 ++++++++-- .../api/actions/indices/modify_data_stream.rb | 4 ++-- .../lib/elasticsearch/api/actions/indices/open.rb | 10 ++++++++-- .../api/actions/indices/promote_data_stream.rb | 10 ++++++++-- .../elasticsearch/api/actions/indices/put_alias.rb | 10 ++++++++-- .../api/actions/indices/put_data_lifecycle.rb | 10 ++++++++-- .../api/actions/indices/put_index_template.rb | 10 ++++++++-- .../api/actions/indices/put_mapping.rb | 10 ++++++++-- .../api/actions/indices/put_settings.rb | 10 ++++++++-- .../api/actions/indices/put_template.rb | 10 ++++++++-- .../elasticsearch/api/actions/indices/recovery.rb | 10 ++++++++-- .../elasticsearch/api/actions/indices/refresh.rb | 10 ++++++++-- .../api/actions/indices/reload_search_analyzers.rb | 10 ++++++++-- .../api/actions/indices/resolve_index.rb | 10 ++++++++-- .../elasticsearch/api/actions/indices/rollover.rb | 10 ++++++++-- .../elasticsearch/api/actions/indices/segments.rb | 10 ++++++++-- .../api/actions/indices/shard_stores.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/indices/shrink.rb | 10 ++++++++-- .../api/actions/indices/simulate_index_template.rb | 10 ++++++++-- .../api/actions/indices/simulate_template.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/indices/split.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/indices/stats.rb | 10 ++++++++-- .../elasticsearch/api/actions/indices/unfreeze.rb | 10 ++++++++-- .../api/actions/indices/update_aliases.rb | 4 ++-- .../api/actions/indices/validate_query.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/info.rb | 3 ++- .../api/actions/ingest/delete_pipeline.rb | 10 ++++++++-- .../api/actions/ingest/geo_ip_stats.rb | 4 ++-- .../api/actions/ingest/get_pipeline.rb | 10 ++++++++-- .../api/actions/ingest/processor_grok.rb | 4 ++-- .../api/actions/ingest/put_pipeline.rb | 10 ++++++++-- .../elasticsearch/api/actions/ingest/simulate.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/knn_search.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/license/delete.rb | 4 ++-- .../lib/elasticsearch/api/actions/license/get.rb | 4 ++-- .../api/actions/license/get_basic_status.rb | 4 ++-- .../api/actions/license/get_trial_status.rb | 4 ++-- .../lib/elasticsearch/api/actions/license/post.rb | 4 ++-- .../api/actions/license/post_start_basic.rb | 4 ++-- .../api/actions/license/post_start_trial.rb | 4 ++-- .../api/actions/logstash/delete_pipeline.rb | 10 ++++++++-- .../api/actions/logstash/get_pipeline.rb | 10 ++++++++-- .../api/actions/logstash/put_pipeline.rb | 10 ++++++++-- .../clear_trained_model_deployment_cache.rb | 10 ++++++++-- .../api/actions/machine_learning/close_job.rb | 10 ++++++++-- .../api/actions/machine_learning/delete_calendar.rb | 10 ++++++++-- .../machine_learning/delete_calendar_event.rb | 10 ++++++++-- .../actions/machine_learning/delete_calendar_job.rb | 10 ++++++++-- .../machine_learning/delete_data_frame_analytics.rb | 10 ++++++++-- .../api/actions/machine_learning/delete_datafeed.rb | 10 ++++++++-- .../actions/machine_learning/delete_expired_data.rb | 10 ++++++++-- .../api/actions/machine_learning/delete_filter.rb | 10 ++++++++-- .../api/actions/machine_learning/delete_forecast.rb | 10 ++++++++-- .../api/actions/machine_learning/delete_job.rb | 10 ++++++++-- .../machine_learning/delete_model_snapshot.rb | 10 ++++++++-- .../machine_learning/delete_trained_model.rb | 10 ++++++++-- .../machine_learning/delete_trained_model_alias.rb | 10 ++++++++-- .../machine_learning/estimate_model_memory.rb | 4 ++-- .../actions/machine_learning/evaluate_data_frame.rb | 4 ++-- .../explain_data_frame_analytics.rb | 10 ++++++++-- .../api/actions/machine_learning/flush_job.rb | 10 ++++++++-- .../api/actions/machine_learning/forecast.rb | 10 ++++++++-- .../api/actions/machine_learning/get_buckets.rb | 10 ++++++++-- .../actions/machine_learning/get_calendar_events.rb | 10 ++++++++-- .../api/actions/machine_learning/get_calendars.rb | 10 ++++++++-- .../api/actions/machine_learning/get_categories.rb | 10 ++++++++-- .../machine_learning/get_data_frame_analytics.rb | 10 ++++++++-- .../get_data_frame_analytics_stats.rb | 10 ++++++++-- .../actions/machine_learning/get_datafeed_stats.rb | 10 ++++++++-- .../api/actions/machine_learning/get_datafeeds.rb | 10 ++++++++-- .../api/actions/machine_learning/get_filters.rb | 10 ++++++++-- .../api/actions/machine_learning/get_influencers.rb | 10 ++++++++-- .../api/actions/machine_learning/get_job_stats.rb | 10 ++++++++-- .../api/actions/machine_learning/get_jobs.rb | 10 ++++++++-- .../actions/machine_learning/get_memory_stats.rb | 10 ++++++++-- .../get_model_snapshot_upgrade_stats.rb | 10 ++++++++-- .../actions/machine_learning/get_model_snapshots.rb | 10 ++++++++-- .../actions/machine_learning/get_overall_buckets.rb | 10 ++++++++-- .../api/actions/machine_learning/get_records.rb | 10 ++++++++-- .../actions/machine_learning/get_trained_models.rb | 10 ++++++++-- .../machine_learning/get_trained_models_stats.rb | 10 ++++++++-- .../actions/machine_learning/infer_trained_model.rb | 10 ++++++++-- .../api/actions/machine_learning/info.rb | 4 ++-- .../api/actions/machine_learning/open_job.rb | 10 ++++++++-- .../machine_learning/post_calendar_events.rb | 10 ++++++++-- .../api/actions/machine_learning/post_data.rb | 10 ++++++++-- .../preview_data_frame_analytics.rb | 10 ++++++++-- .../actions/machine_learning/preview_datafeed.rb | 10 ++++++++-- .../api/actions/machine_learning/put_calendar.rb | 10 ++++++++-- .../actions/machine_learning/put_calendar_job.rb | 10 ++++++++-- .../machine_learning/put_data_frame_analytics.rb | 10 ++++++++-- .../api/actions/machine_learning/put_datafeed.rb | 10 ++++++++-- .../api/actions/machine_learning/put_filter.rb | 10 ++++++++-- .../api/actions/machine_learning/put_job.rb | 10 ++++++++-- .../actions/machine_learning/put_trained_model.rb | 10 ++++++++-- .../machine_learning/put_trained_model_alias.rb | 10 ++++++++-- .../put_trained_model_definition_part.rb | 10 ++++++++-- .../put_trained_model_vocabulary.rb | 10 ++++++++-- .../api/actions/machine_learning/reset_job.rb | 10 ++++++++-- .../machine_learning/revert_model_snapshot.rb | 10 ++++++++-- .../actions/machine_learning/set_upgrade_mode.rb | 4 ++-- .../machine_learning/start_data_frame_analytics.rb | 10 ++++++++-- .../api/actions/machine_learning/start_datafeed.rb | 10 ++++++++-- .../start_trained_model_deployment.rb | 10 ++++++++-- .../machine_learning/stop_data_frame_analytics.rb | 10 ++++++++-- .../api/actions/machine_learning/stop_datafeed.rb | 10 ++++++++-- .../stop_trained_model_deployment.rb | 10 ++++++++-- .../machine_learning/update_data_frame_analytics.rb | 10 ++++++++-- .../api/actions/machine_learning/update_datafeed.rb | 10 ++++++++-- .../api/actions/machine_learning/update_filter.rb | 10 ++++++++-- .../api/actions/machine_learning/update_job.rb | 10 ++++++++-- .../machine_learning/update_model_snapshot.rb | 10 ++++++++-- .../update_trained_model_deployment.rb | 10 ++++++++-- .../machine_learning/upgrade_job_snapshot.rb | 10 ++++++++-- .../api/actions/machine_learning/validate.rb | 4 ++-- .../actions/machine_learning/validate_detector.rb | 4 ++-- .../lib/elasticsearch/api/actions/mget.rb | 10 ++++++++-- .../api/actions/migration/deprecations.rb | 10 ++++++++-- .../actions/migration/get_feature_upgrade_status.rb | 4 ++-- .../api/actions/migration/post_feature_upgrade.rb | 4 ++-- .../elasticsearch/api/actions/monitoring/bulk.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/msearch.rb | 10 ++++++++-- .../elasticsearch/api/actions/msearch_template.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/mtermvectors.rb | 10 ++++++++-- .../nodes/clear_repositories_metering_archive.rb | 10 ++++++++-- .../actions/nodes/get_repositories_metering_info.rb | 10 ++++++++-- .../elasticsearch/api/actions/nodes/hot_threads.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/nodes/info.rb | 10 ++++++++-- .../api/actions/nodes/reload_secure_settings.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/nodes/stats.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/nodes/usage.rb | 10 ++++++++-- .../elasticsearch/api/actions/open_point_in_time.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/ping.rb | 4 ++-- .../lib/elasticsearch/api/actions/put_script.rb | 10 ++++++++-- .../api/actions/query_ruleset/delete.rb | 10 ++++++++-- .../elasticsearch/api/actions/query_ruleset/get.rb | 10 ++++++++-- .../elasticsearch/api/actions/query_ruleset/put.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/rank_eval.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/reindex.rb | 4 ++-- .../elasticsearch/api/actions/reindex_rethrottle.rb | 10 ++++++++-- .../api/actions/render_search_template.rb | 10 ++++++++-- .../elasticsearch/api/actions/rollup/delete_job.rb | 10 ++++++++-- .../elasticsearch/api/actions/rollup/get_jobs.rb | 10 ++++++++-- .../api/actions/rollup/get_rollup_caps.rb | 10 ++++++++-- .../api/actions/rollup/get_rollup_index_caps.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/rollup/put_job.rb | 10 ++++++++-- .../api/actions/rollup/rollup_search.rb | 10 ++++++++-- .../elasticsearch/api/actions/rollup/start_job.rb | 10 ++++++++-- .../elasticsearch/api/actions/rollup/stop_job.rb | 10 ++++++++-- .../api/actions/scripts_painless_execute.rb | 4 ++-- .../lib/elasticsearch/api/actions/scroll.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/search.rb | 10 ++++++++-- .../api/actions/search_application/delete.rb | 10 ++++++++-- .../delete_behavioral_analytics.rb | 10 ++++++++-- .../api/actions/search_application/get.rb | 10 ++++++++-- .../search_application/get_behavioral_analytics.rb | 10 ++++++++-- .../api/actions/search_application/list.rb | 4 ++-- .../post_behavioral_analytics_event.rb | 10 ++++++++-- .../api/actions/search_application/put.rb | 10 ++++++++-- .../search_application/put_behavioral_analytics.rb | 10 ++++++++-- .../api/actions/search_application/render_query.rb | 10 ++++++++-- .../api/actions/search_application/search.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/search_mvt.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/search_shards.rb | 10 ++++++++-- .../elasticsearch/api/actions/search_template.rb | 10 ++++++++-- .../api/actions/searchable_snapshots/cache_stats.rb | 10 ++++++++-- .../api/actions/searchable_snapshots/clear_cache.rb | 10 ++++++++-- .../api/actions/searchable_snapshots/mount.rb | 10 ++++++++-- .../api/actions/searchable_snapshots/stats.rb | 10 ++++++++-- .../api/actions/security/activate_user_profile.rb | 4 ++-- .../api/actions/security/authenticate.rb | 4 ++-- .../api/actions/security/bulk_update_api_keys.rb | 4 ++-- .../api/actions/security/change_password.rb | 10 ++++++++-- .../api/actions/security/clear_api_key_cache.rb | 10 ++++++++-- .../api/actions/security/clear_cached_privileges.rb | 10 ++++++++-- .../api/actions/security/clear_cached_realms.rb | 10 ++++++++-- .../api/actions/security/clear_cached_roles.rb | 10 ++++++++-- .../actions/security/clear_cached_service_tokens.rb | 10 ++++++++-- .../api/actions/security/create_api_key.rb | 4 ++-- .../security/create_cross_cluster_api_key.rb | 4 ++-- .../api/actions/security/create_service_token.rb | 10 ++++++++-- .../api/actions/security/delete_privileges.rb | 10 ++++++++-- .../api/actions/security/delete_role.rb | 10 ++++++++-- .../api/actions/security/delete_role_mapping.rb | 10 ++++++++-- .../api/actions/security/delete_service_token.rb | 10 ++++++++-- .../api/actions/security/delete_user.rb | 10 ++++++++-- .../api/actions/security/disable_user.rb | 10 ++++++++-- .../api/actions/security/disable_user_profile.rb | 10 ++++++++-- .../api/actions/security/enable_user.rb | 10 ++++++++-- .../api/actions/security/enable_user_profile.rb | 10 ++++++++-- .../api/actions/security/enroll_kibana.rb | 4 ++-- .../api/actions/security/enroll_node.rb | 4 ++-- .../api/actions/security/get_api_key.rb | 4 ++-- .../api/actions/security/get_builtin_privileges.rb | 4 ++-- .../api/actions/security/get_privileges.rb | 10 ++++++++-- .../elasticsearch/api/actions/security/get_role.rb | 13 +++++++++---- .../api/actions/security/get_role_mapping.rb | 10 ++++++++-- .../api/actions/security/get_service_accounts.rb | 10 ++++++++-- .../api/actions/security/get_service_credentials.rb | 10 ++++++++-- .../elasticsearch/api/actions/security/get_token.rb | 4 ++-- .../elasticsearch/api/actions/security/get_user.rb | 13 +++++++++---- .../api/actions/security/get_user_privileges.rb | 4 ++-- .../api/actions/security/get_user_profile.rb | 10 ++++++++-- .../api/actions/security/grant_api_key.rb | 4 ++-- .../api/actions/security/has_privileges.rb | 10 ++++++++-- .../actions/security/has_privileges_user_profile.rb | 4 ++-- .../api/actions/security/invalidate_api_key.rb | 4 ++-- .../api/actions/security/invalidate_token.rb | 4 ++-- .../api/actions/security/oidc_authenticate.rb | 4 ++-- .../api/actions/security/oidc_logout.rb | 4 ++-- .../actions/security/oidc_prepare_authentication.rb | 4 ++-- .../api/actions/security/put_privileges.rb | 4 ++-- .../elasticsearch/api/actions/security/put_role.rb | 10 ++++++++-- .../api/actions/security/put_role_mapping.rb | 10 ++++++++-- .../elasticsearch/api/actions/security/put_user.rb | 10 ++++++++-- .../api/actions/security/query_api_keys.rb | 4 ++-- .../api/actions/security/saml_authenticate.rb | 4 ++-- .../api/actions/security/saml_complete_logout.rb | 4 ++-- .../api/actions/security/saml_invalidate.rb | 4 ++-- .../api/actions/security/saml_logout.rb | 4 ++-- .../actions/security/saml_prepare_authentication.rb | 4 ++-- .../security/saml_service_provider_metadata.rb | 10 ++++++++-- .../api/actions/security/suggest_user_profiles.rb | 4 ++-- .../api/actions/security/update_api_key.rb | 10 ++++++++-- .../security/update_cross_cluster_api_key.rb | 10 ++++++++-- .../actions/security/update_user_profile_data.rb | 10 ++++++++-- .../api/actions/shutdown/delete_node.rb | 10 ++++++++-- .../elasticsearch/api/actions/shutdown/get_node.rb | 10 ++++++++-- .../elasticsearch/api/actions/shutdown/put_node.rb | 10 ++++++++-- .../api/actions/snapshot/cleanup_repository.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/snapshot/clone.rb | 10 ++++++++-- .../elasticsearch/api/actions/snapshot/create.rb | 10 ++++++++-- .../api/actions/snapshot/create_repository.rb | 10 ++++++++-- .../elasticsearch/api/actions/snapshot/delete.rb | 13 +++++++++---- .../api/actions/snapshot/delete_repository.rb | 13 +++++++++---- .../lib/elasticsearch/api/actions/snapshot/get.rb | 13 +++++++++---- .../api/actions/snapshot/get_repository.rb | 13 +++++++++---- .../api/actions/snapshot/repository_analyze.rb | 10 ++++++++-- .../elasticsearch/api/actions/snapshot/restore.rb | 10 ++++++++-- .../elasticsearch/api/actions/snapshot/status.rb | 13 +++++++++---- .../api/actions/snapshot/verify_repository.rb | 10 ++++++++-- .../delete_lifecycle.rb | 10 ++++++++-- .../execute_lifecycle.rb | 10 ++++++++-- .../execute_retention.rb | 4 ++-- .../snapshot_lifecycle_management/get_lifecycle.rb | 10 ++++++++-- .../snapshot_lifecycle_management/get_stats.rb | 4 ++-- .../snapshot_lifecycle_management/get_status.rb | 4 ++-- .../snapshot_lifecycle_management/put_lifecycle.rb | 10 ++++++++-- .../actions/snapshot_lifecycle_management/start.rb | 4 ++-- .../actions/snapshot_lifecycle_management/stop.rb | 4 ++-- .../elasticsearch/api/actions/sql/clear_cursor.rb | 4 ++-- .../elasticsearch/api/actions/sql/delete_async.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/sql/get_async.rb | 10 ++++++++-- .../api/actions/sql/get_async_status.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/sql/query.rb | 4 ++-- .../lib/elasticsearch/api/actions/sql/translate.rb | 4 ++-- .../elasticsearch/api/actions/ssl/certificates.rb | 4 ++-- .../elasticsearch/api/actions/synonym_rule/put.rb | 10 ++++++++-- .../elasticsearch/api/actions/synonyms/delete.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/synonyms/get.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/synonyms/put.rb | 10 ++++++++-- .../elasticsearch/api/actions/synonyms_sets/get.rb | 4 ++-- .../lib/elasticsearch/api/actions/tasks/cancel.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/tasks/get.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/tasks/list.rb | 4 ++-- .../lib/elasticsearch/api/actions/terms_enum.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/termvectors.rb | 10 ++++++++-- .../api/actions/text_structure/find_structure.rb | 4 ++-- .../api/actions/transform/delete_transform.rb | 10 ++++++++-- .../api/actions/transform/get_transform.rb | 10 ++++++++-- .../api/actions/transform/get_transform_stats.rb | 10 ++++++++-- .../api/actions/transform/preview_transform.rb | 10 ++++++++-- .../api/actions/transform/put_transform.rb | 10 ++++++++-- .../api/actions/transform/reset_transform.rb | 10 ++++++++-- .../api/actions/transform/schedule_now_transform.rb | 10 ++++++++-- .../api/actions/transform/start_transform.rb | 10 ++++++++-- .../api/actions/transform/stop_transform.rb | 10 ++++++++-- .../api/actions/transform/update_transform.rb | 10 ++++++++-- .../api/actions/transform/upgrade_transforms.rb | 4 ++-- .../lib/elasticsearch/api/actions/update.rb | 13 +++++++++---- .../elasticsearch/api/actions/update_by_query.rb | 10 ++++++++-- .../api/actions/update_by_query_rethrottle.rb | 10 ++++++++-- .../elasticsearch/api/actions/watcher/ack_watch.rb | 10 ++++++++-- .../api/actions/watcher/activate_watch.rb | 10 ++++++++-- .../api/actions/watcher/deactivate_watch.rb | 10 ++++++++-- .../api/actions/watcher/delete_watch.rb | 13 +++++++++---- .../api/actions/watcher/execute_watch.rb | 10 ++++++++-- .../api/actions/watcher/get_settings.rb | 4 ++-- .../elasticsearch/api/actions/watcher/get_watch.rb | 10 ++++++++-- .../elasticsearch/api/actions/watcher/put_watch.rb | 10 ++++++++-- .../api/actions/watcher/query_watches.rb | 4 ++-- .../lib/elasticsearch/api/actions/watcher/start.rb | 4 ++-- .../lib/elasticsearch/api/actions/watcher/stats.rb | 10 ++++++++-- .../lib/elasticsearch/api/actions/watcher/stop.rb | 4 ++-- .../api/actions/watcher/update_settings.rb | 4 ++-- .../lib/elasticsearch/api/actions/xpack/info.rb | 4 ++-- .../lib/elasticsearch/api/actions/xpack/usage.rb | 4 ++-- elasticsearch-api/utils/thor/generate_source.rb | 2 ++ .../utils/thor/generator/endpoint_specifics.rb | 2 +- .../utils/thor/templates/_perform_request.erb | 10 +++++----- elasticsearch-api/utils/thor/templates/method.erb | 9 +++++++++ 445 files changed, 2959 insertions(+), 915 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb index 746a45316f..cd7a19a945 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb @@ -34,6 +34,13 @@ def delete(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "async_search.delete" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_async_search/{id}"], :endpoint => 'async_search.delete' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb index e54a09c86e..a201e59703 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb @@ -37,6 +37,13 @@ def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "async_search.get" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -47,8 +54,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_async_search/{id}"], :endpoint => 'async_search.get' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb index 8425404424..b7d6f4b75f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb @@ -34,6 +34,13 @@ def status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "async_search.status" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_async_search/status/{id}"], :endpoint => 'async_search.status' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb index 6b4dea7f87..3e7ccad886 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb @@ -74,6 +74,13 @@ module Actions def submit(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "async_search.submit" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -88,8 +95,7 @@ def submit(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_async_search", "/{index}/_async_search"], :endpoint => 'async_search.submit' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb index 5a7fe355c1..0733e660cd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb @@ -34,6 +34,13 @@ def delete_autoscaling_policy(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "autoscaling.delete_autoscaling_policy" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete_autoscaling_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_autoscaling/policy/{name}"], :endpoint => 'autoscaling.delete_autoscaling_policy' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb index bf344e9bf4..cc1b14dc91 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb @@ -31,6 +31,7 @@ module Actions def get_autoscaling_capacity(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "autoscaling.get_autoscaling_capacity" } body = nil @@ -39,8 +40,7 @@ def get_autoscaling_capacity(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_autoscaling/capacity"], :endpoint => 'autoscaling.get_autoscaling_capacity' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb index aff721075c..2766b005c2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb @@ -34,6 +34,13 @@ def get_autoscaling_policy(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "autoscaling.get_autoscaling_policy" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def get_autoscaling_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_autoscaling/policy/{name}"], :endpoint => 'autoscaling.get_autoscaling_policy' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb index 2035fde564..1ccaab0f50 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb @@ -36,6 +36,13 @@ def put_autoscaling_policy(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "autoscaling.put_autoscaling_policy" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def put_autoscaling_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_autoscaling/policy/{name}"], :endpoint => 'autoscaling.put_autoscaling_policy' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index 9370fc9b24..c4493e2d70 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -45,6 +45,13 @@ def bulk(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "bulk" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -66,8 +73,7 @@ def bulk(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, - { :path_templates => ["/_bulk", "/{index}/_bulk"], :endpoint => 'bulk' }) + perform_request(method, path, params, payload, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index 76ae536fe4..07ff8e7767 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -39,6 +39,13 @@ module Actions def aliases(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.aliases" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -54,8 +61,7 @@ def aliases(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/aliases", "/_cat/aliases/{name}"], :endpoint => 'cat.aliases' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb index 0d5211511f..61133e922f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb @@ -40,6 +40,13 @@ module Actions def allocation(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.allocation" } + + defined_params = ["node_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -55,8 +62,7 @@ def allocation(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/allocation", "/_cat/allocation/{node_id}"], :endpoint => 'cat.allocation' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb index 19b5962e67..6fbcc3016a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb @@ -39,6 +39,13 @@ module Actions def component_templates(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.component_templates" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -53,8 +60,7 @@ def component_templates(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/component_templates", "/_cat/component_templates/{name}"], :endpoint => 'cat.component_templates' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb index 3d1095bf1f..b731494db4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb @@ -37,6 +37,13 @@ module Actions def count(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.count" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -52,8 +59,7 @@ def count(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/count", "/_cat/count/{index}"], :endpoint => 'cat.count' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb index 7ef8758164..bdf3f20998 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb @@ -38,6 +38,13 @@ module Actions def fielddata(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.fielddata" } + + defined_params = ["fields"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -52,8 +59,7 @@ def fielddata(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/fielddata", "/_cat/fielddata/{fields}"], :endpoint => 'cat.fielddata' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb index 9340e997d7..b340111312 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb @@ -38,6 +38,7 @@ module Actions def health(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.health" } body = nil @@ -47,8 +48,7 @@ def health(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/health"], :endpoint => 'cat.health' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb index d9b145eda1..cb639af4ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb @@ -33,6 +33,7 @@ module Actions def help(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.help" } body = nil @@ -41,8 +42,7 @@ def help(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat"], :endpoint => 'cat.help' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb index a21c503208..eb7ddc2737 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb @@ -44,6 +44,13 @@ module Actions def indices(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.indices" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -59,8 +66,7 @@ def indices(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/indices", "/_cat/indices/{index}"], :endpoint => 'cat.indices' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb index 25569a2c87..80138a7e83 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb @@ -38,6 +38,7 @@ module Actions def master(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.master" } body = nil @@ -46,8 +47,7 @@ def master(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/master"], :endpoint => 'cat.master' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb index 75715ff358..7dddd05810 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb @@ -40,6 +40,13 @@ module Actions def ml_data_frame_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.ml_data_frame_analytics" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -54,8 +61,7 @@ def ml_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/ml/data_frame/analytics", "/_cat/ml/data_frame/analytics/{id}"], :endpoint => 'cat.ml_data_frame_analytics' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb index 41427dbf04..6020ac6b09 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb @@ -39,6 +39,13 @@ module Actions def ml_datafeeds(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.ml_datafeeds" } + + defined_params = ["datafeed_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -53,8 +60,7 @@ def ml_datafeeds(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/ml/datafeeds", "/_cat/ml/datafeeds/{datafeed_id}"], :endpoint => 'cat.ml_datafeeds' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb index 016f97d688..264a0dc294 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb @@ -40,6 +40,13 @@ module Actions def ml_jobs(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.ml_jobs" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -54,8 +61,7 @@ def ml_jobs(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/ml/anomaly_detectors", "/_cat/ml/anomaly_detectors/{job_id}"], :endpoint => 'cat.ml_jobs' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb index 64448fbf59..f681ad34a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb @@ -42,6 +42,13 @@ module Actions def ml_trained_models(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.ml_trained_models" } + + defined_params = ["model_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -56,8 +63,7 @@ def ml_trained_models(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/ml/trained_models", "/_cat/ml/trained_models/{model_id}"], :endpoint => 'cat.ml_trained_models' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb index 5b63123bfa..cc527dbf7a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb @@ -38,6 +38,7 @@ module Actions def nodeattrs(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.nodeattrs" } body = nil @@ -46,8 +47,7 @@ def nodeattrs(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/nodeattrs"], :endpoint => 'cat.nodeattrs' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb index 583997b95a..aac2b15335 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb @@ -41,6 +41,7 @@ module Actions def nodes(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.nodes" } body = nil @@ -50,8 +51,7 @@ def nodes(arguments = {}) params[:h] = Utils.__listify(params[:h], escape: false) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/nodes"], :endpoint => 'cat.nodes' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb index d299af5c82..1b202c1a79 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb @@ -39,6 +39,7 @@ module Actions def pending_tasks(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.pending_tasks" } body = nil @@ -48,8 +49,7 @@ def pending_tasks(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/pending_tasks"], :endpoint => 'cat.pending_tasks' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb index 8b4f9396f3..add3fbb5fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb @@ -39,6 +39,7 @@ module Actions def plugins(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.plugins" } body = nil @@ -47,8 +48,7 @@ def plugins(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/plugins"], :endpoint => 'cat.plugins' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb index 9dc11d0947..fa21017b67 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb @@ -41,6 +41,13 @@ module Actions def recovery(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.recovery" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -56,8 +63,7 @@ def recovery(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/recovery", "/_cat/recovery/{index}"], :endpoint => 'cat.recovery' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb index 544e48ce99..e89ee660c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb @@ -38,6 +38,7 @@ module Actions def repositories(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.repositories" } body = nil @@ -46,8 +47,7 @@ def repositories(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/repositories"], :endpoint => 'cat.repositories' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb index 1143eeaf49..d2101486e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb @@ -38,6 +38,13 @@ module Actions def segments(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.segments" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -52,8 +59,7 @@ def segments(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/segments", "/_cat/segments/{index}"], :endpoint => 'cat.segments' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb index a18dd7a510..2d748bd9cb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb @@ -40,6 +40,13 @@ module Actions def shards(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.shards" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -55,8 +62,7 @@ def shards(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/shards", "/_cat/shards/{index}"], :endpoint => 'cat.shards' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb index 12be35f680..48b6808745 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb @@ -40,6 +40,13 @@ module Actions def snapshots(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.snapshots" } + + defined_params = ["repository"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -54,8 +61,7 @@ def snapshots(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/snapshots", "/_cat/snapshots/{repository}"], :endpoint => 'cat.snapshots' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb index 8637989abd..6ca3767694 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb @@ -45,6 +45,7 @@ module Actions def tasks(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.tasks" } body = nil @@ -53,8 +54,7 @@ def tasks(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/tasks"], :endpoint => 'cat.tasks' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb index 72f9100633..0f878d2e3f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb @@ -39,6 +39,13 @@ module Actions def templates(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.templates" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -53,8 +60,7 @@ def templates(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/templates", "/_cat/templates/{name}"], :endpoint => 'cat.templates' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb index 345002862c..5e3a1546ae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb @@ -41,6 +41,13 @@ module Actions def thread_pool(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.thread_pool" } + + defined_params = ["thread_pool_patterns"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -56,8 +63,7 @@ def thread_pool(arguments = {}) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/thread_pool", "/_cat/thread_pool/{thread_pool_patterns}"], :endpoint => 'cat.thread_pool' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb index fe141f5743..9e37b9d218 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb @@ -41,6 +41,13 @@ module Actions def transforms(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cat.transforms" } + + defined_params = ["transform_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -55,8 +62,7 @@ def transforms(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cat/transforms", "/_cat/transforms/{transform_id}"], :endpoint => 'cat.transforms' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb index 960a01ad3d..fe7e9d0819 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb @@ -37,6 +37,13 @@ module Actions def clear_scroll(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "clear_scroll" } + + defined_params = ["scroll_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -53,14 +60,12 @@ def clear_scroll(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_search/scroll", "/_search/scroll/{scroll_id}"], :endpoint => 'clear_scroll' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_search/scroll", "/_search/scroll/{scroll_id}"], :endpoint => 'clear_scroll' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb index 26152f2d35..9caae27240 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb @@ -31,6 +31,7 @@ module Actions def close_point_in_time(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "close_point_in_time" } body = arguments.delete(:body) @@ -39,8 +40,7 @@ def close_point_in_time(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_pit"], :endpoint => 'close_point_in_time' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb index 02815878e5..3d9d9714bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb @@ -34,6 +34,7 @@ module Actions def allocation_explain(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.allocation_explain" } body = arguments.delete(:body) @@ -47,8 +48,7 @@ def allocation_explain(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cluster/allocation/explain"], :endpoint => 'cluster.allocation_explain' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb index da8dfe4983..bf72f66044 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb @@ -36,6 +36,13 @@ def delete_component_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.delete_component_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def delete_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_component_template/{name}"], :endpoint => 'cluster.delete_component_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb index 995013caa6..181b8adf60 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb @@ -33,6 +33,7 @@ module Actions def delete_voting_config_exclusions(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.delete_voting_config_exclusions" } body = nil @@ -41,8 +42,7 @@ def delete_voting_config_exclusions(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cluster/voting_config_exclusions"], :endpoint => 'cluster.delete_voting_config_exclusions' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb index a596df3301..f43946a51a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb @@ -36,6 +36,13 @@ def exists_component_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.exists_component_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def exists_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_component_template/{name}"], :endpoint => 'cluster.exists_component_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb index 19dcf61103..d584748458 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb @@ -35,6 +35,13 @@ module Actions def get_component_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.get_component_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -49,8 +56,7 @@ def get_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_component_template", "/_component_template/{name}"], :endpoint => 'cluster.get_component_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb index 1905b1c44c..190b8fe129 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb @@ -35,6 +35,7 @@ module Actions def get_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.get_settings" } body = nil @@ -43,8 +44,7 @@ def get_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cluster/settings"], :endpoint => 'cluster.get_settings' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb index 346b8a318a..760aeb58ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb @@ -43,6 +43,13 @@ module Actions def health(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.health" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -57,8 +64,7 @@ def health(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cluster/health", "/_cluster/health/{index}"], :endpoint => 'cluster.health' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb index 1eb2c367df..46638923d2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb @@ -34,6 +34,13 @@ def info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.info" } + + defined_params = ["target"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_info/{target}"], :endpoint => 'cluster.info' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb index f6806f55dc..0b5d2d80fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb @@ -34,6 +34,7 @@ module Actions def pending_tasks(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.pending_tasks" } body = nil @@ -42,8 +43,7 @@ def pending_tasks(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cluster/pending_tasks"], :endpoint => 'cluster.pending_tasks' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb index a772de0426..a1335e2924 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb @@ -35,6 +35,7 @@ module Actions def post_voting_config_exclusions(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.post_voting_config_exclusions" } body = nil @@ -43,8 +44,7 @@ def post_voting_config_exclusions(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cluster/voting_config_exclusions"], :endpoint => 'cluster.post_voting_config_exclusions' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb index 9ac57955b1..6720350a4f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb @@ -39,6 +39,13 @@ def put_component_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.put_component_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def put_component_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_component_template/{name}"], :endpoint => 'cluster.put_component_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb index aaaeec7cc6..82501cc4cd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb @@ -37,6 +37,7 @@ def put_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.put_settings" } body = arguments.delete(:body) || {} @@ -45,8 +46,7 @@ def put_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cluster/settings"], :endpoint => 'cluster.put_settings' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb index ad4d7ea1ce..31d7e78a85 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb @@ -31,6 +31,7 @@ module Actions def remote_info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.remote_info" } body = nil @@ -39,8 +40,7 @@ def remote_info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_remote/info"], :endpoint => 'cluster.remote_info' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb index 75ca14f9b0..589aba7e49 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb @@ -38,6 +38,7 @@ module Actions def reroute(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.reroute" } body = arguments.delete(:body) || {} @@ -46,8 +47,7 @@ def reroute(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cluster/reroute"], :endpoint => 'cluster.reroute' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb index b7b6058b73..45444c344c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb @@ -41,6 +41,13 @@ module Actions def state(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.state" } + + defined_params = ["metric", "index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -59,8 +66,7 @@ def state(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cluster/state", "/_cluster/state/{metric}", "/_cluster/state/{metric}/{index}"], :endpoint => 'cluster.state' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb index 68221feac2..6f19a90a89 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb @@ -34,6 +34,13 @@ module Actions def stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "cluster.stats" } + + defined_params = ["node_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cluster/stats", "/_cluster/stats/nodes/{node_id}"], :endpoint => 'cluster.stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb index ffc8e43fce..25fc06ddc3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb @@ -46,6 +46,13 @@ module Actions def count(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "count" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -65,8 +72,7 @@ def count(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_count", "/{index}/_count"], :endpoint => 'count' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb index 3d68c27187..1efaa97e6d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb @@ -34,6 +34,13 @@ def delete_auto_follow_pattern(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.delete_auto_follow_pattern" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ccr/auto_follow/{name}"], :endpoint => 'ccr.delete_auto_follow_pattern' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb index 172ebed859..092f25bf33 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb @@ -37,6 +37,13 @@ def follow(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.follow" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -47,8 +54,7 @@ def follow(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_ccr/follow"], :endpoint => 'ccr.follow' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb index 87456db0d9..437d098bab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb @@ -34,6 +34,13 @@ def follow_info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.follow_info" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def follow_info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_ccr/info"], :endpoint => 'ccr.follow_info' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb index eadfb23a03..2dfab17706 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb @@ -34,6 +34,13 @@ def follow_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.follow_stats" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def follow_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_ccr/stats"], :endpoint => 'ccr.follow_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb index 5bffc61307..6f5b9a8df2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb @@ -36,6 +36,13 @@ def forget_follower(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.forget_follower" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def forget_follower(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_ccr/forget_follower"], :endpoint => 'ccr.forget_follower' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb index d9eeef0c27..ec7978a2ca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb @@ -32,6 +32,13 @@ module Actions def get_auto_follow_pattern(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.get_auto_follow_pattern" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def get_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ccr/auto_follow", "/_ccr/auto_follow/{name}"], :endpoint => 'ccr.get_auto_follow_pattern' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb index 3079fee814..514b102f26 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb @@ -34,6 +34,13 @@ def pause_auto_follow_pattern(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.pause_auto_follow_pattern" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def pause_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ccr/auto_follow/{name}/pause"], :endpoint => 'ccr.pause_auto_follow_pattern' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb index 49dc89def6..2ef1e99126 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb @@ -34,6 +34,13 @@ def pause_follow(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.pause_follow" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def pause_follow(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_ccr/pause_follow"], :endpoint => 'ccr.pause_follow' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb index 1a485eb2b7..baab1b10bf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb @@ -36,6 +36,13 @@ def put_auto_follow_pattern(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.put_auto_follow_pattern" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def put_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ccr/auto_follow/{name}"], :endpoint => 'ccr.put_auto_follow_pattern' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb index e02bd3c702..181fbab62f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb @@ -34,6 +34,13 @@ def resume_auto_follow_pattern(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.resume_auto_follow_pattern" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def resume_auto_follow_pattern(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ccr/auto_follow/{name}/resume"], :endpoint => 'ccr.resume_auto_follow_pattern' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb index 181eb02228..e0e0efd1ba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb @@ -35,6 +35,13 @@ def resume_follow(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.resume_follow" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -45,8 +52,7 @@ def resume_follow(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_ccr/resume_follow"], :endpoint => 'ccr.resume_follow' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb index fec80ad6d5..125d5f2e3c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb @@ -31,6 +31,7 @@ module Actions def stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.stats" } body = nil @@ -39,8 +40,7 @@ def stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ccr/stats"], :endpoint => 'ccr.stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb index 3f5a5662eb..50157a8b70 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb @@ -34,6 +34,13 @@ def unfollow(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ccr.unfollow" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def unfollow(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_ccr/unfollow"], :endpoint => 'ccr.unfollow' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb index f0029b087d..47c5e91107 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb @@ -37,6 +37,13 @@ def delete_dangling_index(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "dangling_indices.delete_dangling_index" } + + defined_params = ["index_uuid"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -47,8 +54,7 @@ def delete_dangling_index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_dangling/{index_uuid}"], :endpoint => 'dangling_indices.delete_dangling_index' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb index 30cbbd209f..76ef73f54b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb @@ -37,6 +37,13 @@ def import_dangling_index(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "dangling_indices.import_dangling_index" } + + defined_params = ["index_uuid"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -47,8 +54,7 @@ def import_dangling_index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_dangling/{index_uuid}"], :endpoint => 'dangling_indices.import_dangling_index' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb index 867b2829bb..3fe7bc68c7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb @@ -31,6 +31,7 @@ module Actions def list_dangling_indices(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "dangling_indices.list_dangling_indices" } body = nil @@ -39,8 +40,7 @@ def list_dangling_indices(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_dangling"], :endpoint => 'dangling_indices.list_dangling_indices' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb index d23364794e..5fd19e1e04 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb @@ -43,6 +43,13 @@ def delete(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "delete" } + + defined_params = ["index", "id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -57,14 +64,12 @@ def delete(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_doc/{id}"], :endpoint => 'delete' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_doc/{id}"], :endpoint => 'delete' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb index 0754839c18..dd53073924 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb @@ -64,6 +64,13 @@ def delete_by_query(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "delete_by_query" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -74,8 +81,7 @@ def delete_by_query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_delete_by_query"], :endpoint => 'delete_by_query' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb index b752f12a8b..f4b7e1718f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb @@ -34,6 +34,13 @@ def delete_by_query_rethrottle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "delete_by_query_rethrottle" } + + defined_params = ["task_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete_by_query_rethrottle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_delete_by_query/{task_id}/_rethrottle"], :endpoint => 'delete_by_query_rethrottle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb index bf0df87f23..655b437083 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb @@ -35,6 +35,13 @@ def delete_script(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "delete_script" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def delete_script(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_scripts/{id}"], :endpoint => 'delete_script' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb index 721834a2ed..4a24ed5369 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb @@ -34,6 +34,13 @@ def delete_policy(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "enrich.delete_policy" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_enrich/policy/{name}"], :endpoint => 'enrich.delete_policy' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb index d62fb762bb..ca0045745c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb @@ -35,6 +35,13 @@ def execute_policy(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "enrich.execute_policy" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def execute_policy(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_enrich/policy/{name}/_execute"], :endpoint => 'enrich.execute_policy' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb index 6cbedd8023..c247896923 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb @@ -32,6 +32,13 @@ module Actions def get_policy(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "enrich.get_policy" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def get_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_enrich/policy/{name}", "/_enrich/policy"], :endpoint => 'enrich.get_policy' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb index 6ae7abb10d..764d35a57f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb @@ -36,6 +36,13 @@ def put_policy(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "enrich.put_policy" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def put_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_enrich/policy/{name}"], :endpoint => 'enrich.put_policy' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb index 4c3374ee3f..a502d3a175 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb @@ -31,6 +31,7 @@ module Actions def stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "enrich.stats" } body = nil @@ -39,8 +40,7 @@ def stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_enrich/_stats"], :endpoint => 'enrich.stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb index acda290276..dfcc21f7fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb @@ -34,6 +34,13 @@ def delete(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "eql.delete" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_eql/search/{id}"], :endpoint => 'eql.delete' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb index e6da098cbb..c56c76f546 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb @@ -36,6 +36,13 @@ def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "eql.get" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_eql/search/{id}"], :endpoint => 'eql.get' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb index 27d1618975..1eaf3ae954 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb @@ -34,6 +34,13 @@ def get_status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "eql.get_status" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def get_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_eql/search/status/{id}"], :endpoint => 'eql.get_status' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb index 6605b61466..47cd640055 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb @@ -39,6 +39,13 @@ def search(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "eql.search" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_eql/search"], :endpoint => 'eql.search' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb index 7566e05b75..cc736631c3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb @@ -45,6 +45,13 @@ def exists(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "exists" } + + defined_params = ["index", "id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -57,8 +64,7 @@ def exists(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_doc/{id}"], :endpoint => 'exists' }).status == 200 ? true : false + perform_request(method, path, params, body, headers, opts).status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb index 1941af4851..753d449fb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb @@ -44,6 +44,13 @@ def exists_source(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "exists_source" } + + defined_params = ["index", "id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -56,8 +63,7 @@ def exists_source(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_source/{id}"], :endpoint => 'exists_source' }) + perform_request(method, path, params, body, headers, request_opts) ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb index 0bdca81b69..e68c5bb2ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb @@ -48,6 +48,13 @@ def explain(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "explain" } + + defined_params = ["index", "id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -65,8 +72,7 @@ def explain(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_explain/{id}"], :endpoint => 'explain' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb index 4b7ee4a949..87a758e228 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb @@ -32,6 +32,7 @@ module Actions def get_features(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "features.get_features" } body = nil @@ -40,8 +41,7 @@ def get_features(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_features"], :endpoint => 'features.get_features' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb index 59ccb3e6be..195f5d1cae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb @@ -35,6 +35,7 @@ module Actions def reset_features(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "features.reset_features" } body = nil @@ -43,8 +44,7 @@ def reset_features(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_features/_reset"], :endpoint => 'features.reset_features' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb index e2c303019b..864bc88286 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb @@ -39,6 +39,13 @@ module Actions def field_caps(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "field_caps" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -58,8 +65,7 @@ def field_caps(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_field_caps", "/{index}/_field_caps"], :endpoint => 'field_caps' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb index c78ec67a00..390c425147 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb @@ -38,6 +38,13 @@ def global_checkpoints(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "fleet.global_checkpoints" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def global_checkpoints(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_fleet/global_checkpoints"], :endpoint => 'fleet.global_checkpoints' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb index 3ae2848661..f1b9a17d46 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/msearch.rb @@ -39,6 +39,13 @@ def msearch(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "fleet.msearch" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -76,8 +83,7 @@ def msearch(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, - { :path_templates => ["/_fleet/_fleet_msearch", "/{index}/_fleet/_fleet_msearch"], :endpoint => 'fleet.msearch' }) + perform_request(method, path, params, payload, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb index 9914462cea..a6ca4547ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/search.rb @@ -42,6 +42,13 @@ def search(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "fleet.search" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -57,8 +64,7 @@ def search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_fleet/_fleet_search"], :endpoint => 'fleet.search' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb index f5b60bb374..eb901213db 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb @@ -46,6 +46,13 @@ def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "get" } + + defined_params = ["index", "id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -60,14 +67,12 @@ def get(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_doc/{id}"], :endpoint => 'get' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_doc/{id}"], :endpoint => 'get' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb index 9b893aec9d..d921ac1a2d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb @@ -34,6 +34,13 @@ def get_script(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "get_script" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def get_script(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_scripts/{id}"], :endpoint => 'get_script' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb index 2b8e8787e6..e396f71218 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb @@ -30,6 +30,7 @@ module Actions def get_script_context(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "get_script_context" } body = nil @@ -38,8 +39,7 @@ def get_script_context(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_script_context"], :endpoint => 'get_script_context' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb index 13079e3806..35c6dfde20 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb @@ -30,6 +30,7 @@ module Actions def get_script_languages(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "get_script_languages" } body = nil @@ -38,8 +39,7 @@ def get_script_languages(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_script_language"], :endpoint => 'get_script_languages' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb index eab6c43a17..d1b09f6416 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb @@ -44,6 +44,13 @@ def get_source(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "get_source" } + + defined_params = ["index", "id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -56,8 +63,7 @@ def get_source(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_source/{id}"], :endpoint => 'get_source' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb index 9775fba618..e38346809a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb @@ -37,6 +37,13 @@ def explore(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "graph.explore" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -52,8 +59,7 @@ def explore(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_graph/explore"], :endpoint => 'graph.explore' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb index 45a71fd586..c9dcdc1b47 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/health_report.rb @@ -34,6 +34,13 @@ module Actions def health_report(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "health_report" } + + defined_params = ["feature"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def health_report(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_health_report", "/_health_report/{feature}"], :endpoint => 'health_report' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb index 2c19a0e9d8..2dc4d38402 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb @@ -47,6 +47,13 @@ def index(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "index" } + + defined_params = ["index", "id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -63,8 +70,7 @@ def index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_doc/{id}", "/{index}/_doc"], :endpoint => 'index' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb index 0440fb6d84..6c4b33864e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb @@ -34,6 +34,13 @@ def delete_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ilm.delete_lifecycle" } + + defined_params = ["policy"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ilm/policy/{policy}"], :endpoint => 'ilm.delete_lifecycle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb index 7adbd341a9..2e888236ce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb @@ -36,6 +36,13 @@ def explain_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ilm.explain_lifecycle" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def explain_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_ilm/explain"], :endpoint => 'ilm.explain_lifecycle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb index 59d22ebcd3..c00a190ffd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb @@ -32,6 +32,13 @@ module Actions def get_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ilm.get_lifecycle" } + + defined_params = ["policy"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def get_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ilm/policy/{policy}", "/_ilm/policy"], :endpoint => 'ilm.get_lifecycle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb index f0fb70e47c..ca5e34d1d2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb @@ -31,6 +31,7 @@ module Actions def get_status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ilm.get_status" } body = nil @@ -39,8 +40,7 @@ def get_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ilm/status"], :endpoint => 'ilm.get_status' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb index f7475f535f..577bee1473 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb @@ -33,6 +33,7 @@ module Actions def migrate_to_data_tiers(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ilm.migrate_to_data_tiers" } body = arguments.delete(:body) @@ -41,8 +42,7 @@ def migrate_to_data_tiers(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ilm/migrate_to_data_tiers"], :endpoint => 'ilm.migrate_to_data_tiers' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb index fbdb182b41..20e06ea8f0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb @@ -35,6 +35,13 @@ def move_to_step(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ilm.move_to_step" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -45,8 +52,7 @@ def move_to_step(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ilm/move/{index}"], :endpoint => 'ilm.move_to_step' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb index 4e5aef6973..5af935efb2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb @@ -35,6 +35,13 @@ def put_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ilm.put_lifecycle" } + + defined_params = ["policy"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -45,8 +52,7 @@ def put_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ilm/policy/{policy}"], :endpoint => 'ilm.put_lifecycle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb index b7397047a5..2845a8895b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb @@ -34,6 +34,13 @@ def remove_policy(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ilm.remove_policy" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def remove_policy(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_ilm/remove"], :endpoint => 'ilm.remove_policy' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb index c807e6c0f1..536c3902c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb @@ -34,6 +34,13 @@ def retry(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ilm.retry" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def retry(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_ilm/retry"], :endpoint => 'ilm.retry' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb index dc4bf73254..ce0e94fc3f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb @@ -31,6 +31,7 @@ module Actions def start(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ilm.start" } body = nil @@ -39,8 +40,7 @@ def start(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ilm/start"], :endpoint => 'ilm.start' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb index 68b61d2f57..870623e600 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb @@ -31,6 +31,7 @@ module Actions def stop(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ilm.stop" } body = nil @@ -39,8 +40,7 @@ def stop(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ilm/stop"], :endpoint => 'ilm.stop' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb index 4ddece7aae..352220d75e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb @@ -41,6 +41,13 @@ def add_block(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.add_block" } + + defined_params = ["index", "block"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -53,8 +60,7 @@ def add_block(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_block/{block}"], :endpoint => 'indices.add_block' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb index 4dc073d0fc..c66bea09b1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb @@ -33,6 +33,13 @@ module Actions def analyze(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.analyze" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -52,8 +59,7 @@ def analyze(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_analyze", "/{index}/_analyze"], :endpoint => 'indices.analyze' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb index 1c78482a7f..0e23b73591 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb @@ -39,6 +39,13 @@ module Actions def clear_cache(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.clear_cache" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -53,8 +60,7 @@ def clear_cache(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_cache/clear", "/{index}/_cache/clear"], :endpoint => 'indices.clear_cache' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb index 681932343f..d5e2abb709 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb @@ -40,6 +40,13 @@ def clone(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.clone" } + + defined_params = ["index", "target"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -52,8 +59,7 @@ def clone(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_clone/{target}"], :endpoint => 'indices.clone' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb index bfdf6af4f4..4df7d3c0a2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb @@ -40,6 +40,13 @@ def close(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.close" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def close(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_close"], :endpoint => 'indices.close' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb index 88e3f93357..4de02331c7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb @@ -38,6 +38,13 @@ def create(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.create" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -48,8 +55,7 @@ def create(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}"], :endpoint => 'indices.create' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb index 312bbc6e62..0dc679b72e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb @@ -34,6 +34,13 @@ def create_data_stream(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.create_data_stream" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def create_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_data_stream/{name}"], :endpoint => 'indices.create_data_stream' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb index 51962bfb87..a3b44ef878 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb @@ -32,6 +32,13 @@ module Actions def data_streams_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.data_streams_stats" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def data_streams_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_data_stream/_stats", "/_data_stream/{name}/_stats"], :endpoint => 'indices.data_streams_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb index 371a12b320..4ab35fc210 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb @@ -39,6 +39,13 @@ def delete(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.delete" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -51,14 +58,12 @@ def delete(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}"], :endpoint => 'indices.delete' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}"], :endpoint => 'indices.delete' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb index 9b32636bcc..ff6cee236c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb @@ -38,6 +38,13 @@ def delete_alias(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.delete_alias" } + + defined_params = ["index", "name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -52,8 +59,7 @@ def delete_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], :endpoint => 'indices.delete_alias' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb index 81c9200e47..49f932983b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb @@ -41,6 +41,13 @@ def delete_data_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.delete_data_lifecycle" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -51,8 +58,7 @@ def delete_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_data_stream/{name}/_lifecycle"], :endpoint => 'indices.delete_data_lifecycle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb index f898b47a81..964b3d09a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb @@ -35,6 +35,13 @@ def delete_data_stream(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.delete_data_stream" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def delete_data_stream(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_data_stream/{name}"], :endpoint => 'indices.delete_data_stream' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb index 7aa6be8f00..f0f9681ff3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb @@ -36,6 +36,13 @@ def delete_index_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.delete_index_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def delete_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_index_template/{name}"], :endpoint => 'indices.delete_index_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb index fdd7811698..b612f57c9d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb @@ -36,6 +36,13 @@ def delete_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.delete_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,14 +55,12 @@ def delete_template(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_template/{name}"], :endpoint => 'indices.delete_template' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_template/{name}"], :endpoint => 'indices.delete_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb index c4bc5e647e..d1a0b08ca4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb @@ -43,6 +43,13 @@ def disk_usage(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.disk_usage" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -53,8 +60,7 @@ def disk_usage(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_disk_usage"], :endpoint => 'indices.disk_usage' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb index e7cc4b5c86..80198841af 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/downsample.rb @@ -42,6 +42,13 @@ def downsample(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.downsample" } + + defined_params = ["index", "target_index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -54,8 +61,7 @@ def downsample(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_downsample/{target_index}"], :endpoint => 'indices.downsample' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb index db88f3f3bd..669b083e77 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb @@ -40,6 +40,13 @@ def exists(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.exists" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def exists(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}"], :endpoint => 'indices.exists' }).status == 200 ? true : false + perform_request(method, path, params, body, headers, opts).status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb index a09ddef550..84456a0e85 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb @@ -39,6 +39,13 @@ def exists_alias(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.exists_alias" } + + defined_params = ["name", "index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -55,8 +62,7 @@ def exists_alias(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, - { :path_templates => ["/_alias/{name}", "/{index}/_alias/{name}"], :endpoint => 'indices.exists_alias' }).status == 200 ? true : false + perform_request(method, path, params, body, headers, opts).status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb index 31d4316bac..dd26460a22 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb @@ -37,6 +37,13 @@ def exists_index_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.exists_index_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -47,8 +54,7 @@ def exists_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_index_template/{name}"], :endpoint => 'indices.exists_index_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb index 1955f2b731..92676ab253 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb @@ -37,6 +37,13 @@ def exists_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.exists_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -47,8 +54,7 @@ def exists_template(arguments = {}) params = Utils.process_params(arguments) Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, - { :path_templates => ["/_template/{name}"], :endpoint => 'indices.exists_template' }).status == 200 ? true : false + perform_request(method, path, params, body, headers, opts).status == 200 ? true : false end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb index 658f5024da..022d6ec12a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb @@ -40,6 +40,13 @@ def explain_data_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.explain_data_lifecycle" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def explain_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_lifecycle/explain"], :endpoint => 'indices.explain_data_lifecycle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb index 46215f1700..a2ebd6936e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb @@ -42,6 +42,13 @@ def field_usage_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.field_usage_stats" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -52,8 +59,7 @@ def field_usage_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_field_usage_stats"], :endpoint => 'indices.field_usage_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb index 3f377ff29f..410b3877eb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb @@ -37,6 +37,13 @@ module Actions def flush(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.flush" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -51,8 +58,7 @@ def flush(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_flush", "/{index}/_flush"], :endpoint => 'indices.flush' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb index 9bb01b0ad2..769a541fd2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb @@ -39,6 +39,13 @@ module Actions def forcemerge(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.forcemerge" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -53,8 +60,7 @@ def forcemerge(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_forcemerge", "/{index}/_forcemerge"], :endpoint => 'indices.forcemerge' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb index 07f327413b..e4bfdd093a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb @@ -42,6 +42,13 @@ def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.get" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -52,8 +59,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}"], :endpoint => 'indices.get' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb index a3e2a51e4d..e510b33301 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb @@ -37,6 +37,13 @@ module Actions def get_alias(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.get_alias" } + + defined_params = ["name", "index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -57,8 +64,7 @@ def get_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_alias", "/_alias/{name}", "/{index}/_alias/{name}", "/{index}/_alias"], :endpoint => 'indices.get_alias' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb index 67290e03b8..bcf05a25c8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb @@ -40,6 +40,13 @@ def get_data_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.get_data_lifecycle" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def get_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_data_stream/{name}/_lifecycle"], :endpoint => 'indices.get_data_lifecycle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb index bee12fc107..7ff3a7d2c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb @@ -34,6 +34,13 @@ module Actions def get_data_stream(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.get_data_stream" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get_data_stream(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_data_stream", "/_data_stream/{name}"], :endpoint => 'indices.get_data_stream' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb index bd9012a7d6..f720b15c11 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb @@ -41,6 +41,13 @@ def get_field_mapping(arguments = {}) raise ArgumentError, "Required argument 'field' missing" unless _fields headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.get_field_mapping" } + + defined_params = ["fields", "index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -55,8 +62,7 @@ def get_field_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}"], :endpoint => 'indices.get_field_mapping' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb index 9ee989e418..9a2ae6cf96 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb @@ -36,6 +36,13 @@ module Actions def get_index_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.get_index_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def get_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_index_template", "/_index_template/{name}"], :endpoint => 'indices.get_index_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb index abfbd69016..adbcbe2ae3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb @@ -37,6 +37,13 @@ module Actions def get_mapping(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.get_mapping" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -51,8 +58,7 @@ def get_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_mapping", "/{index}/_mapping"], :endpoint => 'indices.get_mapping' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb index 19b013e87b..713c68599a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb @@ -40,6 +40,13 @@ module Actions def get_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.get_settings" } + + defined_params = ["index", "name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -60,8 +67,7 @@ def get_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_settings", "/{index}/_settings", "/{index}/_settings/{name}", "/_settings/{name}"], :endpoint => 'indices.get_settings' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb index 531c2a72ad..d21de055d2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb @@ -35,6 +35,13 @@ module Actions def get_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.get_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -49,8 +56,7 @@ def get_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_template", "/_template/{name}"], :endpoint => 'indices.get_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb index 93cc132f50..f3258029f0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb @@ -34,6 +34,13 @@ def migrate_to_data_stream(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.migrate_to_data_stream" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def migrate_to_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_data_stream/_migrate/{name}"], :endpoint => 'indices.migrate_to_data_stream' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb index 9f145c4a22..5fe6c0657f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb @@ -34,6 +34,7 @@ def modify_data_stream(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.modify_data_stream" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def modify_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_data_stream/_modify"], :endpoint => 'indices.modify_data_stream' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb index 78c7510fac..bce72e2453 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb @@ -40,6 +40,13 @@ def open(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.open" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def open(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_open"], :endpoint => 'indices.open' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb index cb62312547..ca4e481270 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb @@ -34,6 +34,13 @@ def promote_data_stream(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.promote_data_stream" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def promote_data_stream(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_data_stream/_promote/{name}"], :endpoint => 'indices.promote_data_stream' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb index 173f67b72a..e7228d9955 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb @@ -39,6 +39,13 @@ def put_alias(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.put_alias" } + + defined_params = ["index", "name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -53,8 +60,7 @@ def put_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], :endpoint => 'indices.put_alias' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb index 4d197e6f03..3c041a0161 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb @@ -42,6 +42,13 @@ def put_data_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.put_data_lifecycle" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -52,8 +59,7 @@ def put_data_lifecycle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_data_stream/{name}/_lifecycle"], :endpoint => 'indices.put_data_lifecycle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb index 3661d7025f..7f264bfd5b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb @@ -39,6 +39,13 @@ def put_index_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.put_index_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def put_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_index_template/{name}"], :endpoint => 'indices.put_index_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb index 1cd9ee9754..ac87f80494 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb @@ -42,6 +42,13 @@ def put_mapping(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.put_mapping" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -52,8 +59,7 @@ def put_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_mapping"], :endpoint => 'indices.put_mapping' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb index b15f81730e..50f73f6bf3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb @@ -42,6 +42,13 @@ def put_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.put_settings" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -56,8 +63,7 @@ def put_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_settings", "/{index}/_settings"], :endpoint => 'indices.put_settings' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb index 3c0a4aa676..1ba1187622 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb @@ -39,6 +39,13 @@ def put_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.put_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def put_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_template/{name}"], :endpoint => 'indices.put_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb index 39da73e45e..753d88b856 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb @@ -34,6 +34,13 @@ module Actions def recovery(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.recovery" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def recovery(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_recovery", "/{index}/_recovery"], :endpoint => 'indices.recovery' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb index 15f2b5df4f..11d3262f30 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb @@ -35,6 +35,13 @@ module Actions def refresh(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.refresh" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -49,8 +56,7 @@ def refresh(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_refresh", "/{index}/_refresh"], :endpoint => 'indices.refresh' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb index 17eecf2712..d1f08ebf9b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb @@ -37,6 +37,13 @@ def reload_search_analyzers(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.reload_search_analyzers" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -47,8 +54,7 @@ def reload_search_analyzers(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_reload_search_analyzers"], :endpoint => 'indices.reload_search_analyzers' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb index 9f5c4069ff..2409afb019 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb @@ -35,6 +35,13 @@ def resolve_index(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.resolve_index" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def resolve_index(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_resolve/index/{name}"], :endpoint => 'indices.resolve_index' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index ebf281d310..6660d31f00 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -41,6 +41,13 @@ def rollover(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.rollover" } + + defined_params = ["alias", "new_index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -57,8 +64,7 @@ def rollover(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{alias}/_rollover", "/{alias}/_rollover/{new_index}"], :endpoint => 'indices.rollover' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb index a1d073a841..8e5372d7db 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb @@ -36,6 +36,13 @@ module Actions def segments(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.segments" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def segments(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_segments", "/{index}/_segments"], :endpoint => 'indices.segments' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb index fec8eb9f92..22407ac487 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb @@ -36,6 +36,13 @@ module Actions def shard_stores(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.shard_stores" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def shard_stores(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_shard_stores", "/{index}/_shard_stores"], :endpoint => 'indices.shard_stores' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb index e87780d590..c3fe392e5b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb @@ -40,6 +40,13 @@ def shrink(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.shrink" } + + defined_params = ["index", "target"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -52,8 +59,7 @@ def shrink(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_shrink/{target}"], :endpoint => 'indices.shrink' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb index d30410abda..977e3bc302 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb @@ -39,6 +39,13 @@ def simulate_index_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.simulate_index_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def simulate_index_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_index_template/_simulate_index/{name}"], :endpoint => 'indices.simulate_index_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb index 87c42863e9..3c32447661 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb @@ -37,6 +37,13 @@ module Actions def simulate_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.simulate_template" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -51,8 +58,7 @@ def simulate_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_index_template/_simulate", "/_index_template/_simulate/{name}"], :endpoint => 'indices.simulate_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb index b130941ec7..83c147367d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb @@ -40,6 +40,13 @@ def split(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.split" } + + defined_params = ["index", "target"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -52,8 +59,7 @@ def split(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_split/{target}"], :endpoint => 'indices.split' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb index 5539046fac..e05d367923 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb @@ -42,6 +42,13 @@ module Actions def stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.stats" } + + defined_params = ["metric", "index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -62,8 +69,7 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_stats", "/_stats/{metric}", "/{index}/_stats", "/{index}/_stats/{metric}"], :endpoint => 'indices.stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb index dcba7103ed..918dca881c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb @@ -45,6 +45,13 @@ def unfreeze(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.unfreeze" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -55,8 +62,7 @@ def unfreeze(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_unfreeze"], :endpoint => 'indices.unfreeze' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb index dbd09e81dd..011e0ed003 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb @@ -36,6 +36,7 @@ def update_aliases(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.update_aliases" } body = arguments.delete(:body) @@ -44,8 +45,7 @@ def update_aliases(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_aliases"], :endpoint => 'indices.update_aliases' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb index aeb9ffdfe1..91a92ff96c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb @@ -45,6 +45,13 @@ module Actions def validate_query(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "indices.validate_query" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -64,8 +71,7 @@ def validate_query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_validate/query", "/{index}/_validate/query"], :endpoint => 'indices.validate_query' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb index 3a440580c4..28c3b31e2d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb @@ -30,6 +30,7 @@ module Actions def info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "info" } body = nil @@ -38,7 +39,7 @@ def info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, { :path_templates => ["/"], :endpoint => 'info' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb index fc5cc57552..672931569e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb @@ -36,6 +36,13 @@ def delete_pipeline(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ingest.delete_pipeline" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def delete_pipeline(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ingest/pipeline/{id}"], :endpoint => 'ingest.delete_pipeline' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb index 8fdeebb8d5..58755735b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb @@ -31,6 +31,7 @@ module Actions def geo_ip_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ingest.geo_ip_stats" } body = nil @@ -39,8 +40,7 @@ def geo_ip_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ingest/geoip/stats"], :endpoint => 'ingest.geo_ip_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb index cf5ce889c9..4a84f70862 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb @@ -34,6 +34,13 @@ module Actions def get_pipeline(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ingest.get_pipeline" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get_pipeline(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ingest/pipeline", "/_ingest/pipeline/{id}"], :endpoint => 'ingest.get_pipeline' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb index 9a684ae171..952cdb70e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb @@ -31,6 +31,7 @@ module Actions def processor_grok(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ingest.processor_grok" } body = nil @@ -39,8 +40,7 @@ def processor_grok(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ingest/processor/grok"], :endpoint => 'ingest.processor_grok' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb index 03ea7854d9..48433c0540 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb @@ -39,6 +39,13 @@ def put_pipeline(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ingest.put_pipeline" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def put_pipeline(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ingest/pipeline/{id}"], :endpoint => 'ingest.put_pipeline' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb index 8235f39a06..bdb7204e96 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb @@ -36,6 +36,13 @@ def simulate(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ingest.simulate" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def simulate(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ingest/pipeline/_simulate", "/_ingest/pipeline/{id}/_simulate"], :endpoint => 'ingest.simulate' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb index 07a02f11e0..9ba5b71a13 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb @@ -39,6 +39,13 @@ def knn_search(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "knn_search" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -54,8 +61,7 @@ def knn_search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_knn_search"], :endpoint => 'knn_search' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb index 00188004bf..428aeddf55 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb @@ -31,6 +31,7 @@ module Actions def delete(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "license.delete" } body = nil @@ -39,8 +40,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_license"], :endpoint => 'license.delete' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb index a23e0bd152..7a65c5a902 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb @@ -33,6 +33,7 @@ module Actions def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "license.get" } body = nil @@ -41,8 +42,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_license"], :endpoint => 'license.get' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb index d969717f68..fe055282ac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb @@ -31,6 +31,7 @@ module Actions def get_basic_status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "license.get_basic_status" } body = nil @@ -39,8 +40,7 @@ def get_basic_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_license/basic_status"], :endpoint => 'license.get_basic_status' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb index 6c40b6cf23..4097f685a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb @@ -31,6 +31,7 @@ module Actions def get_trial_status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "license.get_trial_status" } body = nil @@ -39,8 +40,7 @@ def get_trial_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_license/trial_status"], :endpoint => 'license.get_trial_status' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb index 449e160dea..1aeb365b82 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb @@ -33,6 +33,7 @@ module Actions def post(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "license.post" } body = arguments.delete(:body) @@ -41,8 +42,7 @@ def post(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_license"], :endpoint => 'license.post' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb index 80e037f853..94fe650a4d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb @@ -32,6 +32,7 @@ module Actions def post_start_basic(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "license.post_start_basic" } body = nil @@ -40,8 +41,7 @@ def post_start_basic(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_license/start_basic"], :endpoint => 'license.post_start_basic' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb index 44227e5f7e..76fa3febbf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb @@ -33,6 +33,7 @@ module Actions def post_start_trial(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "license.post_start_trial" } body = nil @@ -41,8 +42,7 @@ def post_start_trial(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_license/start_trial"], :endpoint => 'license.post_start_trial' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb index c7503fc9ee..4b566c1f01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb @@ -34,6 +34,13 @@ def delete_pipeline(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "logstash.delete_pipeline" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete_pipeline(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_logstash/pipeline/{id}"], :endpoint => 'logstash.delete_pipeline' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb index e4231f4094..371d58cab6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb @@ -32,6 +32,13 @@ module Actions def get_pipeline(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "logstash.get_pipeline" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def get_pipeline(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_logstash/pipeline", "/_logstash/pipeline/{id}"], :endpoint => 'logstash.get_pipeline' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb index 974bb8737f..3eca20ccbc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb @@ -36,6 +36,13 @@ def put_pipeline(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "logstash.put_pipeline" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def put_pipeline(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_logstash/pipeline/{id}"], :endpoint => 'logstash.put_pipeline' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb index a68066532e..c3573954f3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb @@ -34,6 +34,13 @@ def clear_trained_model_deployment_cache(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.clear_trained_model_deployment_cache" } + + defined_params = ["model_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def clear_trained_model_deployment_cache(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}/deployment/cache/_clear"], :endpoint => 'ml.clear_trained_model_deployment_cache' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb index d3087f1c86..60a24df400 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb @@ -38,6 +38,13 @@ def close_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.close_job" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -48,8 +55,7 @@ def close_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_close"], :endpoint => 'ml.close_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb index 493f6b755b..d60408a298 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb @@ -34,6 +34,13 @@ def delete_calendar(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.delete_calendar" } + + defined_params = ["calendar_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete_calendar(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/calendars/{calendar_id}"], :endpoint => 'ml.delete_calendar' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb index 1db96e8df1..128153969c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb @@ -36,6 +36,13 @@ def delete_calendar_event(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.delete_calendar_event" } + + defined_params = ["calendar_id", "event_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def delete_calendar_event(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/calendars/{calendar_id}/events/{event_id}"], :endpoint => 'ml.delete_calendar_event' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb index 6917473f3c..cfb10ea11f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb @@ -36,6 +36,13 @@ def delete_calendar_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.delete_calendar_job" } + + defined_params = ["calendar_id", "job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def delete_calendar_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/calendars/{calendar_id}/jobs/{job_id}"], :endpoint => 'ml.delete_calendar_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb index 047c296b11..bc8d72fbd3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb @@ -36,6 +36,13 @@ def delete_data_frame_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.delete_data_frame_analytics" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def delete_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/data_frame/analytics/{id}"], :endpoint => 'ml.delete_data_frame_analytics' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb index 94310528de..ca456fcaca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb @@ -35,6 +35,13 @@ def delete_datafeed(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.delete_datafeed" } + + defined_params = ["datafeed_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def delete_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/datafeeds/{datafeed_id}"], :endpoint => 'ml.delete_datafeed' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb index 3d4d27b8ed..5ab5263baa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb @@ -35,6 +35,13 @@ module Actions def delete_expired_data(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.delete_expired_data" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def delete_expired_data(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/_delete_expired_data/{job_id}", "/_ml/_delete_expired_data"], :endpoint => 'ml.delete_expired_data' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb index 5ca2f57b23..bcbd91776d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb @@ -34,6 +34,13 @@ def delete_filter(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.delete_filter" } + + defined_params = ["filter_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete_filter(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/filters/{filter_id}"], :endpoint => 'ml.delete_filter' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb index e2f8282812..e3c5530c8d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb @@ -37,6 +37,13 @@ def delete_forecast(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.delete_forecast" } + + defined_params = ["job_id", "forecast_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -53,8 +60,7 @@ def delete_forecast(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_forecast", "/_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}"], :endpoint => 'ml.delete_forecast' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb index 381c8fca55..3356e2c805 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb @@ -37,6 +37,13 @@ def delete_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.delete_job" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -47,8 +54,7 @@ def delete_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}"], :endpoint => 'ml.delete_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb index d49ed41c81..8be8ca1bf0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb @@ -36,6 +36,13 @@ def delete_model_snapshot(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.delete_model_snapshot" } + + defined_params = ["job_id", "snapshot_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def delete_model_snapshot(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}"], :endpoint => 'ml.delete_model_snapshot' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb index f5678aea1c..c8cbe004c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb @@ -36,6 +36,13 @@ def delete_trained_model(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.delete_trained_model" } + + defined_params = ["model_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def delete_trained_model(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}"], :endpoint => 'ml.delete_trained_model' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb index 1481e15475..6d17677398 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb @@ -36,6 +36,13 @@ def delete_trained_model_alias(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.delete_trained_model_alias" } + + defined_params = ["model_id", "model_alias"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def delete_trained_model_alias(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}/model_aliases/{model_alias}"], :endpoint => 'ml.delete_trained_model_alias' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb index 746975593e..72379106e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb @@ -34,6 +34,7 @@ def estimate_model_memory(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.estimate_model_memory" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def estimate_model_memory(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/_estimate_model_memory"], :endpoint => 'ml.estimate_model_memory' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb index 13066c07c8..472e545827 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb @@ -34,6 +34,7 @@ def evaluate_data_frame(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.evaluate_data_frame" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def evaluate_data_frame(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/data_frame/_evaluate"], :endpoint => 'ml.evaluate_data_frame' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb index 070862767d..5fcbae73a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb @@ -33,6 +33,13 @@ module Actions def explain_data_frame_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.explain_data_frame_analytics" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -52,8 +59,7 @@ def explain_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/data_frame/analytics/_explain", "/_ml/data_frame/analytics/{id}/_explain"], :endpoint => 'ml.explain_data_frame_analytics' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb index 79e9d94c96..2ca82b107d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb @@ -40,6 +40,13 @@ def flush_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.flush_job" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def flush_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_flush"], :endpoint => 'ml.flush_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb index 16e794bb84..9f0b9d71a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb @@ -38,6 +38,13 @@ def forecast(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.forecast" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -48,8 +55,7 @@ def forecast(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_forecast"], :endpoint => 'ml.forecast' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb index 7cb4139fef..c69af77e9f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb @@ -45,6 +45,13 @@ def get_buckets(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_buckets" } + + defined_params = ["job_id", "timestamp"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -66,8 +73,7 @@ def get_buckets(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}", "/_ml/anomaly_detectors/{job_id}/results/buckets"], :endpoint => 'ml.get_buckets' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb index fd9b13ffc5..2cb157a7ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb @@ -39,6 +39,13 @@ def get_calendar_events(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_calendar_events" } + + defined_params = ["calendar_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -49,8 +56,7 @@ def get_calendar_events(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/calendars/{calendar_id}/events"], :endpoint => 'ml.get_calendar_events' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb index e27051d6d8..a26e1d3f2d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb @@ -35,6 +35,13 @@ module Actions def get_calendars(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_calendars" } + + defined_params = ["calendar_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -54,8 +61,7 @@ def get_calendars(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/calendars", "/_ml/calendars/{calendar_id}"], :endpoint => 'ml.get_calendars' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb index f6b2823cae..d8bc6be512 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb @@ -39,6 +39,13 @@ def get_categories(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_categories" } + + defined_params = ["job_id", "category_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -60,8 +67,7 @@ def get_categories(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/results/categories/{category_id}", "/_ml/anomaly_detectors/{job_id}/results/categories/"], :endpoint => 'ml.get_categories' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb index 644c3aea16..eef5b4d3fc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb @@ -36,6 +36,13 @@ module Actions def get_data_frame_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_data_frame_analytics" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def get_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/data_frame/analytics/{id}", "/_ml/data_frame/analytics"], :endpoint => 'ml.get_data_frame_analytics' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb index f63767657a..f9a2ed940c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb @@ -36,6 +36,13 @@ module Actions def get_data_frame_analytics_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_data_frame_analytics_stats" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def get_data_frame_analytics_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/data_frame/analytics/_stats", "/_ml/data_frame/analytics/{id}/_stats"], :endpoint => 'ml.get_data_frame_analytics_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb index 24c6811001..848f81beac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb @@ -33,6 +33,13 @@ module Actions def get_datafeed_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_datafeed_stats" } + + defined_params = ["datafeed_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -47,8 +54,7 @@ def get_datafeed_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/datafeeds/{datafeed_id}/_stats", "/_ml/datafeeds/_stats"], :endpoint => 'ml.get_datafeed_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb index 89104bb41f..a24ba3b44f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb @@ -34,6 +34,13 @@ module Actions def get_datafeeds(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_datafeeds" } + + defined_params = ["datafeed_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get_datafeeds(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/datafeeds/{datafeed_id}", "/_ml/datafeeds"], :endpoint => 'ml.get_datafeeds' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb index 32f8097982..fb4938ee16 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb @@ -34,6 +34,13 @@ module Actions def get_filters(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_filters" } + + defined_params = ["filter_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get_filters(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/filters", "/_ml/filters/{filter_id}"], :endpoint => 'ml.get_filters' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb index 3bc833ba11..dbf77b1ccf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb @@ -43,6 +43,13 @@ def get_influencers(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_influencers" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -58,8 +65,7 @@ def get_influencers(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/results/influencers"], :endpoint => 'ml.get_influencers' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb index b9f43ef0d9..a647e6fa4d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb @@ -33,6 +33,13 @@ module Actions def get_job_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_job_stats" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -47,8 +54,7 @@ def get_job_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/_stats", "/_ml/anomaly_detectors/{job_id}/_stats"], :endpoint => 'ml.get_job_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb index 92c9b6595f..8768c1a09b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb @@ -34,6 +34,13 @@ module Actions def get_jobs(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_jobs" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get_jobs(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}", "/_ml/anomaly_detectors"], :endpoint => 'ml.get_jobs' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb index e7ba7b1452..d369af36db 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb @@ -34,6 +34,13 @@ module Actions def get_memory_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_memory_stats" } + + defined_params = ["node_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get_memory_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/memory/_stats", "/_ml/memory/{node_id}/_stats"], :endpoint => 'ml.get_memory_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb index 282792cb0a..02f19f6860 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb @@ -37,6 +37,13 @@ def get_model_snapshot_upgrade_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_model_snapshot_upgrade_stats" } + + defined_params = ["job_id", "snapshot_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -49,8 +56,7 @@ def get_model_snapshot_upgrade_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade/_stats"], :endpoint => 'ml.get_model_snapshot_upgrade_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb index ea1eaf3811..af70db2a12 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb @@ -42,6 +42,13 @@ def get_model_snapshots(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_model_snapshots" } + + defined_params = ["job_id", "snapshot_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -63,8 +70,7 @@ def get_model_snapshots(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}", "/_ml/anomaly_detectors/{job_id}/model_snapshots"], :endpoint => 'ml.get_model_snapshots' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb index c7aeb00d24..74c58a2097 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb @@ -42,6 +42,13 @@ def get_overall_buckets(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_overall_buckets" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -57,8 +64,7 @@ def get_overall_buckets(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/results/overall_buckets"], :endpoint => 'ml.get_overall_buckets' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb index a10d2af940..9d84f3841d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb @@ -43,6 +43,13 @@ def get_records(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_records" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -58,8 +65,7 @@ def get_records(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/results/records"], :endpoint => 'ml.get_records' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb index 89438cd8c9..0e5bb6283f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb @@ -40,6 +40,13 @@ module Actions def get_trained_models(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_trained_models" } + + defined_params = ["model_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -54,8 +61,7 @@ def get_trained_models(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}", "/_ml/trained_models"], :endpoint => 'ml.get_trained_models' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb index 8942668dae..20809c1161 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb @@ -35,6 +35,13 @@ module Actions def get_trained_models_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.get_trained_models_stats" } + + defined_params = ["model_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -49,8 +56,7 @@ def get_trained_models_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}/_stats", "/_ml/trained_models/_stats"], :endpoint => 'ml.get_trained_models_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb index 21789f10ee..e29803f7cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb @@ -42,6 +42,13 @@ def infer_trained_model(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.infer_trained_model" } + + defined_params = ["model_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -54,8 +61,7 @@ def infer_trained_model(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}/_infer", "/_ml/trained_models/{model_id}/deployment/_infer"], :endpoint => 'ml.infer_trained_model' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb index 6cdd9a65e1..c610afb417 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb @@ -31,6 +31,7 @@ module Actions def info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.info" } body = nil @@ -39,8 +40,7 @@ def info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/info"], :endpoint => 'ml.info' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb index 526aeec920..a1efc79090 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb @@ -35,6 +35,13 @@ def open_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.open_job" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -45,8 +52,7 @@ def open_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_open"], :endpoint => 'ml.open_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb index c7d3370aa3..bc927bf617 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb @@ -36,6 +36,13 @@ def post_calendar_events(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.post_calendar_events" } + + defined_params = ["calendar_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def post_calendar_events(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/calendars/{calendar_id}/events"], :endpoint => 'ml.post_calendar_events' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb index ebce105156..4cd4ef2baa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb @@ -38,6 +38,13 @@ def post_data(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.post_data" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -48,8 +55,7 @@ def post_data(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_data"], :endpoint => 'ml.post_data' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb index bee19f3a52..34b15bbff1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb @@ -33,6 +33,13 @@ module Actions def preview_data_frame_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.preview_data_frame_analytics" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -52,8 +59,7 @@ def preview_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/data_frame/analytics/_preview", "/_ml/data_frame/analytics/{id}/_preview"], :endpoint => 'ml.preview_data_frame_analytics' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb index 4bf5a7c964..db7b09136c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb @@ -35,6 +35,13 @@ module Actions def preview_datafeed(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.preview_datafeed" } + + defined_params = ["datafeed_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -54,8 +61,7 @@ def preview_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/datafeeds/{datafeed_id}/_preview", "/_ml/datafeeds/_preview"], :endpoint => 'ml.preview_datafeed' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb index 2dcde5ad07..1c848dfa9f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb @@ -35,6 +35,13 @@ def put_calendar(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.put_calendar" } + + defined_params = ["calendar_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -45,8 +52,7 @@ def put_calendar(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/calendars/{calendar_id}"], :endpoint => 'ml.put_calendar' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb index d0f1cfecb3..b95248cf93 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb @@ -36,6 +36,13 @@ def put_calendar_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.put_calendar_job" } + + defined_params = ["calendar_id", "job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def put_calendar_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/calendars/{calendar_id}/jobs/{job_id}"], :endpoint => 'ml.put_calendar_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb index 16d97541c4..261c37075c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb @@ -36,6 +36,13 @@ def put_data_frame_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.put_data_frame_analytics" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def put_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/data_frame/analytics/{id}"], :endpoint => 'ml.put_data_frame_analytics' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb index 8764d2204b..5c5547cec2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb @@ -40,6 +40,13 @@ def put_datafeed(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.put_datafeed" } + + defined_params = ["datafeed_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def put_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/datafeeds/{datafeed_id}"], :endpoint => 'ml.put_datafeed' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb index 577017641d..eab15add48 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb @@ -36,6 +36,13 @@ def put_filter(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.put_filter" } + + defined_params = ["filter_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def put_filter(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/filters/{filter_id}"], :endpoint => 'ml.put_filter' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb index 0b13f70a0b..51cd1ed967 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb @@ -40,6 +40,13 @@ def put_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.put_job" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def put_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}"], :endpoint => 'ml.put_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb index 037879488d..ed1f7de230 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb @@ -38,6 +38,13 @@ def put_trained_model(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.put_trained_model" } + + defined_params = ["model_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -48,8 +55,7 @@ def put_trained_model(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}"], :endpoint => 'ml.put_trained_model' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb index 63848996cd..2d69e40902 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb @@ -37,6 +37,13 @@ def put_trained_model_alias(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.put_trained_model_alias" } + + defined_params = ["model_id", "model_alias"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -49,8 +56,7 @@ def put_trained_model_alias(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}/model_aliases/{model_alias}"], :endpoint => 'ml.put_trained_model_alias' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb index 34f7dac9d0..2b005d8c7f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb @@ -38,6 +38,13 @@ def put_trained_model_definition_part(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.put_trained_model_definition_part" } + + defined_params = ["model_id", "part"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def put_trained_model_definition_part(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}/definition/{part}"], :endpoint => 'ml.put_trained_model_definition_part' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb index 8506a662b6..80a57d05de 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb @@ -36,6 +36,13 @@ def put_trained_model_vocabulary(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.put_trained_model_vocabulary" } + + defined_params = ["model_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def put_trained_model_vocabulary(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}/vocabulary"], :endpoint => 'ml.put_trained_model_vocabulary' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb index 3c7db074ec..2032b1090c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb @@ -36,6 +36,13 @@ def reset_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.reset_job" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def reset_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_reset"], :endpoint => 'ml.reset_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb index 0a59fc5dde..6c64d08617 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb @@ -38,6 +38,13 @@ def revert_model_snapshot(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.revert_model_snapshot" } + + defined_params = ["job_id", "snapshot_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def revert_model_snapshot(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert"], :endpoint => 'ml.revert_model_snapshot' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb index 9500299496..34ccde253c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb @@ -33,6 +33,7 @@ module Actions def set_upgrade_mode(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.set_upgrade_mode" } body = nil @@ -41,8 +42,7 @@ def set_upgrade_mode(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/set_upgrade_mode"], :endpoint => 'ml.set_upgrade_mode' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb index 554a691fd1..f7886b4799 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb @@ -36,6 +36,13 @@ def start_data_frame_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.start_data_frame_analytics" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def start_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/data_frame/analytics/{id}/_start"], :endpoint => 'ml.start_data_frame_analytics' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb index 9505603844..3a70de38b8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb @@ -38,6 +38,13 @@ def start_datafeed(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.start_datafeed" } + + defined_params = ["datafeed_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -48,8 +55,7 @@ def start_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/datafeeds/{datafeed_id}/_start"], :endpoint => 'ml.start_datafeed' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb index df6134738c..6dbe5c130f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb @@ -42,6 +42,13 @@ def start_trained_model_deployment(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.start_trained_model_deployment" } + + defined_params = ["model_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -52,8 +59,7 @@ def start_trained_model_deployment(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}/deployment/_start"], :endpoint => 'ml.start_trained_model_deployment' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb index ff0b1610fc..62979684f9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb @@ -38,6 +38,13 @@ def stop_data_frame_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.stop_data_frame_analytics" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -48,8 +55,7 @@ def stop_data_frame_analytics(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/data_frame/analytics/{id}/_stop"], :endpoint => 'ml.stop_data_frame_analytics' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb index b3ac123e10..8f315ed38c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb @@ -39,6 +39,13 @@ def stop_datafeed(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.stop_datafeed" } + + defined_params = ["datafeed_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def stop_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/datafeeds/{datafeed_id}/_stop"], :endpoint => 'ml.stop_datafeed' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb index 022c5ed9ca..1558910fcf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb @@ -37,6 +37,13 @@ def stop_trained_model_deployment(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.stop_trained_model_deployment" } + + defined_params = ["model_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -47,8 +54,7 @@ def stop_trained_model_deployment(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}/deployment/_stop"], :endpoint => 'ml.stop_trained_model_deployment' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb index 899339c214..61ab9fd582 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb @@ -36,6 +36,13 @@ def update_data_frame_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.update_data_frame_analytics" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def update_data_frame_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/data_frame/analytics/{id}/_update"], :endpoint => 'ml.update_data_frame_analytics' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb index 8902566526..8537e0b579 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb @@ -40,6 +40,13 @@ def update_datafeed(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.update_datafeed" } + + defined_params = ["datafeed_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def update_datafeed(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/datafeeds/{datafeed_id}/_update"], :endpoint => 'ml.update_datafeed' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb index bf8c5f5b40..6c00f991f5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb @@ -36,6 +36,13 @@ def update_filter(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.update_filter" } + + defined_params = ["filter_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def update_filter(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/filters/{filter_id}/_update"], :endpoint => 'ml.update_filter' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb index 8d89218738..7e0bf5fc6a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb @@ -36,6 +36,13 @@ def update_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.update_job" } + + defined_params = ["job_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def update_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/_update"], :endpoint => 'ml.update_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb index e4dc3bc5e7..fc21bb8512 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb @@ -38,6 +38,13 @@ def update_model_snapshot(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.update_model_snapshot" } + + defined_params = ["job_id", "snapshot_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def update_model_snapshot(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update"], :endpoint => 'ml.update_model_snapshot' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb index 48e43ae950..253acabe1a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb @@ -40,6 +40,13 @@ def update_trained_model_deployment(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.update_trained_model_deployment" } + + defined_params = ["model_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def update_trained_model_deployment(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/trained_models/{model_id}/deployment/_update"], :endpoint => 'ml.update_trained_model_deployment' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb index 9f17dc9808..dd66eb8acc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb @@ -38,6 +38,13 @@ def upgrade_job_snapshot(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.upgrade_job_snapshot" } + + defined_params = ["job_id", "snapshot_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def upgrade_job_snapshot(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade"], :endpoint => 'ml.upgrade_job_snapshot' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb index a45509b6c4..d8a4841171 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb @@ -34,6 +34,7 @@ def validate(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.validate" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def validate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/_validate"], :endpoint => 'ml.validate' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb index 832125493b..bbfbe86fad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb @@ -34,6 +34,7 @@ def validate_detector(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ml.validate_detector" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def validate_detector(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ml/anomaly_detectors/_validate/detector"], :endpoint => 'ml.validate_detector' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb index 2f287ec1bb..a7ca0b1a19 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb @@ -43,6 +43,13 @@ def mget(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "mget" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -57,8 +64,7 @@ def mget(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_mget", "/{index}/_mget"], :endpoint => 'mget' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb index 2ba3f26382..0b6e1862ff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb @@ -32,6 +32,13 @@ module Actions def deprecations(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "migration.deprecations" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def deprecations(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_migration/deprecations", "/{index}/_migration/deprecations"], :endpoint => 'migration.deprecations' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb index 4cd354d19c..eed204341e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb @@ -31,6 +31,7 @@ module Actions def get_feature_upgrade_status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "migration.get_feature_upgrade_status" } body = nil @@ -39,8 +40,7 @@ def get_feature_upgrade_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_migration/system_features"], :endpoint => 'migration.get_feature_upgrade_status' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb index db21766cec..41f7ebf7e4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb @@ -31,6 +31,7 @@ module Actions def post_feature_upgrade(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "migration.post_feature_upgrade" } body = nil @@ -39,8 +40,7 @@ def post_feature_upgrade(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_migration/system_features"], :endpoint => 'migration.post_feature_upgrade' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb index 59792beaef..a9946c3e53 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb @@ -44,6 +44,13 @@ def bulk(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "monitoring.bulk" } + + defined_params = ["type"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -65,8 +72,7 @@ def bulk(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, - { :path_templates => ["/_monitoring/bulk", "/_monitoring/{type}/bulk"], :endpoint => 'monitoring.bulk' }) + perform_request(method, path, params, payload, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb index d984a9bda7..9b15032a59 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb @@ -41,6 +41,13 @@ def msearch(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "msearch" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -78,8 +85,7 @@ def msearch(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, - { :path_templates => ["/_msearch", "/{index}/_msearch"], :endpoint => 'msearch' }) + perform_request(method, path, params, payload, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb index 0e68c56b6f..e5c06c9374 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb @@ -39,6 +39,13 @@ def msearch_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "msearch_template" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -64,8 +71,7 @@ def msearch_template(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, - { :path_templates => ["/_msearch/template", "/{index}/_msearch/template"], :endpoint => 'msearch_template' }) + perform_request(method, path, params, payload, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb index c7fa66ef3e..96fca1ae9b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb @@ -44,6 +44,13 @@ module Actions def mtermvectors(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "mtermvectors" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = if (ids = arguments.delete(:ids)) { :ids => ids } @@ -67,8 +74,7 @@ def mtermvectors(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_mtermvectors", "/{index}/_mtermvectors"], :endpoint => 'mtermvectors' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb index b58925dff0..337c671142 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb @@ -42,6 +42,13 @@ def clear_repositories_metering_archive(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "nodes.clear_repositories_metering_archive" } + + defined_params = ["node_id", "max_archive_version"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -54,8 +61,7 @@ def clear_repositories_metering_archive(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_nodes/{node_id}/_repositories_metering/{max_archive_version}"], :endpoint => 'nodes.clear_repositories_metering_archive' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb index 7f7393450e..0c2394f39f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb @@ -38,6 +38,13 @@ def get_repositories_metering_info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "nodes.get_repositories_metering_info" } + + defined_params = ["node_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get_repositories_metering_info(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_nodes/{node_id}/_repositories_metering"], :endpoint => 'nodes.get_repositories_metering_info' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb index ee7f0af754..bbed54b903 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb @@ -39,6 +39,13 @@ module Actions def hot_threads(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "nodes.hot_threads" } + + defined_params = ["node_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -53,8 +60,7 @@ def hot_threads(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_nodes/hot_threads", "/_nodes/{node_id}/hot_threads"], :endpoint => 'nodes.hot_threads' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb index dfc8c35d2e..fc9dce9ffa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb @@ -35,6 +35,13 @@ module Actions def info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "nodes.info" } + + defined_params = ["node_id", "metric"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -55,8 +62,7 @@ def info(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_nodes", "/_nodes/{node_id}", "/_nodes/{metric}", "/_nodes/{node_id}/{metric}"], :endpoint => 'nodes.info' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb index ce13b4cd72..099f5146fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb @@ -34,6 +34,13 @@ module Actions def reload_secure_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "nodes.reload_secure_settings" } + + defined_params = ["node_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -48,8 +55,7 @@ def reload_secure_settings(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_nodes/reload_secure_settings", "/_nodes/{node_id}/reload_secure_settings"], :endpoint => 'nodes.reload_secure_settings' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb index 5753f01b47..564998e3d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb @@ -43,6 +43,13 @@ module Actions def stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "nodes.stats" } + + defined_params = ["node_id", "metric", "index_metric"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -69,8 +76,7 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_nodes/stats", "/_nodes/{node_id}/stats", "/_nodes/stats/{metric}", "/_nodes/{node_id}/stats/{metric}", "/_nodes/stats/{metric}/{index_metric}", "/_nodes/{node_id}/stats/{metric}/{index_metric}"], :endpoint => 'nodes.stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb index 0d1aa373dc..c8e187fed7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb @@ -34,6 +34,13 @@ module Actions def usage(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "nodes.usage" } + + defined_params = ["node_id", "metric"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -54,8 +61,7 @@ def usage(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_nodes/usage", "/_nodes/{node_id}/usage", "/_nodes/usage/{metric}", "/_nodes/{node_id}/usage/{metric}"], :endpoint => 'nodes.usage' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index 950c803989..0807943d8a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -38,6 +38,13 @@ def open_point_in_time(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "open_point_in_time" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def open_point_in_time(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_pit"], :endpoint => 'open_point_in_time' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb index 8ce33819da..d890961028 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb @@ -30,6 +30,7 @@ module Actions def ping(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ping" } body = nil @@ -38,8 +39,7 @@ def ping(arguments = {}) params = {} begin - perform_request(method, path, params, body, headers, - { :path_templates => ["/"], :endpoint => 'ping' }).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false rescue Exception => e if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not *Found|404|ConnectionFailed/i false diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb index 7e07628905..733ce2a2da 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb @@ -38,6 +38,13 @@ def put_script(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "put_script" } + + defined_params = ["id", "context"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -54,8 +61,7 @@ def put_script(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_scripts/{id}", "/_scripts/{id}/{context}"], :endpoint => 'put_script' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb index e055729040..d8d5f4ec97 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/delete.rb @@ -38,6 +38,13 @@ def delete(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "query_ruleset.delete" } + + defined_params = ["ruleset_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_query_rules/{ruleset_id}"], :endpoint => 'query_ruleset.delete' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb index 5e42809e95..87ada7c28f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/get.rb @@ -38,6 +38,13 @@ def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "query_ruleset.get" } + + defined_params = ["ruleset_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_query_rules/{ruleset_id}"], :endpoint => 'query_ruleset.get' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb index 6c3e0dcedd..bc2baf11c6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_ruleset/put.rb @@ -40,6 +40,13 @@ def put(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "query_ruleset.put" } + + defined_params = ["ruleset_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def put(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_query_rules/{ruleset_id}"], :endpoint => 'query_ruleset.put' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb index 74482ba578..6482c7834a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb @@ -38,6 +38,13 @@ def rank_eval(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "rank_eval" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -52,8 +59,7 @@ def rank_eval(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_rank_eval", "/{index}/_rank_eval"], :endpoint => 'rank_eval' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb index 2fe6c09bc2..148aa2b703 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb @@ -43,6 +43,7 @@ def reindex(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "reindex" } body = arguments.delete(:body) @@ -51,8 +52,7 @@ def reindex(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_reindex"], :endpoint => 'reindex' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb index 5c3d3c1344..66344e2be2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb @@ -34,6 +34,13 @@ def reindex_rethrottle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "reindex_rethrottle" } + + defined_params = ["task_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def reindex_rethrottle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_reindex/{task_id}/_rethrottle"], :endpoint => 'reindex_rethrottle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb index 1b918e9422..f668b5f8aa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb @@ -32,6 +32,13 @@ module Actions def render_search_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "render_search_template" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -51,8 +58,7 @@ def render_search_template(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_render/template", "/_render/template/{id}"], :endpoint => 'render_search_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb index 26e4ab65d3..4806d5155d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb @@ -38,6 +38,13 @@ def delete_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "rollup.delete_job" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def delete_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_rollup/job/{id}"], :endpoint => 'rollup.delete_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb index 39c7315191..33aa7cc77b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb @@ -36,6 +36,13 @@ module Actions def get_jobs(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "rollup.get_jobs" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def get_jobs(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_rollup/job/{id}", "/_rollup/job/"], :endpoint => 'rollup.get_jobs' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb index fc5c5f3baf..a65d7a17a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb @@ -36,6 +36,13 @@ module Actions def get_rollup_caps(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "rollup.get_rollup_caps" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def get_rollup_caps(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_rollup/data/{id}", "/_rollup/data/"], :endpoint => 'rollup.get_rollup_caps' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb index 5823a67bfd..6d23b373dd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb @@ -38,6 +38,13 @@ def get_rollup_index_caps(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "rollup.get_rollup_index_caps" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get_rollup_index_caps(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_rollup/data"], :endpoint => 'rollup.get_rollup_index_caps' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb index d027640848..68c2a04022 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb @@ -40,6 +40,13 @@ def put_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "rollup.put_job" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def put_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_rollup/job/{id}"], :endpoint => 'rollup.put_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb index 2c2b8f5d9d..ba9a60ac45 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb @@ -42,6 +42,13 @@ def rollup_search(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "rollup.rollup_search" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -52,8 +59,7 @@ def rollup_search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_rollup_search"], :endpoint => 'rollup.rollup_search' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb index 1e49d56b88..12ed5f5103 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb @@ -38,6 +38,13 @@ def start_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "rollup.start_job" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def start_job(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_rollup/job/{id}/_start"], :endpoint => 'rollup.start_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb index ac614a2566..e5e7a44a70 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb @@ -40,6 +40,13 @@ def stop_job(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "rollup.stop_job" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def stop_job(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_rollup/job/{id}/_stop"], :endpoint => 'rollup.stop_job' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb index 779d4bdbfb..7c4129c16a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb @@ -35,6 +35,7 @@ module Actions def scripts_painless_execute(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "scripts_painless_execute" } body = arguments.delete(:body) @@ -48,8 +49,7 @@ def scripts_painless_execute(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_scripts/painless/_execute"], :endpoint => 'scripts_painless_execute' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb index 43525ebb56..5a318ac874 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb @@ -39,6 +39,13 @@ module Actions def scroll(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "scroll" } + + defined_params = ["scroll_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -58,8 +65,7 @@ def scroll(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_search/scroll", "/_search/scroll/{scroll_id}"], :endpoint => 'scroll' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb index e4130b5725..f4286c791e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb @@ -77,6 +77,13 @@ module Actions def search(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -96,8 +103,7 @@ def search(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_search", "/{index}/_search"], :endpoint => 'search' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb index 21d9e4140f..08ef42609c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete.rb @@ -38,6 +38,13 @@ def delete(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_application.delete" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_application/search_application/{name}"], :endpoint => 'search_application.delete' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb index cca8d27fcf..9e257125fc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb @@ -38,6 +38,13 @@ def delete_behavioral_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_application.delete_behavioral_analytics" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def delete_behavioral_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_application/analytics/{name}"], :endpoint => 'search_application.delete_behavioral_analytics' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb index 2ff23ef47a..16f30c8813 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get.rb @@ -38,6 +38,13 @@ def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_application.get" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_application/search_application/{name}"], :endpoint => 'search_application.get' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb index 46c9df604a..38759588b1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb @@ -36,6 +36,13 @@ module Actions def get_behavioral_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_application.get_behavioral_analytics" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def get_behavioral_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_application/analytics", "/_application/analytics/{name}"], :endpoint => 'search_application.get_behavioral_analytics' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb index 56aee8e69c..57edde1230 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/list.rb @@ -38,6 +38,7 @@ module Actions def list(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_application.list" } body = nil @@ -46,8 +47,7 @@ def list(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_application/search_application"], :endpoint => 'search_application.list' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb index 01ea4e3551..09988124b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb @@ -43,6 +43,13 @@ def post_behavioral_analytics_event(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_application.post_behavioral_analytics_event" } + + defined_params = ["collection_name", "event_type"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -55,8 +62,7 @@ def post_behavioral_analytics_event(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_application/analytics/{collection_name}/event/{event_type}"], :endpoint => 'search_application.post_behavioral_analytics_event' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb index cc6b50f4e7..cfa16d5fe0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put.rb @@ -41,6 +41,13 @@ def put(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_application.put" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -51,8 +58,7 @@ def put(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_application/search_application/{name}"], :endpoint => 'search_application.put' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb index cb781c1325..e1c37c07c6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb @@ -38,6 +38,13 @@ def put_behavioral_analytics(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_application.put_behavioral_analytics" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def put_behavioral_analytics(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_application/analytics/{name}"], :endpoint => 'search_application.put_behavioral_analytics' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb index 06518b4bb8..204090689d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/render_query.rb @@ -39,6 +39,13 @@ def render_query(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_application.render_query" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def render_query(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_application/search_application/{name}/_render_query"], :endpoint => 'search_application.render_query' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb index 4e06e2f3cc..75161d1bbb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb @@ -39,6 +39,13 @@ def search(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_application.search" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -54,8 +61,7 @@ def search(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_application/search_application/{name}/_search"], :endpoint => 'search_application.search' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb index fc29471bc0..67dbe167c6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb @@ -53,6 +53,13 @@ def search_mvt(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_mvt" } + + defined_params = ["index", "field", "zoom", "x", "y"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -71,8 +78,7 @@ def search_mvt(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_mvt/{field}/{zoom}/{x}/{y}"], :endpoint => 'search_mvt' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb index 4d17ede9bc..c97bd163e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb @@ -37,6 +37,13 @@ module Actions def search_shards(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_shards" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -51,8 +58,7 @@ def search_shards(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_search_shards", "/{index}/_search_shards"], :endpoint => 'search_shards' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb index b945e80bb4..75c07efdb1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb @@ -47,6 +47,13 @@ def search_template(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "search_template" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -61,8 +68,7 @@ def search_template(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_search/template", "/{index}/_search/template"], :endpoint => 'search_template' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb index e9071547e8..1201a8b4ac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb @@ -36,6 +36,13 @@ module Actions def cache_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "searchable_snapshots.cache_stats" } + + defined_params = ["node_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def cache_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_searchable_snapshots/cache/stats", "/_searchable_snapshots/{node_id}/cache/stats"], :endpoint => 'searchable_snapshots.cache_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb index 9fc977c6f5..77f31fb27f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb @@ -39,6 +39,13 @@ module Actions def clear_cache(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "searchable_snapshots.clear_cache" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -53,8 +60,7 @@ def clear_cache(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_searchable_snapshots/cache/clear", "/{index}/_searchable_snapshots/cache/clear"], :endpoint => 'searchable_snapshots.clear_cache' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb index aa4a3e40dc..70017c7dea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb @@ -41,6 +41,13 @@ def mount(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "searchable_snapshots.mount" } + + defined_params = ["repository", "snapshot"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -53,8 +60,7 @@ def mount(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}/{snapshot}/_mount"], :endpoint => 'searchable_snapshots.mount' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb index c902f146f3..e2b3b4ed16 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb @@ -33,6 +33,13 @@ module Actions def stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "searchable_snapshots.stats" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -47,8 +54,7 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_searchable_snapshots/stats", "/{index}/_searchable_snapshots/stats"], :endpoint => 'searchable_snapshots.stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb index 1505fdbbf1..4f548d55be 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/activate_user_profile.rb @@ -34,6 +34,7 @@ def activate_user_profile(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.activate_user_profile" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def activate_user_profile(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/profile/_activate"], :endpoint => 'security.activate_user_profile' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb index e60d70fe26..c9b506b992 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb @@ -31,6 +31,7 @@ module Actions def authenticate(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.authenticate" } body = nil @@ -39,8 +40,7 @@ def authenticate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/_authenticate"], :endpoint => 'security.authenticate' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb index 75434afdb7..1a3f08c56c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb @@ -34,6 +34,7 @@ def bulk_update_api_keys(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.bulk_update_api_keys" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def bulk_update_api_keys(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/api_key/_bulk_update"], :endpoint => 'security.bulk_update_api_keys' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb index b6dd300ab4..e48bea4825 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb @@ -36,6 +36,13 @@ def change_password(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.change_password" } + + defined_params = ["username"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def change_password(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/user/{username}/_password", "/_security/user/_password"], :endpoint => 'security.change_password' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb index 4f6444ff22..3044936011 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb @@ -34,6 +34,13 @@ def clear_api_key_cache(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.clear_api_key_cache" } + + defined_params = ["ids"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def clear_api_key_cache(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/api_key/{ids}/_clear_cache"], :endpoint => 'security.clear_api_key_cache' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb index 6a75eb352e..48d8ec3da1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb @@ -34,6 +34,13 @@ def clear_cached_privileges(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.clear_cached_privileges" } + + defined_params = ["application"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def clear_cached_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/privilege/{application}/_clear_cache"], :endpoint => 'security.clear_cached_privileges' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb index c475afd1b1..69579d9b04 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb @@ -35,6 +35,13 @@ def clear_cached_realms(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.clear_cached_realms" } + + defined_params = ["realms"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def clear_cached_realms(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/realm/{realms}/_clear_cache"], :endpoint => 'security.clear_cached_realms' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb index 2dbc678569..662f14b3ae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb @@ -34,6 +34,13 @@ def clear_cached_roles(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.clear_cached_roles" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def clear_cached_roles(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/role/{name}/_clear_cache"], :endpoint => 'security.clear_cached_roles' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb index 9b5ea0b476..a527fc0603 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb @@ -38,6 +38,13 @@ def clear_cached_service_tokens(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.clear_cached_service_tokens" } + + defined_params = ["namespace", "service", "name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -52,8 +59,7 @@ def clear_cached_service_tokens(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache"], :endpoint => 'security.clear_cached_service_tokens' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb index c363932e20..d4422e1264 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb @@ -35,6 +35,7 @@ def create_api_key(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.create_api_key" } body = arguments.delete(:body) @@ -43,8 +44,7 @@ def create_api_key(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/api_key"], :endpoint => 'security.create_api_key' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb index 13e4f0e878..cd218c8886 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb @@ -38,6 +38,7 @@ def create_cross_cluster_api_key(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.create_cross_cluster_api_key" } body = arguments.delete(:body) @@ -46,8 +47,7 @@ def create_cross_cluster_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/cross_cluster/api_key"], :endpoint => 'security.create_cross_cluster_api_key' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb index b52efb6b5a..75c8bc1829 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb @@ -38,6 +38,13 @@ def create_service_token(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.create_service_token" } + + defined_params = ["namespace", "service", "name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -56,8 +63,7 @@ def create_service_token(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/service/{namespace}/{service}/credential/token/{name}", "/_security/service/{namespace}/{service}/credential/token"], :endpoint => 'security.create_service_token' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb index 3f3c54c535..2c103bbd78 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb @@ -37,6 +37,13 @@ def delete_privileges(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.delete_privileges" } + + defined_params = ["application", "name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -49,8 +56,7 @@ def delete_privileges(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/privilege/{application}/{name}"], :endpoint => 'security.delete_privileges' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb index 0320940c61..f46bf9e839 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb @@ -35,6 +35,13 @@ def delete_role(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.delete_role" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def delete_role(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/role/{name}"], :endpoint => 'security.delete_role' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb index c1b63dfe83..787bd4417f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb @@ -35,6 +35,13 @@ def delete_role_mapping(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.delete_role_mapping" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def delete_role_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/role_mapping/{name}"], :endpoint => 'security.delete_role_mapping' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb index 7f89078409..2603615aed 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb @@ -39,6 +39,13 @@ def delete_service_token(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.delete_service_token" } + + defined_params = ["namespace", "service", "name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -53,8 +60,7 @@ def delete_service_token(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/service/{namespace}/{service}/credential/token/{name}"], :endpoint => 'security.delete_service_token' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb index 1d93bf492a..dce200c42d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb @@ -35,6 +35,13 @@ def delete_user(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.delete_user" } + + defined_params = ["username"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def delete_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/user/{username}"], :endpoint => 'security.delete_user' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb index 72c705f620..5e29d26ff3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb @@ -35,6 +35,13 @@ def disable_user(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.disable_user" } + + defined_params = ["username"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def disable_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/user/{username}/_disable"], :endpoint => 'security.disable_user' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb index 251b156f9a..c29461ef0d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user_profile.rb @@ -35,6 +35,13 @@ def disable_user_profile(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.disable_user_profile" } + + defined_params = ["uid"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def disable_user_profile(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/profile/{uid}/_disable"], :endpoint => 'security.disable_user_profile' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb index 11d2989356..911d0aafe4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb @@ -35,6 +35,13 @@ def enable_user(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.enable_user" } + + defined_params = ["username"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def enable_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/user/{username}/_enable"], :endpoint => 'security.enable_user' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb index d20f5377a7..c3ca7141d3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user_profile.rb @@ -35,6 +35,13 @@ def enable_user_profile(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.enable_user_profile" } + + defined_params = ["uid"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def enable_user_profile(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/profile/{uid}/_enable"], :endpoint => 'security.enable_user_profile' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb index 80bdc6eb5b..76e031d71b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb @@ -31,6 +31,7 @@ module Actions def enroll_kibana(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.enroll_kibana" } body = nil @@ -39,8 +40,7 @@ def enroll_kibana(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/enroll/kibana"], :endpoint => 'security.enroll_kibana' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb index b2631f26aa..d72f968de1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb @@ -31,6 +31,7 @@ module Actions def enroll_node(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.enroll_node" } body = nil @@ -39,8 +40,7 @@ def enroll_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/enroll/node"], :endpoint => 'security.enroll_node' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb index 99a9897ebb..2b77edbe7b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb @@ -37,6 +37,7 @@ module Actions def get_api_key(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.get_api_key" } body = nil @@ -45,8 +46,7 @@ def get_api_key(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/api_key"], :endpoint => 'security.get_api_key' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb index 005e4f5d16..63273a1d45 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb @@ -31,6 +31,7 @@ module Actions def get_builtin_privileges(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.get_builtin_privileges" } body = nil @@ -39,8 +40,7 @@ def get_builtin_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/privilege/_builtin"], :endpoint => 'security.get_builtin_privileges' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb index 7157273e85..12c53f9297 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb @@ -33,6 +33,13 @@ module Actions def get_privileges(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.get_privileges" } + + defined_params = ["application", "name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -51,8 +58,7 @@ def get_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/privilege", "/_security/privilege/{application}", "/_security/privilege/{application}/{name}"], :endpoint => 'security.get_privileges' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb index ca4fec7c9e..dc2428defd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb @@ -32,6 +32,13 @@ module Actions def get_role(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.get_role" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,14 +55,12 @@ def get_role(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/role/{name}", "/_security/role"], :endpoint => 'security.get_role' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/role/{name}", "/_security/role"], :endpoint => 'security.get_role' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb index fbae482275..977fbc2f98 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb @@ -32,6 +32,13 @@ module Actions def get_role_mapping(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.get_role_mapping" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def get_role_mapping(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/role_mapping/{name}", "/_security/role_mapping"], :endpoint => 'security.get_role_mapping' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb index 676ae11d95..b1fc9adf81 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb @@ -33,6 +33,13 @@ module Actions def get_service_accounts(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.get_service_accounts" } + + defined_params = ["namespace", "service"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -51,8 +58,7 @@ def get_service_accounts(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/service/{namespace}/{service}", "/_security/service/{namespace}", "/_security/service"], :endpoint => 'security.get_service_accounts' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb index d1cf5906d3..b37c1da0a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb @@ -36,6 +36,13 @@ def get_service_credentials(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.get_service_credentials" } + + defined_params = ["namespace", "service"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get_service_credentials(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/service/{namespace}/{service}/credential"], :endpoint => 'security.get_service_credentials' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb index ce3e780c6d..5f79a51a61 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb @@ -34,6 +34,7 @@ def get_token(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.get_token" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def get_token(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/oauth2/token"], :endpoint => 'security.get_token' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb index cc04b42995..10e13f42bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb @@ -33,6 +33,13 @@ module Actions def get_user(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.get_user" } + + defined_params = ["username"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -49,14 +56,12 @@ def get_user(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/user/{username}", "/_security/user"], :endpoint => 'security.get_user' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/user/{username}", "/_security/user"], :endpoint => 'security.get_user' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb index 60ee2b876a..7245f658c8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb @@ -31,6 +31,7 @@ module Actions def get_user_privileges(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.get_user_privileges" } body = nil @@ -39,8 +40,7 @@ def get_user_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/user/_privileges"], :endpoint => 'security.get_user_privileges' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb index 765b14af1f..f651e568cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_profile.rb @@ -35,6 +35,13 @@ def get_user_profile(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.get_user_profile" } + + defined_params = ["uid"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def get_user_profile(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/profile/{uid}"], :endpoint => 'security.get_user_profile' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb index e767ac8485..f00dada6d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb @@ -35,6 +35,7 @@ def grant_api_key(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.grant_api_key" } body = arguments.delete(:body) @@ -43,8 +44,7 @@ def grant_api_key(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/api_key/grant"], :endpoint => 'security.grant_api_key' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb index 00929922d8..0de6137290 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb @@ -35,6 +35,13 @@ def has_privileges(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.has_privileges" } + + defined_params = ["user"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def has_privileges(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/user/_has_privileges", "/_security/user/{user}/_has_privileges"], :endpoint => 'security.has_privileges' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb index 85e01af8fe..c23d66f853 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb @@ -34,6 +34,7 @@ def has_privileges_user_profile(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.has_privileges_user_profile" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def has_privileges_user_profile(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/profile/_has_privileges"], :endpoint => 'security.has_privileges_user_profile' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb index fc101afc4f..731d230221 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb @@ -34,6 +34,7 @@ def invalidate_api_key(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.invalidate_api_key" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def invalidate_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/api_key"], :endpoint => 'security.invalidate_api_key' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb index 2a79141c6c..2380ae601c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb @@ -34,6 +34,7 @@ def invalidate_token(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.invalidate_token" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def invalidate_token(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/oauth2/token"], :endpoint => 'security.invalidate_token' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb index 52b8fc2673..afb65bfda7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_authenticate.rb @@ -34,6 +34,7 @@ def oidc_authenticate(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.oidc_authenticate" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def oidc_authenticate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/oidc/authenticate"], :endpoint => 'security.oidc_authenticate' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb index cf343506cc..e539954fd0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_logout.rb @@ -34,6 +34,7 @@ def oidc_logout(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.oidc_logout" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def oidc_logout(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/oidc/logout"], :endpoint => 'security.oidc_logout' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb index de2b330075..bc68f54c11 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb @@ -34,6 +34,7 @@ def oidc_prepare_authentication(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.oidc_prepare_authentication" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def oidc_prepare_authentication(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/oidc/prepare"], :endpoint => 'security.oidc_prepare_authentication' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb index 73d166b250..af05f29ecc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb @@ -35,6 +35,7 @@ def put_privileges(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.put_privileges" } body = arguments.delete(:body) @@ -43,8 +44,7 @@ def put_privileges(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/privilege/"], :endpoint => 'security.put_privileges' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb index af728f0553..c9da4825d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb @@ -37,6 +37,13 @@ def put_role(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.put_role" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -47,8 +54,7 @@ def put_role(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/role/{name}"], :endpoint => 'security.put_role' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb index 4cd6b46d11..3912d9ae1a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb @@ -37,6 +37,13 @@ def put_role_mapping(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.put_role_mapping" } + + defined_params = ["name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -47,8 +54,7 @@ def put_role_mapping(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/role_mapping/{name}"], :endpoint => 'security.put_role_mapping' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb index dafe8255f5..bacd8823d3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb @@ -37,6 +37,13 @@ def put_user(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.put_user" } + + defined_params = ["username"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -47,8 +54,7 @@ def put_user(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/user/{username}"], :endpoint => 'security.put_user' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb index def749f8cd..7339162e26 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb @@ -33,6 +33,7 @@ module Actions def query_api_keys(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.query_api_keys" } body = arguments.delete(:body) @@ -46,8 +47,7 @@ def query_api_keys(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/_query/api_key"], :endpoint => 'security.query_api_keys' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb index ec9543a64a..f4d14eb7ad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb @@ -34,6 +34,7 @@ def saml_authenticate(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.saml_authenticate" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def saml_authenticate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/saml/authenticate"], :endpoint => 'security.saml_authenticate' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb index 0b115e682d..1ac996f7fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb @@ -34,6 +34,7 @@ def saml_complete_logout(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.saml_complete_logout" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def saml_complete_logout(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/saml/complete_logout"], :endpoint => 'security.saml_complete_logout' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb index 57144366c2..865de98bda 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb @@ -34,6 +34,7 @@ def saml_invalidate(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.saml_invalidate" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def saml_invalidate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/saml/invalidate"], :endpoint => 'security.saml_invalidate' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb index 74ea33a542..d4a610ac0f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb @@ -34,6 +34,7 @@ def saml_logout(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.saml_logout" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def saml_logout(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/saml/logout"], :endpoint => 'security.saml_logout' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb index 9917e08d38..0ba3bbaf3d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb @@ -34,6 +34,7 @@ def saml_prepare_authentication(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.saml_prepare_authentication" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def saml_prepare_authentication(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/saml/prepare"], :endpoint => 'security.saml_prepare_authentication' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb index f589e03718..d29fac6dad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb @@ -34,6 +34,13 @@ def saml_service_provider_metadata(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.saml_service_provider_metadata" } + + defined_params = ["realm_name"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def saml_service_provider_metadata(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/saml/metadata/{realm_name}"], :endpoint => 'security.saml_service_provider_metadata' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb index daf737c17d..8a7ce70a0b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb @@ -33,6 +33,7 @@ module Actions def suggest_user_profiles(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.suggest_user_profiles" } body = arguments.delete(:body) @@ -46,8 +47,7 @@ def suggest_user_profiles(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/profile/_suggest"], :endpoint => 'security.suggest_user_profiles' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb index 8df856c022..1910c51dc6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_api_key.rb @@ -35,6 +35,13 @@ def update_api_key(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.update_api_key" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -45,8 +52,7 @@ def update_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/api_key/{id}"], :endpoint => 'security.update_api_key' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb index efbd1a1b80..24ce3cc573 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb @@ -40,6 +40,13 @@ def update_cross_cluster_api_key(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.update_cross_cluster_api_key" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def update_cross_cluster_api_key(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/cross_cluster/api_key/{id}"], :endpoint => 'security.update_cross_cluster_api_key' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb index 34cc55c723..9f9f2197fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/update_user_profile_data.rb @@ -39,6 +39,13 @@ def update_user_profile_data(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "security.update_user_profile_data" } + + defined_params = ["uid"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def update_user_profile_data(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_security/profile/{uid}/_data"], :endpoint => 'security.update_user_profile_data' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb index b4359d865d..7f4db153ac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb @@ -34,6 +34,13 @@ def delete_node(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "shutdown.delete_node" } + + defined_params = ["node_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_nodes/{node_id}/shutdown"], :endpoint => 'shutdown.delete_node' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb index 539a72e500..f6bf7db11f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb @@ -32,6 +32,13 @@ module Actions def get_node(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "shutdown.get_node" } + + defined_params = ["node_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def get_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_nodes/shutdown", "/_nodes/{node_id}/shutdown"], :endpoint => 'shutdown.get_node' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb index cde3f4ce32..fb5656ce60 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb @@ -36,6 +36,13 @@ def put_node(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "shutdown.put_node" } + + defined_params = ["node_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -46,8 +53,7 @@ def put_node(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_nodes/{node_id}/shutdown"], :endpoint => 'shutdown.put_node' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb index c2693bbbe3..eef308ea90 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb @@ -36,6 +36,13 @@ def cleanup_repository(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "snapshot.cleanup_repository" } + + defined_params = ["repository"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def cleanup_repository(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}/_cleanup"], :endpoint => 'snapshot.cleanup_repository' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb index 56c9553fe1..db2fb1b1cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb @@ -41,6 +41,13 @@ def clone(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "snapshot.clone" } + + defined_params = ["repository", "snapshot", "target_snapshot"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -55,8 +62,7 @@ def clone(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}"], :endpoint => 'snapshot.clone' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb index 6fef84a166..66443ef99f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb @@ -39,6 +39,13 @@ def create(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "snapshot.create" } + + defined_params = ["repository", "snapshot"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -51,8 +58,7 @@ def create(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}/{snapshot}"], :endpoint => 'snapshot.create' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb index 04283c0bc5..9a1369f3c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb @@ -39,6 +39,13 @@ def create_repository(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "snapshot.create_repository" } + + defined_params = ["repository"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def create_repository(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}"], :endpoint => 'snapshot.create_repository' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb index 4dd7dc27a5..8721b5ae03 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb @@ -37,6 +37,13 @@ def delete(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "snapshot.delete" } + + defined_params = ["repository", "snapshot"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -51,14 +58,12 @@ def delete(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}/{snapshot}"], :endpoint => 'snapshot.delete' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}/{snapshot}"], :endpoint => 'snapshot.delete' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb index 9efabda074..b705c961b2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb @@ -36,6 +36,13 @@ def delete_repository(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "snapshot.delete_repository" } + + defined_params = ["repository"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,14 +55,12 @@ def delete_repository(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}"], :endpoint => 'snapshot.delete_repository' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}"], :endpoint => 'snapshot.delete_repository' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb index 58b246d84a..898e751d5b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb @@ -49,6 +49,13 @@ def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "snapshot.get" } + + defined_params = ["repository", "snapshot"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -63,14 +70,12 @@ def get(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}/{snapshot}"], :endpoint => 'snapshot.get' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}/{snapshot}"], :endpoint => 'snapshot.get' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb index c48fb15b7c..3ffa74ac96 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb @@ -34,6 +34,13 @@ module Actions def get_repository(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "snapshot.get_repository" } + + defined_params = ["repository"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,14 +57,12 @@ def get_repository(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot", "/_snapshot/{repository}"], :endpoint => 'snapshot.get_repository' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot", "/_snapshot/{repository}"], :endpoint => 'snapshot.get_repository' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb index 30d26b4b13..b79ef30633 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb @@ -45,6 +45,13 @@ def repository_analyze(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "snapshot.repository_analyze" } + + defined_params = ["repository"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -55,8 +62,7 @@ def repository_analyze(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}/_analyze"], :endpoint => 'snapshot.repository_analyze' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb index ab53215e66..c0690433fe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb @@ -39,6 +39,13 @@ def restore(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "snapshot.restore" } + + defined_params = ["repository", "snapshot"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -51,8 +58,7 @@ def restore(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}/{snapshot}/_restore"], :endpoint => 'snapshot.restore' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb index 50d74e61e3..f6fadc4e49 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb @@ -35,6 +35,13 @@ module Actions def status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "snapshot.status" } + + defined_params = ["repository", "snapshot"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -55,14 +62,12 @@ def status(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/_status", "/_snapshot/{repository}/_status", "/_snapshot/{repository}/{snapshot}/_status"], :endpoint => 'snapshot.status' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/_status", "/_snapshot/{repository}/_status", "/_snapshot/{repository}/{snapshot}/_status"], :endpoint => 'snapshot.status' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb index 3a742d9b6d..f1e2b6ac55 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb @@ -36,6 +36,13 @@ def verify_repository(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "snapshot.verify_repository" } + + defined_params = ["repository"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def verify_repository(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_snapshot/{repository}/_verify"], :endpoint => 'snapshot.verify_repository' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb index 95bcfa0372..44e9907e0e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb @@ -34,6 +34,13 @@ def delete_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "slm.delete_lifecycle" } + + defined_params = ["policy_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_slm/policy/{policy_id}"], :endpoint => 'slm.delete_lifecycle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb index 1c96230de2..b71d557be4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb @@ -34,6 +34,13 @@ def execute_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "slm.execute_lifecycle" } + + defined_params = ["policy_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def execute_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_slm/policy/{policy_id}/_execute"], :endpoint => 'slm.execute_lifecycle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb index 8091814043..754624b3da 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb @@ -31,6 +31,7 @@ module Actions def execute_retention(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "slm.execute_retention" } body = nil @@ -39,8 +40,7 @@ def execute_retention(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_slm/_execute_retention"], :endpoint => 'slm.execute_retention' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb index 1a6a011cd3..5dc37ddf9c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb @@ -32,6 +32,13 @@ module Actions def get_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "slm.get_lifecycle" } + + defined_params = ["policy_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def get_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_slm/policy/{policy_id}", "/_slm/policy"], :endpoint => 'slm.get_lifecycle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb index 286e969138..000812cfdf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb @@ -31,6 +31,7 @@ module Actions def get_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "slm.get_stats" } body = nil @@ -39,8 +40,7 @@ def get_stats(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_slm/stats"], :endpoint => 'slm.get_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb index 4d27db9e41..57eb4887b3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb @@ -31,6 +31,7 @@ module Actions def get_status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "slm.get_status" } body = nil @@ -39,8 +40,7 @@ def get_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_slm/status"], :endpoint => 'slm.get_status' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb index 7b5505b5a6..c500b73960 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb @@ -35,6 +35,13 @@ def put_lifecycle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "slm.put_lifecycle" } + + defined_params = ["policy_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -45,8 +52,7 @@ def put_lifecycle(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_slm/policy/{policy_id}"], :endpoint => 'slm.put_lifecycle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb index e5cf0e6e01..227ad82592 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb @@ -31,6 +31,7 @@ module Actions def start(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "slm.start" } body = nil @@ -39,8 +40,7 @@ def start(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_slm/start"], :endpoint => 'slm.start' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb index ba33ba6dcd..381b83258f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb @@ -31,6 +31,7 @@ module Actions def stop(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "slm.stop" } body = nil @@ -39,8 +40,7 @@ def stop(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_slm/stop"], :endpoint => 'slm.stop' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb index 0dd92de050..231bdb925b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb @@ -34,6 +34,7 @@ def clear_cursor(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "sql.clear_cursor" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def clear_cursor(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_sql/close"], :endpoint => 'sql.clear_cursor' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb index bff0abd8ea..7747e0fb01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb @@ -34,6 +34,13 @@ def delete_async(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "sql.delete_async" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def delete_async(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_sql/async/delete/{id}"], :endpoint => 'sql.delete_async' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb index 7fe19299a1..1bd0420cd9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb @@ -38,6 +38,13 @@ def get_async(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "sql.get_async" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get_async(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_sql/async/{id}"], :endpoint => 'sql.get_async' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb index fda8db2ee6..49323dcf8b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb @@ -34,6 +34,13 @@ def get_async_status(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "sql.get_async_status" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def get_async_status(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_sql/async/status/{id}"], :endpoint => 'sql.get_async_status' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb index bbb5d467be..871daa886d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb @@ -35,6 +35,7 @@ def query(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "sql.query" } body = arguments.delete(:body) @@ -43,8 +44,7 @@ def query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_sql"], :endpoint => 'sql.query' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb index 87844342f4..08f000560d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb @@ -34,6 +34,7 @@ def translate(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "sql.translate" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def translate(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_sql/translate"], :endpoint => 'sql.translate' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb index d27f18a271..72b354f5bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb @@ -31,6 +31,7 @@ module Actions def certificates(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "ssl.certificates" } body = nil @@ -39,8 +40,7 @@ def certificates(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_ssl/certificates"], :endpoint => 'ssl.certificates' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb index e83ac55305..ab7a0d1a62 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonym_rule/put.rb @@ -42,6 +42,13 @@ def put(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "synonym_rule.put" } + + defined_params = ["synonyms_set", "synonym_rule"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -54,8 +61,7 @@ def put(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_synonyms/{synonyms_set}/{synonym_rule}"], :endpoint => 'synonym_rule.put' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb index 89d74c4b9a..01719f8ec6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete.rb @@ -38,6 +38,13 @@ def delete(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "synonyms.delete" } + + defined_params = ["synonyms_set"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def delete(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_synonyms/{synonyms_set}"], :endpoint => 'synonyms.delete' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb index a399b30056..f2793e8bfe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/get.rb @@ -40,6 +40,13 @@ def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "synonyms.get" } + + defined_params = ["synonyms_set"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_synonyms/{synonyms_set}"], :endpoint => 'synonyms.get' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb index 7f73fa3cbc..8499f81ec6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put.rb @@ -40,6 +40,13 @@ def put(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "synonyms.put" } + + defined_params = ["synonyms_set"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -50,8 +57,7 @@ def put(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_synonyms/{synonyms_set}"], :endpoint => 'synonyms.put' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb index 6e68da7e72..bf64cc86dc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/synonyms_sets/get.rb @@ -37,6 +37,7 @@ module Actions def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "synonyms_sets.get" } body = nil @@ -45,8 +46,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_synonyms"], :endpoint => 'synonyms_sets.get' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb index e47b77f18a..3ce43b2f46 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb @@ -40,6 +40,13 @@ module Actions def cancel(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "tasks.cancel" } + + defined_params = ["task_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -54,8 +61,7 @@ def cancel(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_tasks/_cancel", "/_tasks/{task_id}/_cancel"], :endpoint => 'tasks.cancel' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb index 054352442c..961675707e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb @@ -38,6 +38,13 @@ module Actions def get(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "tasks.get" } + + defined_params = ["task_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_tasks/{task_id}"], :endpoint => 'tasks.get' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb index 934751fc85..0c13c1b057 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb @@ -42,6 +42,7 @@ module Actions def list(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "tasks.list" } body = nil @@ -50,8 +51,7 @@ def list(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_tasks"], :endpoint => 'tasks.list' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb index cc261f252a..92f27c5249 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb @@ -34,6 +34,13 @@ def terms_enum(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "terms_enum" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def terms_enum(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_terms_enum"], :endpoint => 'terms_enum' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb index 6e8caa7157..2ce6950d41 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb @@ -46,6 +46,13 @@ def termvectors(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "termvectors" } + + defined_params = ["index", "id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -68,8 +75,7 @@ def termvectors(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_termvectors/{id}", "/{index}/_termvectors"], :endpoint => 'termvectors' }) + perform_request(method, path, params, body, headers, request_opts) ) end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb index 17d143a571..5a94a38166 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb @@ -49,6 +49,7 @@ def find_structure(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "text_structure.find_structure" } body = arguments.delete(:body) @@ -64,8 +65,7 @@ def find_structure(arguments = {}) headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, - { :path_templates => ["/_text_structure/find_structure"], :endpoint => 'text_structure.find_structure' }) + perform_request(method, path, params, payload, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb index 266f4c9663..6f590254be 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb @@ -37,6 +37,13 @@ def delete_transform(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "transform.delete_transform" } + + defined_params = ["transform_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -47,8 +54,7 @@ def delete_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_transform/{transform_id}"], :endpoint => 'transform.delete_transform' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb index 64af48c293..4a6a3685df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb @@ -36,6 +36,13 @@ module Actions def get_transform(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "transform.get_transform" } + + defined_params = ["transform_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -50,8 +57,7 @@ def get_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_transform/{transform_id}", "/_transform"], :endpoint => 'transform.get_transform' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb index 2578382683..a2eadee5da 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb @@ -38,6 +38,13 @@ def get_transform_stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "transform.get_transform_stats" } + + defined_params = ["transform_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -48,8 +55,7 @@ def get_transform_stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_transform/{transform_id}/_stats"], :endpoint => 'transform.get_transform_stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb index 357662c8ff..ec8d4798cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb @@ -34,6 +34,13 @@ module Actions def preview_transform(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "transform.preview_transform" } + + defined_params = ["transform_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -53,8 +60,7 @@ def preview_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_transform/{transform_id}/_preview", "/_transform/_preview"], :endpoint => 'transform.preview_transform' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb index 5021572c7e..d5492a353f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb @@ -38,6 +38,13 @@ def put_transform(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "transform.put_transform" } + + defined_params = ["transform_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -48,8 +55,7 @@ def put_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_transform/{transform_id}"], :endpoint => 'transform.put_transform' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb index 7898f6f2d8..2745ee2ab6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/reset_transform.rb @@ -36,6 +36,13 @@ def reset_transform(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "transform.reset_transform" } + + defined_params = ["transform_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def reset_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_transform/{transform_id}/_reset"], :endpoint => 'transform.reset_transform' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb index f4cb5c1684..1a96e8706d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb @@ -35,6 +35,13 @@ def schedule_now_transform(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "transform.schedule_now_transform" } + + defined_params = ["transform_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -45,8 +52,7 @@ def schedule_now_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_transform/{transform_id}/_schedule_now"], :endpoint => 'transform.schedule_now_transform' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb index dcca17fe17..e7ea6698f4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb @@ -36,6 +36,13 @@ def start_transform(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "transform.start_transform" } + + defined_params = ["transform_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,8 +53,7 @@ def start_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_transform/{transform_id}/_start"], :endpoint => 'transform.start_transform' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb index 98c9768ac8..eaefcb81f0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb @@ -39,6 +39,13 @@ def stop_transform(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "transform.stop_transform" } + + defined_params = ["transform_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -49,8 +56,7 @@ def stop_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_transform/{transform_id}/_stop"], :endpoint => 'transform.stop_transform' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb index 3bbd6f79d4..ec1e3c9c01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb @@ -38,6 +38,13 @@ def update_transform(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "transform.update_transform" } + + defined_params = ["transform_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -48,8 +55,7 @@ def update_transform(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_transform/{transform_id}/_update"], :endpoint => 'transform.update_transform' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb index 151aa8bab5..e61a2db4b3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb @@ -33,6 +33,7 @@ module Actions def upgrade_transforms(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "transform.upgrade_transforms" } body = nil @@ -41,8 +42,7 @@ def upgrade_transforms(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_transform/_upgrade"], :endpoint => 'transform.upgrade_transforms' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb index d83366f397..e7147614d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb @@ -49,6 +49,13 @@ def update(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "update" } + + defined_params = ["index", "id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -63,14 +70,12 @@ def update(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_update/{id}"], :endpoint => 'update' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_update/{id}"], :endpoint => 'update' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb index 06cdf06b7c..8d6495e807 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb @@ -66,6 +66,13 @@ def update_by_query(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "update_by_query" } + + defined_params = ["index"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -76,8 +83,7 @@ def update_by_query(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/{index}/_update_by_query"], :endpoint => 'update_by_query' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb index abfb16d6a6..359c346f48 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb @@ -34,6 +34,13 @@ def update_by_query_rethrottle(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "update_by_query_rethrottle" } + + defined_params = ["task_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def update_by_query_rethrottle(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_update_by_query/{task_id}/_rethrottle"], :endpoint => 'update_by_query_rethrottle' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb index 9a58c8ddc7..849726634e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb @@ -35,6 +35,13 @@ def ack_watch(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.ack_watch" } + + defined_params = ["watch_id", "action_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -51,8 +58,7 @@ def ack_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/watch/{watch_id}/_ack", "/_watcher/watch/{watch_id}/_ack/{action_id}"], :endpoint => 'watcher.ack_watch' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb index 8f716ef6e1..acca4cb8a9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb @@ -34,6 +34,13 @@ def activate_watch(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.activate_watch" } + + defined_params = ["watch_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def activate_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/watch/{watch_id}/_activate"], :endpoint => 'watcher.activate_watch' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb index 3765b607e7..74178bd2e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb @@ -34,6 +34,13 @@ def deactivate_watch(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.deactivate_watch" } + + defined_params = ["watch_id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def deactivate_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/watch/{watch_id}/_deactivate"], :endpoint => 'watcher.deactivate_watch' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb index d4d5726e3c..05996737a3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb @@ -34,6 +34,13 @@ def delete_watch(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.delete_watch" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -46,14 +53,12 @@ def delete_watch(arguments = {}) if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/watch/{id}"], :endpoint => 'watcher.delete_watch' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/watch/{id}"], :endpoint => 'watcher.delete_watch' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb index 9b4aaa436f..06e84c88df 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb @@ -34,6 +34,13 @@ module Actions def execute_watch(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.execute_watch" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -48,8 +55,7 @@ def execute_watch(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/watch/{id}/_execute", "/_watcher/watch/_execute"], :endpoint => 'watcher.execute_watch' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb index f526b80a79..a516b0d577 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_settings.rb @@ -31,6 +31,7 @@ module Actions def get_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.get_settings" } body = nil @@ -39,8 +40,7 @@ def get_settings(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/settings"], :endpoint => 'watcher.get_settings' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb index daa05ea745..a56a90627d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb @@ -34,6 +34,13 @@ def get_watch(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.get_watch" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -44,8 +51,7 @@ def get_watch(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/watch/{id}"], :endpoint => 'watcher.get_watch' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb index 01e8d2bdd0..7e0f17f77e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb @@ -39,6 +39,13 @@ def put_watch(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.put_watch" } + + defined_params = ["id"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = arguments.delete(:body) @@ -49,8 +56,7 @@ def put_watch(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/watch/{id}"], :endpoint => 'watcher.put_watch' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb index 430e89a992..46191b3a0f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb @@ -32,6 +32,7 @@ module Actions def query_watches(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.query_watches" } body = arguments.delete(:body) @@ -45,8 +46,7 @@ def query_watches(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/_query/watches"], :endpoint => 'watcher.query_watches' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb index b0b11bb0a3..63da1b2920 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb @@ -31,6 +31,7 @@ module Actions def start(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.start" } body = nil @@ -39,8 +40,7 @@ def start(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/_start"], :endpoint => 'watcher.start' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb index 01285b1c1c..9c7d85240c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb @@ -33,6 +33,13 @@ module Actions def stats(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.stats" } + + defined_params = ["metric"].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? body = nil @@ -47,8 +54,7 @@ def stats(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/stats", "/_watcher/stats/{metric}"], :endpoint => 'watcher.stats' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb index 5508a24345..9031577cba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb @@ -31,6 +31,7 @@ module Actions def stop(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.stop" } body = nil @@ -39,8 +40,7 @@ def stop(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/_stop"], :endpoint => 'watcher.stop' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb index ab794f3eaa..7b101fcb7d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/update_settings.rb @@ -34,6 +34,7 @@ def update_settings(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "watcher.update_settings" } body = arguments.delete(:body) @@ -42,8 +43,7 @@ def update_settings(arguments = {}) params = {} Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_watcher/settings"], :endpoint => 'watcher.update_settings' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb index 334ed06baa..d12c62bd5c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb @@ -33,6 +33,7 @@ module Actions def info(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "xpack.info" } body = nil @@ -41,8 +42,7 @@ def info(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_xpack"], :endpoint => 'xpack.info' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb index 084b3d8c37..a0035673a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb @@ -32,6 +32,7 @@ module Actions def usage(arguments = {}) arguments = arguments.clone headers = arguments.delete(:headers) || {} + request_opts = { :endpoint => "xpack.usage" } body = nil @@ -40,8 +41,7 @@ def usage(arguments = {}) params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, - { :path_templates => ["/_xpack/usage"], :endpoint => 'xpack.usage' }) + perform_request(method, path, params, body, headers, request_opts) ) end end diff --git a/elasticsearch-api/utils/thor/generate_source.rb b/elasticsearch-api/utils/thor/generate_source.rb index e9c40eb5f2..3136e00916 100644 --- a/elasticsearch-api/utils/thor/generate_source.rb +++ b/elasticsearch-api/utils/thor/generate_source.rb @@ -87,6 +87,8 @@ def generate_source @specific_params = specific_params(@module_namespace.first) # See EndpointSpecifics @http_method = __http_method @paths = @spec['url']['paths'].map { |b| b['path'] } + @path_params = __path_variables.flatten.uniq + @perform_request_opts = { endpoint: @endpoint_name } # Using Ruby's safe operator on array: @deprecation_note = @spec['url']['paths'].last&.[]('deprecated') @http_path = __http_path diff --git a/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb b/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb index 1346579d69..0bbf55691d 100644 --- a/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb +++ b/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb @@ -84,7 +84,7 @@ def module_name_helper(name) def ping_perform_request <<~SRC begin - perform_request(method, path, params, body, headers, { :path_templates => #{@paths}, :endpoint => '#{@endpoint_name}' }).status == 200 ? true : false + perform_request(method, path, params, body, headers, request_opts).status == 200 ? true : false rescue Exception => e if e.class.to_s =~ /NotFound|ConnectionFailed/ || e.message =~ /Not\s*Found|404|ConnectionFailed/i false diff --git a/elasticsearch-api/utils/thor/templates/_perform_request.erb b/elasticsearch-api/utils/thor/templates/_perform_request.erb index d67b5154e5..4e017be6c4 100644 --- a/elasticsearch-api/utils/thor/templates/_perform_request.erb +++ b/elasticsearch-api/utils/thor/templates/_perform_request.erb @@ -20,30 +20,30 @@ <%= self.send("#{@method_name}_body_helper".to_s) %> headers.merge!("Content-Type" => "application/x-ndjson") Elasticsearch::API::Response.new( - perform_request(method, path, params, payload, headers, { :path_templates => <%= @paths %>, :endpoint => '<%= @endpoint_name %>' }) + perform_request(method, path, params, payload, headers, request_opts) ) <%- elsif @method_name == 'ping' -%> <%= ping_perform_request %> <%- else -%> <%- if needs_ignore_404?(@endpoint_name) %> Utils.__rescue_from_not_found do - perform_request(method, path, params, body, headers, { :path_templates => <%= @paths %>, :endpoint => '<%= @endpoint_name %>' }).status == 200 ? true : false + perform_request(method, path, params, body, headers, opts).status == 200 ? true : false end <%- elsif needs_complex_ignore_404?(@endpoint_name) -%> if Array(arguments[:ignore]).include?(404) Utils.__rescue_from_not_found { Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, { :path_templates => <%= @paths %>, :endpoint => '<%= @endpoint_name %>' }) + perform_request(method, path, params, body, headers, request_opts) ) } else Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, { :path_templates => <%= @paths %>, :endpoint => '<%= @endpoint_name %>' }) + perform_request(method, path, params, body, headers, request_opts) ) end <%- else -%> Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, { :path_templates => <%= @paths %>, :endpoint => '<%= @endpoint_name %>' }) + perform_request(method, path, params, body, headers, request_opts) ) <%- end -%> <%- end -%> diff --git a/elasticsearch-api/utils/thor/templates/method.erb b/elasticsearch-api/utils/thor/templates/method.erb index ee56e4f303..3e929a03b3 100644 --- a/elasticsearch-api/utils/thor/templates/method.erb +++ b/elasticsearch-api/utils/thor/templates/method.erb @@ -43,6 +43,15 @@ module Elasticsearch arguments = arguments.clone <%- end -%> headers = arguments.delete(:headers) || {} + request_opts = <%= @perform_request_opts %> + <%- unless @path_params.empty? %> + defined_params =<%= @path_params %>.inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + <%- end %> + <%- %> <%- #Body %> <%= ERB.new(File.new("./thor/templates/_body.erb").read, trim_mode: '-').result(binding) %> <%- # Method setup -%> From 9ccca1fd17c4dd21c205e33c5bca796236acdf0a Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Wed, 19 Jul 2023 15:50:30 +0200 Subject: [PATCH 4/5] Unit tests --- elasticsearch-api/spec/opentelemetry_spec.rb | 142 +++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 elasticsearch-api/spec/opentelemetry_spec.rb diff --git a/elasticsearch-api/spec/opentelemetry_spec.rb b/elasticsearch-api/spec/opentelemetry_spec.rb new file mode 100644 index 0000000000..7797efa6e6 --- /dev/null +++ b/elasticsearch-api/spec/opentelemetry_spec.rb @@ -0,0 +1,142 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +require 'spec_helper' +require 'elastic-transport' +require 'opentelemetry-sdk' + +include Elasticsearch::API::EndpointSpecifics +def __full_namespace + names = @endpoint_name.split('.') + # Return an array to expand 'ccr', 'ilm', 'ml' and 'slm' + names.map do |name| + name + .gsub(/^ml$/, 'machine_learning') + .gsub(/^ilm$/, 'index_lifecycle_management') + .gsub(/^ccr/, 'cross_cluster_replication') + .gsub(/^slm/, 'snapshot_lifecycle_management') + end +end + +def __endpoint_parts + parts = @spec['url']['paths'].select do |a| + a.keys.include?('parts') + end.map do |path| + path&.[]('parts') + end + (parts.inject(&:merge) || []) +end + +def __http_method + return '_id ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @endpoint_name == 'index' + return '_name ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @method_name == 'create_service_token' + return post_and_get if @endpoint_name == 'count' + + default_method = @spec['url']['paths'].map { |a| a['methods'] }.flatten.first + if @spec['body'] && default_method == 'GET' + # When default method is GET and body is required, we should always use POST + if @spec['body']['required'] + 'Elasticsearch::API::HTTP_POST' + else + post_and_get + end + else + "Elasticsearch::API::HTTP_#{default_method}" + end +end + +def post_and_get + # the METHOD is defined after doing arguments.delete(:body), so we need to check for `body` + <<~SRC + if body + Elasticsearch::API::HTTP_POST + else + Elasticsearch::API::HTTP_GET + end + SRC +end + +describe 'OpenTelemetry' do + + + + #Elasticsearch::API::FilesHelper.files.each do |filepath| + filepath = Elasticsearch::API::FilesHelper.files[1] + @path = Pathname(filepath) + @json = MultiJson.load(File.read(@path)) + @spec = @json.values.first + + @spec['url'] ||= {} + + @endpoint_name = @json.keys.first + @full_namespace = __full_namespace + @namespace_depth = @full_namespace.size > 0 ? @full_namespace.size - 1 : 0 + @module_namespace = @full_namespace[0, @namespace_depth] + + # Don't generate code for internal APIs: + next if @module_namespace.flatten.first == '_internal' + + @method_name = @full_namespace.last + @parts = __endpoint_parts + @params = @spec['params'] || {} + @specific_params = specific_params(@module_namespace.first) # See EndpointSpecifics + @paths = @spec['url']['paths'].map { |b| b['path'] } + + @example_paths = @paths.collect { |path| path.gsub(/\{[^\/]+\}/, 'testing')} + + client = Elasticsearch::Client.new + defined_params = @parts.inject({}) do |args, part| + args[part[0].to_sym] = 'testing' + args + end + + namespace = @module_namespace + method_name = @method_name + endpoint_name = @endpoint_name + parts = @parts + binding.pry + + # check request_opts + # {:endpoint=>"indices.refresh", :defined_params=>{"index"=>"testing"}} + + let(:client_double) do + Class.new { include Elasticsearch::API }.new.tap do |client| + expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params| + expect(request_params).to eq(expected_params) + end + end + end + + let(:response_double) do + double('response', status: 200, body: {}, headers: {}) + end + context(@endpoint_name) do + + let(:expected_params) do + { defined_params: defined_params, endpoint: endpoint_name} + end + + it("passes the right params to the request: #{parts.keys}") do + binding.pry + unless namespace.empty? + client_double.send(namespace[0]).send(method_name, defined_params) + else + client_double.send(method_name, defined_params) + end + end + end +end \ No newline at end of file From dd6948dd14b326cc400f0eda17ecde701b6dcb48 Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Thu, 20 Jul 2023 09:56:38 +0200 Subject: [PATCH 5/5] Refactor and unit test --- elasticsearch-api/Gemfile | 3 + .../api/actions/cat/indices_spec.rb | 3 +- .../api/actions/cat/nodes_spec.rb | 3 +- elasticsearch-api/spec/opentelemetry_spec.rb | 133 +++++---- elasticsearch-api/spec/spec_helper.rb | 2 + .../utils/thor/generate_source.rb | 266 ++++++++++-------- .../thor/generator/endpoint_specifics.rb | 6 - .../utils/thor/templates/method.erb | 46 +-- 8 files changed, 257 insertions(+), 205 deletions(-) diff --git a/elasticsearch-api/Gemfile b/elasticsearch-api/Gemfile index 74ca453845..646b01d6b4 100644 --- a/elasticsearch-api/Gemfile +++ b/elasticsearch-api/Gemfile @@ -33,3 +33,6 @@ group :development do gem 'pry-byebug' end end + +gem 'elastic-transport', git: 'git@github.com:estolfo/elastic-transport-ruby.git', branch: 'otel-instrumentation' +gem 'opentelemetry-sdk' diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb index 4a5f1ae577..0e9a4d1d68 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/indices_spec.rb @@ -26,8 +26,7 @@ {}, nil, {}, - path_templates: ["/_cat/indices", "/_cat/indices/{index}"], - endpoint: "cat.indices" + { endpoint: "cat.indices" } ] end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb index 4b8516d1da..c2bcbe319b 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/cat/nodes_spec.rb @@ -26,8 +26,7 @@ {}, nil, {}, - path_templates: ["/_cat/nodes"], - endpoint: "cat.nodes" + { endpoint: "cat.nodes" } ] end diff --git a/elasticsearch-api/spec/opentelemetry_spec.rb b/elasticsearch-api/spec/opentelemetry_spec.rb index 7797efa6e6..2955a96871 100644 --- a/elasticsearch-api/spec/opentelemetry_spec.rb +++ b/elasticsearch-api/spec/opentelemetry_spec.rb @@ -20,6 +20,7 @@ require 'opentelemetry-sdk' include Elasticsearch::API::EndpointSpecifics + def __full_namespace names = @endpoint_name.split('.') # Return an array to expand 'ccr', 'ilm', 'ml' and 'slm' @@ -59,6 +60,28 @@ def __http_method end end +def __required_parts + required = [] + return required if @endpoint_name == 'tasks.get' + + required << 'body' if (@spec['body'] && @spec['body']['required']) + # Get required variables from paths: + req_variables = __path_variables.inject(:&) # find intersection + required << req_variables unless req_variables.empty? + required.flatten +end + +def __path_variables + @paths.map do |path| + __extract_path_variables(path) + end +end + +# extract values that are in the {var} format: +def __extract_path_variables(path) + path.scan(/{(\w+)}/).flatten +end + def post_and_get # the METHOD is defined after doing arguments.delete(:body), so we need to check for `body` <<~SRC @@ -72,70 +95,84 @@ def post_and_get describe 'OpenTelemetry' do + Elasticsearch::API::FilesHelper.files.each do |filepath| + #filepath = Elasticsearch::API::FilesHelper.files[1] + @path = Pathname(filepath) + @json = MultiJson.load(File.read(@path)) + @spec = @json.values.first + @spec['url'] ||= {} - #Elasticsearch::API::FilesHelper.files.each do |filepath| - filepath = Elasticsearch::API::FilesHelper.files[1] - @path = Pathname(filepath) - @json = MultiJson.load(File.read(@path)) - @spec = @json.values.first + @endpoint_name = @json.keys.first + @full_namespace = __full_namespace + @namespace_depth = @full_namespace.size > 0 ? @full_namespace.size - 1 : 0 + @module_namespace = @full_namespace[0, @namespace_depth] - @spec['url'] ||= {} + # Don't generate code for internal APIs: + next if @module_namespace.flatten.first == '_internal' - @endpoint_name = @json.keys.first - @full_namespace = __full_namespace - @namespace_depth = @full_namespace.size > 0 ? @full_namespace.size - 1 : 0 - @module_namespace = @full_namespace[0, @namespace_depth] + @method_name = @full_namespace.last + @parts = __endpoint_parts + @params = @spec['params'] || {} + @specific_params = specific_params(@module_namespace.first) # See EndpointSpecifics + @paths = @spec['url']['paths'].map { |b| b['path'] } + @required_parts = __required_parts - # Don't generate code for internal APIs: - next if @module_namespace.flatten.first == '_internal' + @example_paths = @paths.collect { |path| path.gsub(/\{[^\/]+\}/, 'testing')} - @method_name = @full_namespace.last - @parts = __endpoint_parts - @params = @spec['params'] || {} - @specific_params = specific_params(@module_namespace.first) # See EndpointSpecifics - @paths = @spec['url']['paths'].map { |b| b['path'] } - - @example_paths = @paths.collect { |path| path.gsub(/\{[^\/]+\}/, 'testing')} + defined_params = @parts.inject({}) do |args, part| + args[part[0].to_sym] = 'testing' + args + end - client = Elasticsearch::Client.new - defined_params = @parts.inject({}) do |args, part| - args[part[0].to_sym] = 'testing' - args - end + args = @required_parts.inject({}) do |arguments, required_part| + arguments[required_part.to_sym] = 'testing' + arguments + end - namespace = @module_namespace - method_name = @method_name - endpoint_name = @endpoint_name - parts = @parts - binding.pry + namespace = @module_namespace + method_name = @method_name + endpoint_name = @endpoint_name + parts = @parts - # check request_opts - # {:endpoint=>"indices.refresh", :defined_params=>{"index"=>"testing"}} + # check request_opts + # {:endpoint=>"indices.refresh", :defined_params=>{"index"=>"testing"}} - let(:client_double) do - Class.new { include Elasticsearch::API }.new.tap do |client| - expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params| - expect(request_params).to eq(expected_params) + let(:client_double) do + Class.new { include Elasticsearch::API }.new.tap do |client| + expect(client).to receive(:perform_request) do |_, _, _, _, _, request_params| + expect(request_params).to eq(expected_params) + end end end - end - let(:response_double) do - double('response', status: 200, body: {}, headers: {}) - end - context(@endpoint_name) do - - let(:expected_params) do - { defined_params: defined_params, endpoint: endpoint_name} + let(:response_double) do + double('response', status: 200, body: {}, headers: {}) end + context(@endpoint_name) do + + let(:expected_params) do + params = {endpoint: endpoint_name} + params[:defined_params] = defined_params unless defined_params.empty? + params + end - it("passes the right params to the request: #{parts.keys}") do - binding.pry - unless namespace.empty? - client_double.send(namespace[0]).send(method_name, defined_params) + if parts.empty? + it("passes the endpoint id to the request") do + unless namespace.empty? + client_double.send(namespace[0]).send(method_name, args.merge(defined_params)) + else + client_double.send(method_name, defined_params) + end + end else - client_double.send(method_name, defined_params) + it("passes the right params to the request: #{parts.keys}") do + unless namespace.empty? + client_double.send(namespace[0]).send(method_name, args.merge(defined_params)) + else + client_double.send(method_name, args.merge(defined_params)) + end + end end end end diff --git a/elasticsearch-api/spec/spec_helper.rb b/elasticsearch-api/spec/spec_helper.rb index 99d6d350a6..38d4fb6a0b 100644 --- a/elasticsearch-api/spec/spec_helper.rb +++ b/elasticsearch-api/spec/spec_helper.rb @@ -32,6 +32,8 @@ require 'elasticsearch-api' require 'openssl' require 'logger' +require_relative '../utils/thor/generator/files_helper' +require_relative '../utils/thor/generator/endpoint_specifics' tracer = ::Logger.new(STDERR) tracer.formatter = lambda { |s, d, p, m| "#{m.gsub(/^.*$/) { |n| ' ' + n } }\n" } diff --git a/elasticsearch-api/utils/thor/generate_source.rb b/elasticsearch-api/utils/thor/generate_source.rb index 3136e00916..6d670ba04e 100644 --- a/elasticsearch-api/utils/thor/generate_source.rb +++ b/elasticsearch-api/utils/thor/generate_source.rb @@ -40,7 +40,6 @@ module API class SourceGenerator < Thor namespace 'code' include Thor::Actions - include EndpointSpecifics desc 'generate', 'Generate source code and tests from the REST API JSON specification' method_option :verbose, type: :boolean, default: false, desc: 'Output more information' @@ -59,29 +58,21 @@ def generate print_tree if options[:verbose] end - private - - def generate_source - @output = FilesHelper.output_dir - cleanup_directory! + class Spec + include EndpointSpecifics - FilesHelper.files.each do |filepath| + def initialize(filepath) @path = Pathname(filepath) - @json = MultiJson.load(File.read(@path)) - @spec = @json.values.first - say_status 'json', @path, :yellow + json = MultiJson.load(File.read(@path)) + @spec = json.values.first + @endpoint_name = json.keys.first @spec['url'] ||= {} - - @endpoint_name = @json.keys.first @full_namespace = __full_namespace @namespace_depth = @full_namespace.size > 0 ? @full_namespace.size - 1 : 0 @module_namespace = @full_namespace[0, @namespace_depth] - - # Don't generate code for internal APIs: - next if @module_namespace.flatten.first == '_internal' - @method_name = @full_namespace.last + @parts = __endpoint_parts @params = @spec['params'] || {} @specific_params = specific_params(@module_namespace.first) # See EndpointSpecifics @@ -93,9 +84,141 @@ def generate_source @deprecation_note = @spec['url']['paths'].last&.[]('deprecated') @http_path = __http_path @required_parts = __required_parts + end + + attr_reader :module_namespace, :method_name, :path, :namespace_depth + + def module_name_helper(name) + return name.upcase if %w[sql ssl].include? name + + name.split('_').map(&:capitalize).map{ |n| n == 'Xpack' ? 'XPack' : n }.join + end + + private + + def __full_namespace + names = @endpoint_name.split('.') + # Return an array to expand 'ccr', 'ilm', 'ml' and 'slm' + names.map do |name| + name + .gsub(/^ml$/, 'machine_learning') + .gsub(/^ilm$/, 'index_lifecycle_management') + .gsub(/^ccr/, 'cross_cluster_replication') + .gsub(/^slm/, 'snapshot_lifecycle_management') + end + end + + # Extract parts from each path + # + def __endpoint_parts + parts = @spec['url']['paths'].select do |a| + a.keys.include?('parts') + end.map do |path| + path&.[]('parts') + end + (parts.inject(&:merge) || []) + end + + def __http_method + return '_id ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @endpoint_name == 'index' + return '_name ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @method_name == 'create_service_token' + return post_and_get if @endpoint_name == 'count' + + default_method = @spec['url']['paths'].map { |a| a['methods'] }.flatten.first + if @spec['body'] && default_method == 'GET' + # When default method is GET and body is required, we should always use POST + if @spec['body']['required'] + 'Elasticsearch::API::HTTP_POST' + else + post_and_get + end + else + "Elasticsearch::API::HTTP_#{default_method}" + end + end + + def post_and_get + # the METHOD is defined after doing arguments.delete(:body), so we need to check for `body` + <<~SRC + if body + Elasticsearch::API::HTTP_POST + else + Elasticsearch::API::HTTP_GET + end + SRC + end + + def __http_path + return "\"#{__parse_path(@paths.first)}\"" if @paths.size == 1 + + result = '' + anchor_string = [] + @paths.sort { |a, b| b.length <=> a.length }.each_with_index do |path, i| + var_string = __extract_path_variables(path).map { |var| "_#{var}" }.join(' && ') + next if anchor_string.include? var_string + + anchor_string << var_string + result += if i.zero? + "if #{var_string}\n" + elsif (i == @paths.size - 1) || var_string.empty? + "else\n" + else + "elsif #{var_string}\n" + end + result += "\"#{__parse_path(path)}\"\n" + end + result += 'end' + result + end + + def __parse_path(path) + path.gsub(/^\//, '') + .gsub(/\/$/, '') + .gsub('{', "\#{Utils.__listify(_") + .gsub('}', ')}') + end + + def __path_variables + @paths.map do |path| + __extract_path_variables(path) + end + end + + # extract values that are in the {var} format: + def __extract_path_variables(path) + path.scan(/{(\w+)}/).flatten + end - @path_to_file = @output.join(@module_namespace.join('/')).join("#{@method_name}.rb") - dir = @output.join(@module_namespace.join('/')) + # Find parts that are definitely required and should raise an error if + # they're not present + # + def __required_parts + required = [] + return required if @endpoint_name == 'tasks.get' + + required << 'body' if (@spec['body'] && @spec['body']['required']) + # Get required variables from paths: + req_variables = __path_variables.inject(:&) # find intersection + required << req_variables unless req_variables.empty? + required.flatten + end + end + + private + + def generate_source + @output = FilesHelper.output_dir + cleanup_directory! + + FilesHelper.files.each do |filepath| + @spec = Spec.new(filepath) + say_status 'json', @spec.path, :yellow + + # Don't generate code for internal APIs: + next if @spec.module_namespace.flatten.first == '_internal' + + @path_to_file = @output.join(@spec.module_namespace.join('/')).join("#{@spec.method_name}.rb") + dir = @output.join(@spec.module_namespace.join('/')) empty_directory(dir, verbose: false) @@ -139,18 +262,6 @@ def original_build_hash match[1] end - def __full_namespace - names = @endpoint_name.split('.') - # Return an array to expand 'ccr', 'ilm', 'ml' and 'slm' - names.map do |name| - name - .gsub(/^ml$/, 'machine_learning') - .gsub(/^ilm$/, 'index_lifecycle_management') - .gsub(/^ccr/, 'cross_cluster_replication') - .gsub(/^slm/, 'snapshot_lifecycle_management') - end - end - # Create the hierarchy of directories based on API namespaces # def __create_directories(key, value) @@ -160,101 +271,6 @@ def __create_directories(key, value) create_directory_hierarchy * value.to_a.first end - # Extract parts from each path - # - def __endpoint_parts - parts = @spec['url']['paths'].select do |a| - a.keys.include?('parts') - end.map do |path| - path&.[]('parts') - end - (parts.inject(&:merge) || []) - end - - def __http_method - return '_id ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @endpoint_name == 'index' - return '_name ? Elasticsearch::API::HTTP_PUT : Elasticsearch::API::HTTP_POST' if @method_name == 'create_service_token' - return post_and_get if @endpoint_name == 'count' - - default_method = @spec['url']['paths'].map { |a| a['methods'] }.flatten.first - if @spec['body'] && default_method == 'GET' - # When default method is GET and body is required, we should always use POST - if @spec['body']['required'] - 'Elasticsearch::API::HTTP_POST' - else - post_and_get - end - else - "Elasticsearch::API::HTTP_#{default_method}" - end - end - - def post_and_get - # the METHOD is defined after doing arguments.delete(:body), so we need to check for `body` - <<~SRC - if body - Elasticsearch::API::HTTP_POST - else - Elasticsearch::API::HTTP_GET - end - SRC - end - - def __http_path - return "\"#{__parse_path(@paths.first)}\"" if @paths.size == 1 - - result = '' - anchor_string = [] - @paths.sort { |a, b| b.length <=> a.length }.each_with_index do |path, i| - var_string = __extract_path_variables(path).map { |var| "_#{var}" }.join(' && ') - next if anchor_string.include? var_string - - anchor_string << var_string - result += if i.zero? - "if #{var_string}\n" - elsif (i == @paths.size - 1) || var_string.empty? - "else\n" - else - "elsif #{var_string}\n" - end - result += "\"#{__parse_path(path)}\"\n" - end - result += 'end' - result - end - - def __parse_path(path) - path.gsub(/^\//, '') - .gsub(/\/$/, '') - .gsub('{', "\#{Utils.__listify(_") - .gsub('}', ')}') - end - - def __path_variables - @paths.map do |path| - __extract_path_variables(path) - end - end - - # extract values that are in the {var} format: - def __extract_path_variables(path) - path.scan(/{(\w+)}/).flatten - end - - # Find parts that are definitely required and should raise an error if - # they're not present - # - def __required_parts - required = [] - return required if @endpoint_name == 'tasks.get' - - required << 'body' if (@spec['body'] && @spec['body']['required']) - # Get required variables from paths: - req_variables = __path_variables.inject(:&) # find intersection - required << req_variables unless req_variables.empty? - required.flatten - end - def docs_helper(name, info) info['type'] = 'String' if info['type'] == 'enum' # Rename 'enums' to 'strings' info['type'] = 'Integer' if info['type'] == 'int' # Rename 'int' to 'Integer' diff --git a/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb b/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb index 0bbf55691d..eca949c5bb 100644 --- a/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb +++ b/elasticsearch-api/utils/thor/generator/endpoint_specifics.rb @@ -75,12 +75,6 @@ def needs_complex_ignore_404?(endpoint) COMPLEX_IGNORE_404.include? endpoint end - def module_name_helper(name) - return name.upcase if %w[sql ssl].include? name - - name.split('_').map(&:capitalize).map{ |n| n == 'Xpack' ? 'XPack' : n }.join - end - def ping_perform_request <<~SRC begin diff --git a/elasticsearch-api/utils/thor/templates/method.erb b/elasticsearch-api/utils/thor/templates/method.erb index 3e929a03b3..14c04c57af 100644 --- a/elasticsearch-api/utils/thor/templates/method.erb +++ b/elasticsearch-api/utils/thor/templates/method.erb @@ -16,37 +16,39 @@ # under the License. # module Elasticsearch -<%= ' '*(@namespace_depth) %>module API -<%- @module_namespace.each_with_index do |name, i| -%> - <%= ' '*i %>module <%= module_name_helper(name) %> +<%= ' '*(@spec.namespace_depth) %>module API +<%- @spec.module_namespace.each_with_index do |name, i| -%> + <%= ' '*i %>module <%= @spec.module_name_helper(name) %> <%- end -%> -<%= ' '*(@namespace_depth+2) %>module Actions +<%= ' '*(@spec.namespace_depth+2) %>module Actions <%= ERB.new(File.new("./thor/templates/_documentation_top.erb").read, trim_mode: '-').result(binding) -%> <%# Method definition -%> -<%= ' '*(@namespace_depth+3) -%>def <%= @method_name %>(arguments = {}) -<%- if @endpoint_name == 'create' -%> - <%= ' '*(@namespace_depth+3) %>if arguments[:id] - <%= ' '*(@namespace_depth+3) %> index arguments.update op_type: 'create' - <%= ' '*(@namespace_depth+3) %>else - <%= ' '*(@namespace_depth+3) %> index arguments - <%= ' '*(@namespace_depth+3) %>end - <%= ' '*(@namespace_depth+2) %>end +<%= ' '*(@spec.namespace_depth+3) -%>def <%= @method_name %>(arguments = {}) +<%- if @spec.endpoint_name == 'create' -%> + <%= ' '*(@spec.namespace_depth+3) %>if arguments[:id] + <%= ' '*(@spec.namespace_depth+3) %> index arguments.update op_type: 'create' + <%= ' '*(@spec.namespace_depth+3) %>else + <%= ' '*(@spec.namespace_depth+3) %> index arguments + <%= ' '*(@spec.namespace_depth+3) %>end + <%= ' '*(@spec.namespace_depth+2) %>end <%- else -%> - <%- if @method_name == 'get_field_mapping' %> + <%- if @spec.method_name == 'get_field_mapping' %> arguments = arguments.clone _fields = arguments.delete(:field) || arguments.delete(:fields) raise ArgumentError, "Required argument 'field' missing" unless _fields <%- else -%> - <%- @required_parts.each do |required| %><%# Arguments -%> - <%= ' '*(@namespace_depth+3) + "raise ArgumentError, \"Required argument '#{required}' missing\" unless arguments[:#{required}]" + "\n" -%> + <%- @spec.required_parts.each do |required| %><%# Arguments -%> + <%= ' '*(@spec.namespace_depth+3) + "raise ArgumentError, \"Required argument '#{required}' missing\" unless arguments[:#{required}]" + "\n" -%> <%- end -%> arguments = arguments.clone <%- end -%> headers = arguments.delete(:headers) || {} - request_opts = <%= @perform_request_opts %> - <%- unless @path_params.empty? %> - defined_params =<%= @path_params %>.inject({}) do |set_variables, variable| - set_variables[variable] = arguments[variable] if arguments.key?(variable) + request_opts = <%= @spec.perform_request_opts %> + <%- unless @spec.path_params.empty? %> + defined_params =<%= @spec.path_params %>.inject({}) do |set_variables, variable| + var_sym = variable.to_sym + set_variables[var_sym] = arguments[var_sym] if arguments.key?(var_sym) + set_variables[var_sym] = arguments[variable] if arguments.key?(variable) set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -59,10 +61,10 @@ module Elasticsearch <%- # Perform request -%> <%= ERB.new(File.new("./thor/templates/_perform_request.erb").read, trim_mode: '-').result(binding) %> <%- end -%> -<%- if @method_name.match?(/^exists\S*/) -%> - alias_method :<%= @method_name %>?, :<%= @method_name %> +<%- if @spec.method_name.match?(/^exists\S*/) -%> + alias_method :<%= @spec.method_name %>?, :<%= @spec.method_name %> <%- end -%> -<%- if @method_name == 'termvectors' %> +<%- if @spec.method_name == 'termvectors' %> # Deprecated: Use the plural version, {#termvectors} #