diff --git a/src/Endpoints/AsyncSearch.php b/src/Endpoints/AsyncSearch.php index 12a1a90c6..0c801a004 100644 --- a/src/Endpoints/AsyncSearch.php +++ b/src/Endpoints/AsyncSearch.php @@ -29,9 +29,10 @@ class AsyncSearch extends AbstractEndpoint { /** - * Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. + * Delete an async search * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/async-search.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The async search ID @@ -67,9 +68,10 @@ public function delete(?array $params = null) /** - * Retrieves the results of a previously submitted async search request given its ID. + * Get async search results * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/async-search.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The async search ID @@ -108,9 +110,10 @@ public function get(?array $params = null) /** - * Retrieves the status of a previously submitted async search request given its ID. + * Get the async search status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/async-search.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The async search ID @@ -147,9 +150,10 @@ public function status(?array $params = null) /** - * Executes a search request asynchronously. + * Run an async search * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/async-search.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices @@ -170,7 +174,7 @@ public function status(?array $params = null) * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * ignore_throttled?: bool, // Whether specified concrete, expanded or aliased indices should be ignored when throttled * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * lenient?: bool, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored * preference?: string, // Specify the node or shard the operation should be performed on (default: random) * rest_total_hits_as_int?: bool, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response diff --git a/src/Endpoints/Autoscaling.php b/src/Endpoints/Autoscaling.php index 4843972f3..3719db0be 100644 --- a/src/Endpoints/Autoscaling.php +++ b/src/Endpoints/Autoscaling.php @@ -29,9 +29,9 @@ class Autoscaling extends AbstractEndpoint { /** - * Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * Delete an autoscaling policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/autoscaling-delete-autoscaling-policy.html * * @param array{ * name: string, // (REQUIRED) the name of the autoscaling policy @@ -69,9 +69,9 @@ public function deleteAutoscalingPolicy(?array $params = null) /** - * Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * Get the autoscaling capacity * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/autoscaling-get-autoscaling-capacity.html * * @param array{ * master_timeout?: int|string, // Timeout for processing on master node @@ -105,9 +105,9 @@ public function getAutoscalingCapacity(?array $params = null) /** - * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * Get an autoscaling policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/autoscaling-get-autoscaling-capacity.html * * @param array{ * name: string, // (REQUIRED) the name of the autoscaling policy @@ -144,9 +144,9 @@ public function getAutoscalingPolicy(?array $params = null) /** - * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * Create or update an autoscaling policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/autoscaling-put-autoscaling-policy.html * * @param array{ * name: string, // (REQUIRED) the name of the autoscaling policy diff --git a/src/Endpoints/Cat.php b/src/Endpoints/Cat.php index d2d7a4278..2ebe881af 100644 --- a/src/Endpoints/Cat.php +++ b/src/Endpoints/Cat.php @@ -29,9 +29,10 @@ class Cat extends AbstractEndpoint { /** - * Shows information about currently configured aliases to indices including filter and routing infos. + * Get aliases * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-alias.html + * @group serverless * * @param array{ * name?: string|array, // A comma-separated list of alias names to return @@ -41,7 +42,9 @@ class Cat extends AbstractEndpoint * help?: bool, // Return help information * s?: string|array, // Comma-separated list of column names or column aliases to sort by * v?: bool, // Verbose mode. Display column headers - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * bytes?: string, // The unit in which to display byte values + * time?: string, // The unit in which to display time values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -65,7 +68,7 @@ public function aliases(?array $params = null) $url = '/_cat/aliases'; $method = 'GET'; } - $url = $this->addQueryString($url, $params, ['format','local','h','help','s','v','expand_wildcards','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','local','h','help','s','v','expand_wildcards','bytes','time','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -76,14 +79,15 @@ public function aliases(?array $params = null) /** - * Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using. + * Get shard allocation information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-allocation.html * * @param array{ * node_id?: string|array, // A comma-separated list of node IDs or names to limit the returned information * format?: string, // a short version of the Accept header, e.g. json, yaml * bytes?: string, // The unit in which to display byte values + * time?: string, // The unit in which to display time values * local?: bool, // Return local information, do not retrieve the state from master node (default: false) * master_timeout?: int|string, // Explicit operation timeout for connection to master node * h?: string|array, // Comma-separated list of column names to display @@ -113,7 +117,7 @@ public function allocation(?array $params = null) $url = '/_cat/allocation'; $method = 'GET'; } - $url = $this->addQueryString($url, $params, ['format','bytes','local','master_timeout','h','help','s','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','bytes','time','local','master_timeout','h','help','s','v','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -124,9 +128,10 @@ public function allocation(?array $params = null) /** - * Returns information about existing component_templates templates. + * Get component templates * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-component-templates.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-component-templates.html + * @group serverless * * @param array{ * name?: string, // A pattern that returned component template names must match @@ -137,6 +142,8 @@ public function allocation(?array $params = null) * help?: bool, // Return help information * s?: string|array, // Comma-separated list of column names or column aliases to sort by * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values + * time?: string, // The unit in which to display time values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -160,7 +167,7 @@ public function componentTemplates(?array $params = null) $url = '/_cat/component_templates'; $method = 'GET'; } - $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','s','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','s','v','bytes','time','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -171,9 +178,10 @@ public function componentTemplates(?array $params = null) /** - * Provides quick access to the document count of the entire cluster, or individual indices. + * Get a document count * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-count.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names to limit the returned information @@ -182,6 +190,8 @@ public function componentTemplates(?array $params = null) * help?: bool, // Return help information * s?: string|array, // Comma-separated list of column names or column aliases to sort by * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values + * time?: string, // The unit in which to display time values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -205,7 +215,7 @@ public function count(?array $params = null) $url = '/_cat/count'; $method = 'GET'; } - $url = $this->addQueryString($url, $params, ['format','h','help','s','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','h','help','s','v','bytes','time','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -216,9 +226,9 @@ public function count(?array $params = null) /** - * Shows how much heap memory is currently being used by fielddata on every data node in the cluster. + * Get field data cache information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-fielddata.html * * @param array{ * fields?: string|array, // A comma-separated list of fields to return the fielddata size @@ -228,6 +238,7 @@ public function count(?array $params = null) * help?: bool, // Return help information * s?: string|array, // Comma-separated list of column names or column aliases to sort by * v?: bool, // Verbose mode. Display column headers + * time?: string, // The unit in which to display time values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -251,7 +262,7 @@ public function fielddata(?array $params = null) $url = '/_cat/fielddata'; $method = 'GET'; } - $url = $this->addQueryString($url, $params, ['format','bytes','h','help','s','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','bytes','h','help','s','v','time','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -262,9 +273,9 @@ public function fielddata(?array $params = null) /** - * Returns a concise representation of the cluster health. + * Get the cluster health status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-health.html * * @param array{ * format?: string, // a short version of the Accept header, e.g. json, yaml @@ -274,6 +285,7 @@ public function fielddata(?array $params = null) * time?: string, // The unit in which to display time values * ts?: bool, // Set to false to disable timestamping * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -293,7 +305,7 @@ public function health(?array $params = null) $url = '/_cat/health'; $method = 'GET'; - $url = $this->addQueryString($url, $params, ['format','h','help','s','time','ts','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','h','help','s','time','ts','v','bytes','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -304,9 +316,10 @@ public function health(?array $params = null) /** - * Returns help for the Cat APIs. + * Get CAT help * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -339,9 +352,10 @@ public function help(?array $params = null) /** - * Returns information about indices: number of primaries and replicas, document counts, disk size, ... + * Get index information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-indices.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names to limit the returned information @@ -356,7 +370,7 @@ public function help(?array $params = null) * time?: string, // The unit in which to display time values * v?: bool, // Verbose mode. Display column headers * include_unloaded_segments?: bool, // If set to true segment stats will include stats for segments that are not currently loaded into memory - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -391,9 +405,9 @@ public function indices(?array $params = null) /** - * Returns information about the master node. + * Get master node information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-master.html * * @param array{ * format?: string, // a short version of the Accept header, e.g. json, yaml @@ -403,6 +417,8 @@ public function indices(?array $params = null) * help?: bool, // Return help information * s?: string|array, // Comma-separated list of column names or column aliases to sort by * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values + * time?: string, // The unit in which to display time values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -422,7 +438,7 @@ public function master(?array $params = null) $url = '/_cat/master'; $method = 'GET'; - $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','s','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','s','v','bytes','time','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -433,9 +449,10 @@ public function master(?array $params = null) /** - * Gets configuration and usage information about data frame analytics jobs. + * Get data frame analytics jobs * - * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-dfanalytics.html + * @group serverless * * @param array{ * id?: string, // The ID of the data frame analytics to fetch @@ -481,9 +498,10 @@ public function mlDataFrameAnalytics(?array $params = null) /** - * Gets configuration and usage information about datafeeds. + * Get datafeeds * - * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-datafeeds.html + * @group serverless * * @param array{ * datafeed_id?: string, // The ID of the datafeeds stats to fetch @@ -494,6 +512,7 @@ public function mlDataFrameAnalytics(?array $params = null) * s?: string|array, // Comma-separated list of column names or column aliases to sort by * time?: string, // The unit in which to display time values * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -517,7 +536,7 @@ public function mlDatafeeds(?array $params = null) $url = '/_cat/ml/datafeeds'; $method = 'GET'; } - $url = $this->addQueryString($url, $params, ['allow_no_match','format','h','help','s','time','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['allow_no_match','format','h','help','s','time','v','bytes','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -528,9 +547,10 @@ public function mlDatafeeds(?array $params = null) /** - * Gets configuration and usage information about anomaly detection jobs. + * Get anomaly detection jobs * - * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-anomaly-detectors.html + * @group serverless * * @param array{ * job_id?: string, // The ID of the jobs stats to fetch @@ -576,9 +596,10 @@ public function mlJobs(?array $params = null) /** - * Gets configuration and usage information about inference trained models. + * Get trained models * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-trained-model.html + * @group serverless * * @param array{ * model_id?: string, // The ID of the trained models stats to fetch @@ -626,9 +647,9 @@ public function mlTrainedModels(?array $params = null) /** - * Returns information about custom node attributes. + * Get node attribute information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-nodeattrs.html * * @param array{ * format?: string, // a short version of the Accept header, e.g. json, yaml @@ -638,6 +659,8 @@ public function mlTrainedModels(?array $params = null) * help?: bool, // Return help information * s?: string|array, // Comma-separated list of column names or column aliases to sort by * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values + * time?: string, // The unit in which to display time values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -657,7 +680,7 @@ public function nodeattrs(?array $params = null) $url = '/_cat/nodeattrs'; $method = 'GET'; - $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','s','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','s','v','bytes','time','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -668,9 +691,9 @@ public function nodeattrs(?array $params = null) /** - * Returns basic statistics about performance of cluster nodes. + * Get node information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-nodes.html * * @param array{ * bytes?: string, // The unit in which to display byte values @@ -713,9 +736,9 @@ public function nodes(?array $params = null) /** - * Returns a concise representation of the cluster pending tasks. + * Get pending task information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-pending-tasks.html * * @param array{ * format?: string, // a short version of the Accept header, e.g. json, yaml @@ -726,6 +749,7 @@ public function nodes(?array $params = null) * s?: string|array, // Comma-separated list of column names or column aliases to sort by * time?: string, // The unit in which to display time values * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -745,7 +769,7 @@ public function pendingTasks(?array $params = null) $url = '/_cat/pending_tasks'; $method = 'GET'; - $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','s','time','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','s','time','v','bytes','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -756,9 +780,9 @@ public function pendingTasks(?array $params = null) /** - * Returns information about installed plugins across nodes node. + * Get plugin information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-plugins.html * * @param array{ * format?: string, // a short version of the Accept header, e.g. json, yaml @@ -769,6 +793,8 @@ public function pendingTasks(?array $params = null) * include_bootstrap?: bool, // Include bootstrap plugins in the response * s?: string|array, // Comma-separated list of column names or column aliases to sort by * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values + * time?: string, // The unit in which to display time values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -788,7 +814,7 @@ public function plugins(?array $params = null) $url = '/_cat/plugins'; $method = 'GET'; - $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','include_bootstrap','s','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','include_bootstrap','s','v','bytes','time','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -799,9 +825,9 @@ public function plugins(?array $params = null) /** - * Returns information about index shard recoveries, both on-going completed. + * Get shard recovery information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-recovery.html * * @param array{ * index?: string|array, // Comma-separated list or wildcard expression of index names to limit the returned information @@ -848,9 +874,9 @@ public function recovery(?array $params = null) /** - * Returns information about snapshot repositories registered in the cluster. + * Get snapshot repository information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-repositories.html * * @param array{ * format?: string, // a short version of the Accept header, e.g. json, yaml @@ -860,6 +886,8 @@ public function recovery(?array $params = null) * help?: bool, // Return help information * s?: string|array, // Comma-separated list of column names or column aliases to sort by * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values + * time?: string, // The unit in which to display time values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -879,7 +907,7 @@ public function repositories(?array $params = null) $url = '/_cat/repositories'; $method = 'GET'; - $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','s','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','s','v','bytes','time','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -890,9 +918,9 @@ public function repositories(?array $params = null) /** - * Provides low-level information about the segments in the shards of an index. + * Get segment information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-segments.html * * @param array{ * index?: string|array, // A comma-separated list of index names to limit the returned information @@ -904,6 +932,12 @@ public function repositories(?array $params = null) * help?: bool, // Return help information * s?: string|array, // Comma-separated list of column names or column aliases to sort by * v?: bool, // Verbose mode. Display column headers + * time?: string, // The unit in which to display time values + * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed). Only allowed when providing an index expression. + * ignore_throttled?: bool, // Whether specified concrete, expanded or aliased indices should be ignored when throttled. Only allowed when providing an index expression. + * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). Only allowed when providing an index expression. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * allow_closed?: bool, // If true, allow closed indices to be returned in the response otherwise if false, keep the legacy behaviour of throwing an exception if index pattern matches closed indices * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -927,7 +961,7 @@ public function segments(?array $params = null) $url = '/_cat/segments'; $method = 'GET'; } - $url = $this->addQueryString($url, $params, ['format','local','master_timeout','bytes','h','help','s','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','local','master_timeout','bytes','h','help','s','v','time','ignore_unavailable','ignore_throttled','allow_no_indices','expand_wildcards','allow_closed','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -938,9 +972,9 @@ public function segments(?array $params = null) /** - * Provides a detailed view of shard allocation on nodes. + * Get shard information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-shards.html * * @param array{ * index?: string|array, // A comma-separated list of index names to limit the returned information @@ -986,9 +1020,9 @@ public function shards(?array $params = null) /** - * Returns all snapshots in a specific repository. + * Get snapshot information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-snapshots.html * * @param array{ * repository?: string|array, // Name of repository from which to fetch the snapshot information @@ -1000,6 +1034,7 @@ public function shards(?array $params = null) * s?: string|array, // Comma-separated list of column names or column aliases to sort by * time?: string, // The unit in which to display time values * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -1023,7 +1058,7 @@ public function snapshots(?array $params = null) $url = '/_cat/snapshots'; $method = 'GET'; } - $url = $this->addQueryString($url, $params, ['format','ignore_unavailable','master_timeout','h','help','s','time','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','ignore_unavailable','master_timeout','h','help','s','time','v','bytes','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -1034,9 +1069,9 @@ public function snapshots(?array $params = null) /** - * Returns information about the tasks currently executing on one or more nodes in the cluster. + * Get task information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-tasks.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -1052,6 +1087,7 @@ public function snapshots(?array $params = null) * v?: bool, // Verbose mode. Display column headers * timeout?: int|string, // Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. * wait_for_completion?: bool, // If `true`, the request blocks until the task has completed. + * bytes?: string, // The unit in which to display byte values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -1071,7 +1107,7 @@ public function tasks(?array $params = null) $url = '/_cat/tasks'; $method = 'GET'; - $url = $this->addQueryString($url, $params, ['format','nodes','actions','detailed','parent_task_id','h','help','s','time','v','timeout','wait_for_completion','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','nodes','actions','detailed','parent_task_id','h','help','s','time','v','timeout','wait_for_completion','bytes','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -1082,9 +1118,9 @@ public function tasks(?array $params = null) /** - * Returns information about existing templates. + * Get index template information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-templates.html * * @param array{ * name?: string, // A pattern that returned template names must match @@ -1095,6 +1131,8 @@ public function tasks(?array $params = null) * help?: bool, // Return help information * s?: string|array, // Comma-separated list of column names or column aliases to sort by * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values + * time?: string, // The unit in which to display time values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -1118,7 +1156,7 @@ public function templates(?array $params = null) $url = '/_cat/templates'; $method = 'GET'; } - $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','s','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','local','master_timeout','h','help','s','v','bytes','time','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -1129,10 +1167,9 @@ public function templates(?array $params = null) /** - * Returns cluster-wide thread pool statistics per node. - * By default the active, queue and rejected statistics are returned for all thread pools. + * Get thread pool statistics * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-thread-pool.html * * @param array{ * thread_pool_patterns?: string|array, // A comma-separated list of regular-expressions to filter the thread pools in the output @@ -1144,6 +1181,7 @@ public function templates(?array $params = null) * help?: bool, // Return help information * s?: string|array, // Comma-separated list of column names or column aliases to sort by * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -1167,7 +1205,7 @@ public function threadPool(?array $params = null) $url = '/_cat/thread_pool'; $method = 'GET'; } - $url = $this->addQueryString($url, $params, ['format','time','local','master_timeout','h','help','s','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['format','time','local','master_timeout','h','help','s','v','bytes','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; @@ -1178,9 +1216,10 @@ public function threadPool(?array $params = null) /** - * Gets configuration and usage information about transforms. + * Get transform information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cat-transforms.html + * @group serverless * * @param array{ * transform_id?: string, // The id of the transform for which to get stats. '_all' or '*' implies all transforms @@ -1193,6 +1232,7 @@ public function threadPool(?array $params = null) * s?: string|array, // Comma-separated list of column names or column aliases to sort by * time?: string, // The unit in which to display time values * v?: bool, // Verbose mode. Display column headers + * bytes?: string, // The unit in which to display byte values * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -1216,7 +1256,7 @@ public function transforms(?array $params = null) $url = '/_cat/transforms'; $method = 'GET'; } - $url = $this->addQueryString($url, $params, ['from','size','allow_no_match','format','h','help','s','time','v','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['from','size','allow_no_match','format','h','help','s','time','v','bytes','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/plain,application/json', ]; diff --git a/src/Endpoints/Ccr.php b/src/Endpoints/Ccr.php index 58cb593ac..c82e27e72 100644 --- a/src/Endpoints/Ccr.php +++ b/src/Endpoints/Ccr.php @@ -29,9 +29,9 @@ class Ccr extends AbstractEndpoint { /** - * Deletes auto-follow patterns. + * Delete auto-follow patterns * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-delete-auto-follow-pattern.html * * @param array{ * name: string, // (REQUIRED) The name of the auto follow pattern. @@ -68,9 +68,9 @@ public function deleteAutoFollowPattern(?array $params = null) /** - * Creates a new follower index configured to follow the referenced leader index. + * Create a follower * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-put-follow.html * * @param array{ * index: string, // (REQUIRED) The name of the follower index @@ -110,9 +110,9 @@ public function follow(?array $params = null) /** - * Retrieves information about all follower indices, including parameters and status for each follower index + * Get follower information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-get-follow-info.html * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index patterns; use `_all` to perform the operation on all indices @@ -149,9 +149,9 @@ public function followInfo(?array $params = null) /** - * Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices. + * Get follower stats * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-get-follow-stats.html * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index patterns; use `_all` to perform the operation on all indices @@ -188,9 +188,9 @@ public function followStats(?array $params = null) /** - * Removes the follower retention leases from the leader. + * Forget a follower * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-post-forget-follower.html * * @param array{ * index: string, // (REQUIRED) the name of the leader index for which specified follower retention leases should be removed @@ -229,9 +229,9 @@ public function forgetFollower(?array $params = null) /** - * Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection. + * Get auto-follow patterns * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-get-auto-follow-pattern.html * * @param array{ * name?: string, // The name of the auto follow pattern. @@ -270,9 +270,9 @@ public function getAutoFollowPattern(?array $params = null) /** - * Pauses an auto-follow pattern + * Pause an auto-follow pattern * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-pause-auto-follow-pattern.html * * @param array{ * name: string, // (REQUIRED) The name of the auto follow pattern that should pause discovering new indices to follow. @@ -309,9 +309,9 @@ public function pauseAutoFollowPattern(?array $params = null) /** - * Pauses a follower index. The follower index will not fetch any additional operations from the leader index. + * Pause a follower * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-post-pause-follow.html * * @param array{ * index: string, // (REQUIRED) The name of the follower index that should pause following its leader index. @@ -348,9 +348,9 @@ public function pauseFollow(?array $params = null) /** - * Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices. + * Create or update auto-follow patterns * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-put-auto-follow-pattern.html * * @param array{ * name: string, // (REQUIRED) The name of the auto follow pattern. @@ -389,9 +389,9 @@ public function putAutoFollowPattern(?array $params = null) /** - * Resumes an auto-follow pattern that has been paused + * Resume an auto-follow pattern * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-resume-auto-follow-pattern.html * * @param array{ * name: string, // (REQUIRED) The name of the auto follow pattern to resume discovering new indices to follow. @@ -428,9 +428,9 @@ public function resumeAutoFollowPattern(?array $params = null) /** - * Resumes a follower index that has been paused + * Resume a follower * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-post-resume-follow.html * * @param array{ * index: string, // (REQUIRED) The name of the follow index to resume following. @@ -469,9 +469,9 @@ public function resumeFollow(?array $params = null) /** - * Gets all stats related to cross-cluster replication. + * Get cross-cluster replication stats * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-get-stats.html * * @param array{ * timeout?: int|string, // Explicit operation timeout @@ -506,9 +506,9 @@ public function stats(?array $params = null) /** - * Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. + * Unfollow an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-post-unfollow.html * * @param array{ * index: string, // (REQUIRED) The name of the follower index that should be turned into a regular index. diff --git a/src/Endpoints/Cluster.php b/src/Endpoints/Cluster.php index f8f1eca00..971337ec8 100644 --- a/src/Endpoints/Cluster.php +++ b/src/Endpoints/Cluster.php @@ -29,9 +29,9 @@ class Cluster extends AbstractEndpoint { /** - * Provides explanations for shard allocations in the cluster. + * Explain the shard allocations * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-allocation-explain.html * * @param array{ * master_timeout?: int|string, // Timeout for connection to master node @@ -69,9 +69,10 @@ public function allocationExplain(?array $params = null) /** - * Deletes a component template + * Delete component templates * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-component-template.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the template @@ -109,9 +110,9 @@ public function deleteComponentTemplate(?array $params = null) /** - * Clears cluster voting config exclusions. + * Clear cluster voting config exclusions * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-cluster-post-voting-config-exclusions * * @param array{ * wait_for_removal?: bool, // Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. @@ -146,9 +147,10 @@ public function deleteVotingConfigExclusions(?array $params = null) /** - * Returns information about whether a particular component template exist + * Check component templates * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-component-template.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the template @@ -186,12 +188,13 @@ public function existsComponentTemplate(?array $params = null) /** - * Returns one or more component templates + * Get component templates * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-component-template.html + * @group serverless * * @param array{ - * name?: string|array, // The comma separated names of the component templates + * name?: string, // The name of the component template. Wildcard (`*`) expressions are supported. * master_timeout?: int|string, // Explicit operation timeout for connection to master node * local?: bool, // Return local information, do not retrieve the state from master node (default: false) * include_defaults?: bool, // Return all default configurations for the component template (default: false) @@ -214,7 +217,7 @@ public function getComponentTemplate(?array $params = null) { $params = $params ?? []; if (isset($params['name'])) { - $url = '/_component_template/' . $this->encode($this->convertValue($params['name'])); + $url = '/_component_template/' . $this->encode($params['name']); $method = 'GET'; } else { $url = '/_component_template'; @@ -231,9 +234,9 @@ public function getComponentTemplate(?array $params = null) /** - * Returns cluster settings. + * Get cluster-wide settings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-get-settings.html * * @param array{ * flat_settings?: bool, // Return settings in flat format (default: false) @@ -270,13 +273,13 @@ public function getSettings(?array $params = null) /** - * Returns basic information about the health of the cluster. + * Get the cluster health status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-health.html * * @param array{ * index?: string|array, // Limit the information returned to a specific index - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * level?: string, // Specify the level of detail for returned information * local?: bool, // Return local information, do not retrieve the state from master node (default: false) * master_timeout?: int|string, // Explicit operation timeout for connection to master node @@ -321,9 +324,10 @@ public function health(?array $params = null) /** - * Returns different information about the cluster. + * Get cluster info * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-info.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-info.html + * @group serverless * * @param array{ * target: string|array, // (REQUIRED) Limit the information returned to the specified target. @@ -359,10 +363,9 @@ public function info(?array $params = null) /** - * Returns a list of any cluster-level changes (e.g. create index, update mapping, - * allocate or fail shard) which have not yet been executed. + * Get the pending cluster tasks * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-pending.html * * @param array{ * local?: bool, // Return local information, do not retrieve the state from master node (default: false) @@ -397,9 +400,9 @@ public function pendingTasks(?array $params = null) /** - * Updates the cluster voting config exclusions by node ids or node names. + * Update voting configuration exclusions * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-cluster-post-voting-config-exclusions * * @param array{ * node_ids?: string, // A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_names. @@ -436,9 +439,10 @@ public function postVotingConfigExclusions(?array $params = null) /** - * Creates or updates a component template + * Create or update a component template * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-component-template.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the template @@ -479,9 +483,9 @@ public function putComponentTemplate(?array $params = null) /** - * Updates the cluster settings. + * Update the cluster settings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-update-settings.html * * @param array{ * flat_settings?: bool, // Return settings in flat format (default: false) @@ -520,9 +524,9 @@ public function putSettings(?array $params = null) /** - * Returns the information about configured remote clusters. + * Get remote cluster information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-remote-info.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -555,9 +559,9 @@ public function remoteInfo(?array $params = null) /** - * Allows to manually change the allocation of individual shards in the cluster. + * Reroute the cluster * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-reroute.html * * @param array{ * dry_run?: bool, // Simulate the operation only and return the resulting state @@ -598,9 +602,9 @@ public function reroute(?array $params = null) /** - * Returns a comprehensive information about the state of the cluster. + * Get the cluster state * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-state.html * * @param array{ * metric?: string|array, // Limit the information returned to the specified metrics @@ -612,7 +616,7 @@ public function reroute(?array $params = null) * wait_for_timeout?: int|string, // The maximum time to wait for wait_for_metadata_version before timing out * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -650,9 +654,9 @@ public function state(?array $params = null) /** - * Returns high-level overview of cluster statistics. + * Get cluster statistics * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-stats.html * * @param array{ * node_id?: string|array, // 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 diff --git a/src/Endpoints/Connector.php b/src/Endpoints/Connector.php index 9f02f3eb1..0a199d06d 100644 --- a/src/Endpoints/Connector.php +++ b/src/Endpoints/Connector.php @@ -29,9 +29,10 @@ class Connector extends AbstractEndpoint { /** - * Updates the last_seen timestamp in the connector document. + * Check in a connector * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/check-in-connector-api.html + * @group serverless * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -68,10 +69,10 @@ public function checkIn(?array $params = null) /** - * Deletes a connector. + * Delete a connector * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-connector-api.html + * @group serverless * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be deleted. @@ -108,10 +109,10 @@ public function delete(?array $params = null) /** - * Returns the details about a connector. + * Get a connector * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-connector-api.html + * @group serverless * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be returned. @@ -147,51 +148,10 @@ public function get(?array $params = null) /** - * Updates the stats of last sync in the connector document. - * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-last-sync-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release - * - * @param array{ - * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. - * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) - * human?: bool, // Return human readable values for statistics. (DEFAULT: true) - * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) - * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. - * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body: string|array, // (REQUIRED) Object with stats related to the last connector sync run.. If body is a string must be a valid JSON. - * } $params - * - * @throws MissingParameterException if a required parameter is missing - * @throws NoNodeAvailableException if all the hosts are offline - * @throws ClientResponseException if the status code of response is 4xx - * @throws ServerResponseException if the status code of response is 5xx - * - * @return Elasticsearch|Promise - */ - public function lastSync(?array $params = null) - { - $params = $params ?? []; - $this->checkRequiredParameters(['connector_id','body'], $params); - $url = '/_connector/' . $this->encode($params['connector_id']) . '/_last_sync'; - $method = 'PUT'; - - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); - $headers = [ - 'Accept' => 'application/json', - 'Content-Type' => 'application/json', - ]; - $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); - $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.last_sync'); - return $this->client->sendRequest($request); - } - - - /** - * Lists all connectors. + * Get all connectors * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/list-connector-api.html + * @group serverless * * @param array{ * from?: int, // Starting offset (default: 0) @@ -230,10 +190,10 @@ public function list(?array $params = null) /** - * Creates a connector. + * Create a connector * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-connector-api.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -268,10 +228,10 @@ public function post(?array $params = null) /** - * Creates or updates a connector. + * Create or update a connector * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-connector-api.html + * @group serverless * * @param array{ * connector_id?: string, // The unique identifier of the connector to be created or updated. @@ -311,10 +271,10 @@ public function put(?array $params = null) /** - * Cancels a connector sync job. + * Cancel a connector sync job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cancel-connector-sync-job-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cancel-connector-sync-job-api.html + * @group serverless * * @param array{ * connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be canceled @@ -350,9 +310,9 @@ public function syncJobCancel(?array $params = null) /** - * Checks in a connector sync job (refreshes 'last_seen'). + * Check in a connector sync job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-sync-job-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/check-in-connector-sync-job-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -389,9 +349,9 @@ public function syncJobCheckIn(?array $params = null) /** - * Claims a connector sync job. + * Claim a connector sync job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/claim-connector-sync-job-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/claim-connector-sync-job-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -430,10 +390,10 @@ public function syncJobClaim(?array $params = null) /** - * Deletes a connector sync job. + * Delete a connector sync job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-sync-job-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-connector-sync-job-api.html + * @group serverless * * @param array{ * connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be deleted. @@ -469,9 +429,9 @@ public function syncJobDelete(?array $params = null) /** - * Sets an error for a connector sync job. + * Set a connector sync job error * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-error-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/set-connector-sync-job-error-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -510,10 +470,10 @@ public function syncJobError(?array $params = null) /** - * Returns the details about a connector sync job. + * Get a connector sync job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-sync-job-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-connector-sync-job-api.html + * @group serverless * * @param array{ * connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be returned. @@ -549,15 +509,15 @@ public function syncJobGet(?array $params = null) /** - * Lists all connector sync jobs. + * Get all connector sync jobs * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-sync-jobs-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/list-connector-sync-jobs-api.html + * @group serverless * * @param array{ * from?: int, // Starting offset (default: 0) * size?: int, // specifies a max number of results to get (default: 100) - * status?: string, // Sync job status, which sync jobs are fetched for + * status?: string, // A sync job status to fetch connector sync jobs for * connector_id?: string, // Id of the connector to fetch the sync jobs for * job_type?: string|array, // A comma-separated list of job types * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -590,10 +550,10 @@ public function syncJobList(?array $params = null) /** - * Creates a connector sync job. + * Create a connector sync job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-sync-job-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-connector-sync-job-api.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -629,9 +589,9 @@ public function syncJobPost(?array $params = null) /** - * Updates the stats fields in the connector sync job document. + * Set the connector sync job stats * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-stats-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/set-connector-sync-job-stats-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -670,9 +630,10 @@ public function syncJobUpdateStats(?array $params = null) /** - * Activates the draft filtering rules if they are in a validated state. + * Activate the connector draft filter * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-filtering-api.html + * @group serverless * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -710,10 +671,10 @@ public function updateActiveFiltering(?array $params = null) /** - * Updates the API key id and/or API key secret id fields in the connector document. + * Update the connector API key ID * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-api-key-id-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-api-key-id-api.html + * @group serverless * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. @@ -751,10 +712,10 @@ public function updateApiKeyId(?array $params = null) /** - * Updates the connector configuration. + * Update the connector configuration * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-configuration-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-configuration-api.html + * @group serverless * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. @@ -792,9 +753,10 @@ public function updateConfiguration(?array $params = null) /** - * Updates the error field in the connector document. + * Update the connector error field * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-error-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-error-api.html + * @group serverless * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -833,9 +795,9 @@ public function updateError(?array $params = null) /** - * Updates the connector features in the connector document. + * Update the connector features * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-features-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-features-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -874,10 +836,10 @@ public function updateFeatures(?array $params = null) /** - * Updates the filtering field in the connector document. + * Update the connector filtering * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-filtering-api.html + * @group serverless * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. @@ -915,9 +877,10 @@ public function updateFiltering(?array $params = null) /** - * Updates the validation info of the draft filtering rules. + * Update the connector draft filtering validation * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-filtering-validation-api.html + * @group serverless * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -956,10 +919,10 @@ public function updateFilteringValidation(?array $params = null) /** - * Updates the index name of the connector. + * Update the connector index name * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-index-name-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-index-name-api.html + * @group serverless * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. @@ -997,10 +960,10 @@ public function updateIndexName(?array $params = null) /** - * Updates the name and/or description fields in the connector document. + * Update the connector name and description * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-name-description-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-name-description-api.html + * @group serverless * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. @@ -1038,10 +1001,10 @@ public function updateName(?array $params = null) /** - * Updates the is_native flag of the connector. + * Update the connector is_native flag * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/connector-apis.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-native-api.html + * @group serverless * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. @@ -1079,10 +1042,10 @@ public function updateNative(?array $params = null) /** - * Updates the pipeline field in the connector document. + * Update the connector pipeline * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-pipeline-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-pipeline-api.html + * @group serverless * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. @@ -1120,10 +1083,10 @@ public function updatePipeline(?array $params = null) /** - * Updates the scheduling field in the connector document. + * Update the connector scheduling * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-scheduling-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-scheduling-api.html + * @group serverless * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. @@ -1161,10 +1124,10 @@ public function updateScheduling(?array $params = null) /** - * Updates the service type of the connector. + * Update the connector service type * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-service-type-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-service-type-api.html + * @group serverless * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. @@ -1202,9 +1165,10 @@ public function updateServiceType(?array $params = null) /** - * Updates the status of the connector. + * Update the connector status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-status-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-connector-status-api.html + * @group serverless * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ diff --git a/src/Endpoints/DanglingIndices.php b/src/Endpoints/DanglingIndices.php index bcb03ee14..46e88e0b4 100644 --- a/src/Endpoints/DanglingIndices.php +++ b/src/Endpoints/DanglingIndices.php @@ -29,9 +29,9 @@ class DanglingIndices extends AbstractEndpoint { /** - * Deletes the specified dangling index + * Delete a dangling index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/dangling-index-delete.html * * @param array{ * index_uuid: string, // (REQUIRED) The UUID of the dangling index @@ -70,9 +70,9 @@ public function deleteDanglingIndex(?array $params = null) /** - * Imports the specified dangling index + * Import a dangling index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/dangling-index-import.html * * @param array{ * index_uuid: string, // (REQUIRED) The UUID of the dangling index @@ -111,9 +111,9 @@ public function importDanglingIndex(?array $params = null) /** - * Returns all dangling indices. + * Get the dangling indices * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/dangling-indices-list.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) diff --git a/src/Endpoints/Enrich.php b/src/Endpoints/Enrich.php index d0624ef91..9384cbf0e 100644 --- a/src/Endpoints/Enrich.php +++ b/src/Endpoints/Enrich.php @@ -29,9 +29,10 @@ class Enrich extends AbstractEndpoint { /** - * Deletes an existing enrich policy and its enrich index. + * Delete an enrich policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-enrich-policy-api.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the enrich policy @@ -68,9 +69,10 @@ public function deletePolicy(?array $params = null) /** - * Creates the enrich index for an existing enrich policy. + * Run an enrich policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/execute-enrich-policy-api.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the enrich policy @@ -108,9 +110,10 @@ public function executePolicy(?array $params = null) /** - * Gets information about an enrich policy. + * Get an enrich policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-enrich-policy-api.html + * @group serverless * * @param array{ * name?: string|array, // A comma-separated list of enrich policy names @@ -149,9 +152,10 @@ public function getPolicy(?array $params = null) /** - * Creates a new enrich policy. + * Create an enrich policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-enrich-policy-api.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the enrich policy @@ -190,9 +194,10 @@ public function putPolicy(?array $params = null) /** - * Gets enrich coordinator statistics and information about enrich policies that are currently executing. + * Get enrich stats * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/enrich-stats-api.html + * @group serverless * * @param array{ * master_timeout?: int|string, // Timeout for processing on master node diff --git a/src/Endpoints/Eql.php b/src/Endpoints/Eql.php index f96a8da05..98aeea624 100644 --- a/src/Endpoints/Eql.php +++ b/src/Endpoints/Eql.php @@ -29,9 +29,10 @@ class Eql extends AbstractEndpoint { /** - * Deletes an async EQL search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. + * Delete an async EQL search * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-eql-delete + * @group serverless * * @param array{ * id: string, // (REQUIRED) The async search ID @@ -67,9 +68,10 @@ public function delete(?array $params = null) /** - * Returns async results from previously executed Event Query Language (EQL) search + * Get async EQL search results * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-async-eql-search-api.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The async search ID @@ -107,9 +109,10 @@ public function get(?array $params = null) /** - * Returns the status of a previously submitted async or stored Event Query Language (EQL) search + * Get the async EQL status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-async-eql-status-api.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The async search ID @@ -145,9 +148,10 @@ public function getStatus(?array $params = null) /** - * Returns results matching a query expressed in Event Query Language (EQL) + * Get EQL search results * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/eql-search-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/eql-search-api.html + * @group serverless * * @param array{ * index: string, // (REQUIRED) The name of the index to scope the operation @@ -159,7 +163,7 @@ public function getStatus(?array $params = null) * ccs_minimize_roundtrips?: bool, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) diff --git a/src/Endpoints/Esql.php b/src/Endpoints/Esql.php index 183ecbe0b..3cc0d14e8 100644 --- a/src/Endpoints/Esql.php +++ b/src/Endpoints/Esql.php @@ -29,12 +29,12 @@ class Esql extends AbstractEndpoint { /** - * Executes an ESQL request asynchronously + * Run an async ES|QL query * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-async-query-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-async-query-api.html * * @param array{ - * format?: string, // a short version of the Accept header, e.g. json, yaml + * format?: string, // A short version of the Accept header, e.g. json, yaml.`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.For async requests, nothing will be returned if the async query doesn't finish within the timeout.The query ID and running status are available in the `X-Elasticsearch-Async-Id` and `X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively. * delimiter?: string, // The character to use between values within a CSV row. Only valid for the csv format. * drop_null_columns?: bool, // Should entirely null columns be removed from the results? Their name and type will be returning in a new `all_columns` section. * allow_partial_results?: bool, // If `true`, partial results will be returned if there are shard failures, butthe query can continue to execute on other clusters and shards.If `false`, the entire query will fail if there areany failures. @@ -71,9 +71,9 @@ public function asyncQuery(?array $params = null) /** - * Delete an async query request given its ID. + * Delete an async ES|QL query * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-async-query-delete-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-async-query-delete-api.html * * @param array{ * id: string, // (REQUIRED) The async query ID @@ -109,13 +109,13 @@ public function asyncQueryDelete(?array $params = null) /** - * Retrieves the results of a previously submitted async query request given its ID. + * Get async ES|QL query results * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-async-query-get-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-async-query-get-api.html * * @param array{ * id: string, // (REQUIRED) The async query ID - * format?: string, // a short version of the Accept header, e.g. json, yaml + * format?: string, // A short version of the Accept header, for example `json` or `yaml`. * wait_for_completion_timeout?: int|string, // Specify the time that the request should block waiting for the final response * keep_alive?: int|string, // Specify the time interval in which the results (partial or final) for this search will be available * drop_null_columns?: bool, // Should entirely null columns be removed from the results? Their name and type will be returning in a new `all_columns` section. @@ -151,12 +151,13 @@ public function asyncQueryGet(?array $params = null) /** - * Stops a previously submitted async query request given its ID and collects the results. + * Stop async ES|QL query * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-async-query-stop-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-async-query-stop-api.html * * @param array{ * id: string, // (REQUIRED) The async query ID + * drop_null_columns?: bool, // Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -178,7 +179,7 @@ public function asyncQueryStop(?array $params = null) $url = '/_query/async/' . $this->encode($params['id']) . '/stop'; $method = 'POST'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['drop_null_columns','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; @@ -189,12 +190,13 @@ public function asyncQueryStop(?array $params = null) /** - * Executes an ESQL request + * Run an ES|QL query * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-rest.html + * @group serverless * * @param array{ - * format?: string, // a short version of the Accept header, e.g. json, yaml + * format?: string, // A short version of the Accept header, e.g. json, yaml.`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response. * delimiter?: string, // The character to use between values within a CSV row. Only valid for the csv format. * drop_null_columns?: bool, // Should entirely null columns be removed from the results? Their name and type will be returning in a new `all_columns` section. * allow_partial_results?: bool, // If `true`, partial results will be returned if there are shard failures, butthe query can continue to execute on other clusters and shards.If `false`, the entire query will fail if there areany failures. diff --git a/src/Endpoints/Features.php b/src/Endpoints/Features.php index 3ebe9bfc7..7fcaf8dc5 100644 --- a/src/Endpoints/Features.php +++ b/src/Endpoints/Features.php @@ -29,9 +29,9 @@ class Features extends AbstractEndpoint { /** - * Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot + * Get the features * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-features-api.html * * @param array{ * master_timeout?: int|string, // Explicit operation timeout for connection to master node @@ -65,9 +65,9 @@ public function getFeatures(?array $params = null) /** - * Resets the internal state of features, usually by deleting system indices + * Reset the features * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/reset-features-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ diff --git a/src/Endpoints/Fleet.php b/src/Endpoints/Fleet.php index de0a4a85a..72cf9180a 100644 --- a/src/Endpoints/Fleet.php +++ b/src/Endpoints/Fleet.php @@ -29,9 +29,9 @@ class Fleet extends AbstractEndpoint { /** - * Returns the current global checkpoints for an index. This API is design for internal use by the fleet server project. + * Get global checkpoints * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-global-checkpoints.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-global-checkpoints.html * * @param array{ * index: string, // (REQUIRED) The name of the index. @@ -72,7 +72,7 @@ public function globalCheckpoints(?array $params = null) /** - * Multi Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. + * Executes several fleet searches with a single API request * * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * @@ -115,7 +115,7 @@ public function msearch(?array $params = null) /** - * Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. + * The purpose of the fleet search api is to provide a search api where the search will only be executed * * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * @@ -129,7 +129,7 @@ public function msearch(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The search definition using the Query DSL. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The search definition using the Query DSL. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -142,7 +142,7 @@ public function msearch(?array $params = null) public function search(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['index'], $params); + $this->checkRequiredParameters(['index','body'], $params); $url = '/' . $this->encode($params['index']) . '/_fleet/_fleet_search'; $method = empty($params['body']) ? 'GET' : 'POST'; diff --git a/src/Endpoints/Graph.php b/src/Endpoints/Graph.php index f05eb5925..703665b8d 100644 --- a/src/Endpoints/Graph.php +++ b/src/Endpoints/Graph.php @@ -29,20 +29,21 @@ class Graph extends AbstractEndpoint { /** - * Explore extracted and summarized information about the documents and terms in an index. + * Explore graph analytics * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/graph-explore-api.html + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * timeout?: int|string, // Explicit operation timeout * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // Graph Query DSL. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) Graph Query DSL. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -55,7 +56,7 @@ class Graph extends AbstractEndpoint public function explore(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['index'], $params); + $this->checkRequiredParameters(['index','body'], $params); $url = '/' . $this->encode($this->convertValue($params['index'])) . '/_graph/explore'; $method = empty($params['body']) ? 'GET' : 'POST'; diff --git a/src/Endpoints/Ilm.php b/src/Endpoints/Ilm.php index b0a7830c8..dea2b569e 100644 --- a/src/Endpoints/Ilm.php +++ b/src/Endpoints/Ilm.php @@ -29,9 +29,9 @@ class Ilm extends AbstractEndpoint { /** - * Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted. + * Delete a lifecycle policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-delete-lifecycle.html * * @param array{ * policy: string, // (REQUIRED) The name of the index lifecycle policy @@ -69,9 +69,9 @@ public function deleteLifecycle(?array $params = null) /** - * Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step. + * Explain the lifecycle state * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-explain-lifecycle.html * * @param array{ * index: string, // (REQUIRED) The name of the index to explain @@ -110,9 +110,9 @@ public function explainLifecycle(?array $params = null) /** - * Returns the specified policy definition. Includes the policy version and last modified date. + * Get lifecycle policies * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-get-lifecycle.html * * @param array{ * policy?: string, // The name of the index lifecycle policy @@ -152,9 +152,9 @@ public function getLifecycle(?array $params = null) /** - * Retrieves the current index lifecycle management (ILM) status. + * Get the ILM status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-get-status.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -187,9 +187,9 @@ public function getStatus(?array $params = null) /** - * Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing + * Migrate to data tiers routing * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-migrate-to-data-tiers.html * * @param array{ * dry_run?: bool, // If set to true it will simulate the migration, providing a way to retrieve the ILM policies and indices that need to be migrated. The default is false @@ -225,9 +225,9 @@ public function migrateToDataTiers(?array $params = null) /** - * Manually moves an index into the specified step and executes that step. + * Move to a lifecycle step * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-move-to-step.html * * @param array{ * index: string, // (REQUIRED) The name of the index whose lifecycle step is to change @@ -236,7 +236,7 @@ public function migrateToDataTiers(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The new lifecycle step to move to. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The new lifecycle step to move to. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -249,7 +249,7 @@ public function migrateToDataTiers(?array $params = null) public function moveToStep(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['index'], $params); + $this->checkRequiredParameters(['index','body'], $params); $url = '/_ilm/move/' . $this->encode($params['index']); $method = 'POST'; @@ -265,9 +265,9 @@ public function moveToStep(?array $params = null) /** - * Creates a lifecycle policy + * Create or update a lifecycle policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-put-lifecycle.html * * @param array{ * policy: string, // (REQUIRED) The name of the index lifecycle policy @@ -278,7 +278,7 @@ public function moveToStep(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The lifecycle policy definition to register. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The lifecycle policy definition to register. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -291,7 +291,7 @@ public function moveToStep(?array $params = null) public function putLifecycle(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['policy'], $params); + $this->checkRequiredParameters(['policy','body'], $params); $url = '/_ilm/policy/' . $this->encode($params['policy']); $method = 'PUT'; @@ -307,9 +307,9 @@ public function putLifecycle(?array $params = null) /** - * Removes the assigned lifecycle policy and stops managing the specified index + * Remove policies from an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-remove-policy.html * * @param array{ * index: string, // (REQUIRED) The name of the index to remove policy on @@ -345,9 +345,9 @@ public function removePolicy(?array $params = null) /** - * Retries executing the policy for an index that is in the ERROR step. + * Retry a policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-retry-policy.html * * @param array{ * index: string, // (REQUIRED) The name of the indices (comma-separated) whose failed lifecycle step is to be retry @@ -383,9 +383,9 @@ public function retry(?array $params = null) /** - * Start the index lifecycle management (ILM) plugin. + * Start the ILM plugin * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-start.html * * @param array{ * master_timeout?: int|string, // Explicit operation timeout for connection to master node @@ -420,9 +420,9 @@ public function start(?array $params = null) /** - * Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin + * Stop the ILM plugin * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-stop.html * * @param array{ * master_timeout?: int|string, // Explicit operation timeout for connection to master node diff --git a/src/Endpoints/Indices.php b/src/Endpoints/Indices.php index aa3db5fca..b1bc55e01 100644 --- a/src/Endpoints/Indices.php +++ b/src/Endpoints/Indices.php @@ -29,9 +29,10 @@ class Indices extends AbstractEndpoint { /** - * Adds a block to an index. + * Add an index block * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/index-modules-blocks.html#add-index-block + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) A comma separated list of indices to add a block to @@ -40,7 +41,7 @@ class Indices extends AbstractEndpoint * master_timeout?: int|string, // Specify timeout for connection to master * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -73,9 +74,10 @@ public function addBlock(?array $params = null) /** - * Performs the analysis process on a text and return the tokens breakdown of the text. + * Get tokens from text analysis * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-analyze + * @group serverless * * @param array{ * index?: string, // The name of the index to scope the operation @@ -84,7 +86,7 @@ public function addBlock(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // Define analyzer/tokenizer parameters and the text on which the analysis should be performed. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) Define analyzer/tokenizer parameters and the text on which the analysis should be performed. If body is a string must be a valid JSON. * } $params * * @throws NoNodeAvailableException if all the hosts are offline @@ -96,6 +98,7 @@ public function addBlock(?array $params = null) public function analyze(?array $params = null) { $params = $params ?? []; + $this->checkRequiredParameters(['body'], $params); if (isset($params['index'])) { $url = '/' . $this->encode($params['index']) . '/_analyze'; $method = empty($params['body']) ? 'GET' : 'POST'; @@ -115,9 +118,48 @@ public function analyze(?array $params = null) /** - * Clears all or specific caches for one or more indices. + * Cancel a migration reindex operation + * + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/migrate-data-stream.html + * + * @param array{ + * index: string, // (REQUIRED) The index or data stream name + * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) + * human?: bool, // Return human readable values for statistics. (DEFAULT: true) + * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) + * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. + * } $params + * + * @throws MissingParameterException if a required parameter is missing + * @throws NoNodeAvailableException if all the hosts are offline + * @throws ClientResponseException if the status code of response is 4xx + * @throws ServerResponseException if the status code of response is 5xx + * + * @return Elasticsearch|Promise + */ + public function cancelMigrateReindex(?array $params = null) + { + $params = $params ?? []; + $this->checkRequiredParameters(['index'], $params); + $url = '/_migration/reindex/' . $this->encode($params['index']) . '/_cancel'; + $method = 'POST'; + + $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $headers = [ + 'Accept' => 'application/json', + 'Content-Type' => 'application/json', + ]; + $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); + $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.cancel_migrate_reindex'); + return $this->client->sendRequest($request); + } + + + /** + * Clear the cache * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-clearcache.html * * @param array{ * index?: string|array, // A comma-separated list of index name to limit the operation @@ -126,7 +168,7 @@ public function analyze(?array $params = null) * query?: bool, // Clear query caches * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * request?: bool, // Clear request cache * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -162,9 +204,9 @@ public function clearCache(?array $params = null) /** - * Clones an index + * Clone an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-clone-index.html * * @param array{ * index: string, // (REQUIRED) The name of the source index to clone @@ -206,9 +248,9 @@ public function clone(?array $params = null) /** - * Closes an index. + * Close an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-close.html * * @param array{ * index: string|array, // (REQUIRED) A comma separated list of indices to close @@ -216,7 +258,7 @@ public function clone(?array $params = null) * master_timeout?: int|string, // Specify timeout for connection to master * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * wait_for_active_shards?: string, // Sets the number of active shards to wait for before the operation returns. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -250,9 +292,10 @@ public function close(?array $params = null) /** - * Creates an index with optional settings and mappings. + * Create an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-create-index.html + * @group serverless * * @param array{ * index: string, // (REQUIRED) The name of the index @@ -293,9 +336,10 @@ public function create(?array $params = null) /** - * Creates a data stream + * Create a data stream * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-create-data-stream.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the data stream @@ -333,12 +377,55 @@ public function createDataStream(?array $params = null) /** - * Provides statistics on operations happening in a data stream. + * Create an index from a source index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/migrate-data-stream.html + * + * @param array{ + * source: string, // (REQUIRED) The source index name + * dest: string, // (REQUIRED) The destination index name + * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) + * human?: bool, // Return human readable values for statistics. (DEFAULT: true) + * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) + * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. + * body?: string|array, // The body contains the fields `mappings_override`, `settings_override`, and `remove_index_blocks`.. If body is a string must be a valid JSON. + * } $params + * + * @throws MissingParameterException if a required parameter is missing + * @throws NoNodeAvailableException if all the hosts are offline + * @throws ClientResponseException if the status code of response is 4xx + * @throws ServerResponseException if the status code of response is 5xx + * + * @return Elasticsearch|Promise + */ + public function createFrom(?array $params = null) + { + $params = $params ?? []; + $this->checkRequiredParameters(['source','dest'], $params); + $url = '/_create_from/' . $this->encode($params['source']) . '/' . $this->encode($params['dest']); + $method = 'PUT'; + + $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $headers = [ + 'Accept' => 'application/json', + 'Content-Type' => 'application/json', + ]; + $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); + $request = $this->addOtelAttributes($params, ['source', 'dest'], $request, 'indices.create_from'); + return $this->client->sendRequest($request); + } + + + /** + * Get data stream stats + * + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-stream-stats-api.html + * @group serverless * * @param array{ * name?: string|array, // A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams + * expand_wildcards?: string|array, // Whether to expand wildcard expressions to concrete data stream names that are open, closed or both. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -362,7 +449,7 @@ public function dataStreamsStats(?array $params = null) $url = '/_data_stream/_stats'; $method = 'GET'; } - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['expand_wildcards','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; @@ -373,9 +460,10 @@ public function dataStreamsStats(?array $params = null) /** - * Deletes an index. + * Delete indices * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-delete-index.html + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices @@ -383,7 +471,7 @@ public function dataStreamsStats(?array $params = null) * master_timeout?: int|string, // Specify timeout for connection to master * ignore_unavailable?: bool, // Ignore unavailable indexes (default: false) * allow_no_indices?: bool, // Ignore if a wildcard expression resolves to no concrete indices (default: false) - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open, closed, or hidden indices + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open, closed, or hidden indices * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -416,9 +504,10 @@ public function delete(?array $params = null) /** - * Deletes an alias. + * Delete an alias * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-delete-alias.html + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index names (supports wildcards); use `_all` for all indices @@ -457,13 +546,14 @@ public function deleteAlias(?array $params = null) /** - * Deletes the data stream lifecycle of the selected data streams. + * Delete data stream lifecycles * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-delete-lifecycle.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-delete-lifecycle.html + * @group serverless * * @param array{ * name: string|array, // (REQUIRED) A comma-separated list of data streams of which the data stream lifecycle will be deleted; use `*` to get all data streams - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open or closed indices (default: open) + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open or closed indices (default: open) * timeout?: int|string, // Explicit timestamp for the document * master_timeout?: int|string, // Specify timeout for connection to master * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -498,13 +588,14 @@ public function deleteDataLifecycle(?array $params = null) /** - * Deletes a data stream. + * Delete data streams * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-delete-data-stream.html + * @group serverless * * @param array{ * name: string|array, // (REQUIRED) A comma-separated list of data streams to delete; use `*` to delete all data streams - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open or closed indices (default: open) + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open or closed indices (default: open) * master_timeout?: int|string, // Specify timeout for connection to master * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -538,13 +629,13 @@ public function deleteDataStream(?array $params = null) /** - * Deletes the data stream options of the selected data streams. + * Deletes the data stream options of the selected data streams * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html * * @param array{ * name: string|array, // (REQUIRED) A comma-separated list of data streams of which the data stream options will be deleted; use `*` to get all data streams - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open or closed indices (default: open) + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open or closed indices (default: open) * timeout?: int|string, // Explicit timestamp for the document * master_timeout?: int|string, // Specify timeout for connection to master * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -579,9 +670,10 @@ public function deleteDataStreamOptions(?array $params = null) /** - * Deletes an index template. + * Delete an index template * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-delete-template.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the template @@ -619,9 +711,9 @@ public function deleteIndexTemplate(?array $params = null) /** - * Deletes an index template. + * Delete a legacy index template * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template-v1.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-delete-template-v1.html * * @param array{ * name: string, // (REQUIRED) The name of the template @@ -659,9 +751,9 @@ public function deleteTemplate(?array $params = null) /** - * Analyzes the disk usage of each field of an index or data stream + * Analyze the index disk usage * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-disk-usage.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -670,7 +762,7 @@ public function deleteTemplate(?array $params = null) * flush?: bool, // Whether flush or not before analyzing the index disk usage. Defaults to true * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -705,7 +797,7 @@ public function diskUsage(?array $params = null) /** * Downsample an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-downsample-data-stream.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -745,16 +837,17 @@ public function downsample(?array $params = null) /** - * Returns information about whether a particular index exists. + * Check indices * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-exists.html + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index names * local?: bool, // Return local information, do not retrieve the state from master node (default: false) * ignore_unavailable?: bool, // Ignore unavailable indexes (default: false) * allow_no_indices?: bool, // Ignore if a wildcard expression resolves to no concrete indices (default: false) - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open or closed indices (default: open) + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open or closed indices (default: open) * flat_settings?: bool, // Return settings in flat format (default: false) * include_defaults?: bool, // Whether to return all default setting for each of the indices. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -789,16 +882,17 @@ public function exists(?array $params = null) /** - * Returns information about whether a particular alias exists. + * Check aliases * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-exists-alias + * @group serverless * * @param array{ * name: string|array, // (REQUIRED) A comma-separated list of alias names to return * index?: string|array, // A comma-separated list of index names to filter aliases * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * local?: bool, // Return local information, do not retrieve the state from master node (default: false) * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -836,9 +930,10 @@ public function existsAlias(?array $params = null) /** - * Returns information about whether a particular index template exists. + * Check index templates * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/index-templates.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-exists-index-template + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the template @@ -877,9 +972,9 @@ public function existsIndexTemplate(?array $params = null) /** - * Returns information about whether a particular index template exists. + * Check existence of index templates * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-template-exists-v1.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-template-exists-v1.html * * @param array{ * name: string|array, // (REQUIRED) The comma separated names of the index templates @@ -918,9 +1013,10 @@ public function existsTemplate(?array $params = null) /** - * Retrieves information about the index's current data stream lifecycle, such as any potential encountered error, time since creation etc. + * Get the status for a data stream lifecycle * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-explain-lifecycle.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-explain-lifecycle.html + * @group serverless * * @param array{ * index: string, // (REQUIRED) The name of the index to explain @@ -958,9 +1054,9 @@ public function explainDataLifecycle(?array $params = null) /** - * Returns the field usage stats for each field of an index + * Get field usage stats * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/field-usage-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/field-usage-stats.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -968,7 +1064,7 @@ public function explainDataLifecycle(?array $params = null) * fields?: string|array, // A comma-separated list of fields to include in the stats if only a subset of fields should be returned (supports wildcards) * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -1001,9 +1097,9 @@ public function fieldUsageStats(?array $params = null) /** - * Performs the flush operation on one or more indices. + * Flush data streams or indices * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-flush.html * * @param array{ * index?: string|array, // A comma-separated list of index names; use `_all` or empty string for all indices @@ -1011,7 +1107,7 @@ public function fieldUsageStats(?array $params = null) * wait_if_ongoing?: bool, // If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -1046,16 +1142,16 @@ public function flush(?array $params = null) /** - * Performs the force merge operation on one or more indices. + * Force a merge * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-forcemerge.html * * @param array{ * index?: string|array, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * flush?: bool, // Specify whether the index should be flushed after performing the operation (default: true) * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * max_num_segments?: int, // The number of segments the index should be merged into (default: dynamic) * only_expunge_deletes?: bool, // Specify whether the operation should only expunge deleted documents * wait_for_completion?: bool, // Should the request wait until the force merge is completed. @@ -1093,17 +1189,18 @@ public function forcemerge(?array $params = null) /** - * Returns information about one or more indices. + * Get index information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-get-index.html + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index names * local?: bool, // Return local information, do not retrieve the state from master node (default: false) * ignore_unavailable?: bool, // Ignore unavailable indexes (default: false) * allow_no_indices?: bool, // Ignore if a wildcard expression resolves to no concrete indices (default: false) - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open or closed indices (default: open) - * features?: string, // Return only information on specified index features + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open or closed indices (default: open) + * features?: string|array, // Return only information on specified index features * flat_settings?: bool, // Return settings in flat format (default: false) * include_defaults?: bool, // Whether to return all default setting for each of the indices. * master_timeout?: int|string, // Specify timeout for connection to master @@ -1139,16 +1236,17 @@ public function get(?array $params = null) /** - * Returns an alias. + * Get aliases * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-get-alias.html + * @group serverless * * @param array{ * name?: string|array, // A comma-separated list of alias names to return * index?: string|array, // A comma-separated list of index names to filter aliases * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * local?: bool, // Return local information, do not retrieve the state from master node (default: false) * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -1190,13 +1288,14 @@ public function getAlias(?array $params = null) /** - * Returns the data stream lifecycle of the selected data streams. + * Get data stream lifecycles * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-get-lifecycle.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-get-lifecycle.html + * @group serverless * * @param array{ * name: string|array, // (REQUIRED) A comma-separated list of data streams to get; use `*` to get all data streams - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open or closed indices (default: open) + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open or closed indices (default: open) * include_defaults?: bool, // Return all relevant default configurations for the data stream (default: false) * master_timeout?: int|string, // Specify timeout for connection to master * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1231,9 +1330,9 @@ public function getDataLifecycle(?array $params = null) /** - * Get data stream lifecycle statistics. + * Get data stream lifecycle stats * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-get-lifecycle-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-get-lifecycle-stats.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1266,13 +1365,14 @@ public function getDataLifecycleStats(?array $params = null) /** - * Returns data streams. + * Get data streams * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-get-data-stream.html + * @group serverless * * @param array{ * name?: string|array, // A comma-separated list of data streams to get; use `*` to get all data streams - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open or closed indices (default: open) + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open or closed indices (default: open) * include_defaults?: bool, // Return all relevant default configurations for the data stream (default: false) * master_timeout?: int|string, // Specify timeout for connection to master * verbose?: bool, // Whether the maximum timestamp for each data stream should be calculated and returned (default: false) @@ -1310,13 +1410,14 @@ public function getDataStream(?array $params = null) /** - * Returns the data stream options of the selected data streams. + * Returns the data stream options of the selected data streams * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + * @group serverless * * @param array{ * name: string|array, // (REQUIRED) A comma-separated list of data streams to get; use `*` to get all data streams - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open or closed indices (default: open) + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open or closed indices (default: open) * master_timeout?: int|string, // Specify timeout for connection to master * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -1352,7 +1453,8 @@ public function getDataStreamOptions(?array $params = null) /** * Gets a data stream's settings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) Comma-separated list of data streams or data stream patterns @@ -1389,9 +1491,9 @@ public function getDataStreamSettings(?array $params = null) /** - * Returns mapping for one or more fields. + * Get mapping definitions * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-get-field-mapping.html * * @param array{ * fields: string|array, // (REQUIRED) A comma-separated list of fields @@ -1399,7 +1501,7 @@ public function getDataStreamSettings(?array $params = null) * include_defaults?: bool, // Whether the default mapping values should be returned as well * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * local?: bool, // Return local information, do not retrieve the state from master node (default: false) * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -1437,9 +1539,10 @@ public function getFieldMapping(?array $params = null) /** - * Returns an index template. + * Get index templates * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-get-template.html + * @group serverless * * @param array{ * name?: string, // A pattern that returned template names must match @@ -1481,15 +1584,16 @@ public function getIndexTemplate(?array $params = null) /** - * Returns mappings for one or more indices. + * Get mapping definitions * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-get-mapping.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * master_timeout?: int|string, // Specify timeout for connection to master * local?: bool, // Return local information, do not retrieve the state from master node (default: false) * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1526,9 +1630,49 @@ public function getMapping(?array $params = null) /** - * Returns settings for one or more indices. + * Get the migration reindexing status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/migrate-data-stream.html + * + * @param array{ + * index: string, // (REQUIRED) The index or data stream name + * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) + * human?: bool, // Return human readable values for statistics. (DEFAULT: true) + * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) + * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. + * } $params + * + * @throws MissingParameterException if a required parameter is missing + * @throws NoNodeAvailableException if all the hosts are offline + * @throws ClientResponseException if the status code of response is 4xx + * @throws ServerResponseException if the status code of response is 5xx + * + * @return Elasticsearch|Promise + */ + public function getMigrateReindexStatus(?array $params = null) + { + $params = $params ?? []; + $this->checkRequiredParameters(['index'], $params); + $url = '/_migration/reindex/' . $this->encode($params['index']) . '/_status'; + $method = 'GET'; + + $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $headers = [ + 'Accept' => 'application/json', + 'Content-Type' => 'application/json', + ]; + $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); + $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.get_migrate_reindex_status'); + return $this->client->sendRequest($request); + } + + + /** + * Get index settings + * + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-get-settings.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -1536,7 +1680,7 @@ public function getMapping(?array $params = null) * master_timeout?: int|string, // Specify timeout for connection to master * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * flat_settings?: bool, // Return settings in flat format (default: false) * local?: bool, // Return local information, do not retrieve the state from master node (default: false) * include_defaults?: bool, // Whether to return all default setting for each of the indices. @@ -1580,9 +1724,9 @@ public function getSettings(?array $params = null) /** - * Returns an index template. + * Get legacy index templates * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template-v1.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-get-template-v1.html * * @param array{ * name?: string|array, // The comma separated names of the index templates @@ -1623,9 +1767,48 @@ public function getTemplate(?array $params = null) /** - * Migrates an alias to a data stream + * Reindex legacy backing indices + * + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/migrate-data-stream.html + * + * @param array{ + * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) + * human?: bool, // Return human readable values for statistics. (DEFAULT: true) + * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) + * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. + * body: string|array, // (REQUIRED) The body contains the fields `mode` and `source.index, where the only mode currently supported is `upgrade`, and the `source.index` must be a data stream name. If body is a string must be a valid JSON. + * } $params + * + * @throws NoNodeAvailableException if all the hosts are offline + * @throws ClientResponseException if the status code of response is 4xx + * @throws ServerResponseException if the status code of response is 5xx + * + * @return Elasticsearch|Promise + */ + public function migrateReindex(?array $params = null) + { + $params = $params ?? []; + $this->checkRequiredParameters(['body'], $params); + $url = '/_migration/reindex'; + $method = 'POST'; + + $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $headers = [ + 'Accept' => 'application/json', + 'Content-Type' => 'application/json', + ]; + $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); + $request = $this->addOtelAttributes($params, [], $request, 'indices.migrate_reindex'); + return $this->client->sendRequest($request); + } + + + /** + * Convert an index alias to a data stream * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-migrate-to-data-stream + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the alias to migrate @@ -1663,9 +1846,10 @@ public function migrateToDataStream(?array $params = null) /** - * Modifies a data stream + * Update data streams * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-modify-data-stream + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1701,9 +1885,9 @@ public function modifyDataStream(?array $params = null) /** - * Opens an index. + * Open a closed index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-open-close.html * * @param array{ * index: string|array, // (REQUIRED) A comma separated list of indices to open @@ -1711,7 +1895,7 @@ public function modifyDataStream(?array $params = null) * master_timeout?: int|string, // Specify timeout for connection to master * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * wait_for_active_shards?: string, // Sets the number of active shards to wait for before the operation returns. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -1745,9 +1929,9 @@ public function open(?array $params = null) /** - * Promotes a data stream from a replicated data stream managed by CCR to a regular data stream + * Promote a data stream * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-promote-data-stream * * @param array{ * name: string, // (REQUIRED) The name of the data stream @@ -1784,9 +1968,10 @@ public function promoteDataStream(?array $params = null) /** - * Creates or updates an alias. + * Create or update an alias * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-put-alias + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. @@ -1827,13 +2012,14 @@ public function putAlias(?array $params = null) /** - * Updates the data stream lifecycle of the selected data streams. + * Update data stream lifecycles * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-put-lifecycle.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-put-data-lifecycle + * @group serverless * * @param array{ * name: string|array, // (REQUIRED) A comma-separated list of data streams whose lifecycle will be updated; use `*` to set the lifecycle to all data streams - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open or closed indices (default: open) + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open or closed indices (default: open) * timeout?: int|string, // Explicit timestamp for the document * master_timeout?: int|string, // Specify timeout for connection to master * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1841,7 +2027,7 @@ public function putAlias(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The data stream lifecycle configuration that consist of the data retention. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The data stream lifecycle configuration that consist of the data retention. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -1854,7 +2040,7 @@ public function putAlias(?array $params = null) public function putDataLifecycle(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['name'], $params); + $this->checkRequiredParameters(['name','body'], $params); $url = '/_data_stream/' . $this->encode($this->convertValue($params['name'])) . '/_lifecycle'; $method = 'PUT'; @@ -1870,13 +2056,14 @@ public function putDataLifecycle(?array $params = null) /** - * Updates the data stream options of the selected data streams. + * Updates the data stream options of the selected data streams * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + * @group serverless * * @param array{ * name: string|array, // (REQUIRED) A comma-separated list of data streams whose options will be updated; use `*` to set the options to all data streams - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open or closed indices (default: open) + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open or closed indices (default: open) * timeout?: int|string, // Explicit timestamp for the document * master_timeout?: int|string, // Specify timeout for connection to master * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1884,7 +2071,7 @@ public function putDataLifecycle(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The data stream options configuration that consist of the failure store configuration. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The data stream options configuration that consist of the failure store configuration. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -1897,7 +2084,7 @@ public function putDataLifecycle(?array $params = null) public function putDataStreamOptions(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['name'], $params); + $this->checkRequiredParameters(['name','body'], $params); $url = '/_data_stream/' . $this->encode($this->convertValue($params['name'])) . '/_options'; $method = 'PUT'; @@ -1915,7 +2102,8 @@ public function putDataStreamOptions(?array $params = null) /** * Updates a data stream's settings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) Comma-separated list of data streams or data stream patterns @@ -1947,6 +2135,7 @@ public function putDataStreamSettings(?array $params = null) $url = $this->addQueryString($url, $params, ['dry_run','timeout','master_timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', + 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.put_data_stream_settings'); @@ -1955,9 +2144,10 @@ public function putDataStreamSettings(?array $params = null) /** - * Creates or updates an index template. + * Create or update an index template * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-put-index-template + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the template @@ -1998,9 +2188,10 @@ public function putIndexTemplate(?array $params = null) /** - * Updates the index mappings. + * Update field mappings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-put-mapping.html + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. @@ -2008,7 +2199,7 @@ public function putIndexTemplate(?array $params = null) * master_timeout?: int|string, // Specify timeout for connection to master * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * write_index_only?: bool, // When true, applies mappings only to the write index of an alias or data stream * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -2044,9 +2235,10 @@ public function putMapping(?array $params = null) /** - * Updates the index settings. + * Update index settings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-update-settings.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -2056,7 +2248,7 @@ public function putMapping(?array $params = null) * reopen?: bool, // Whether to close and reopen the index to apply non-dynamic settings. If set to `true` the indices to which the settings are being applied will be closed temporarily and then reopened in order to apply the changes. The default is `false` * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * flat_settings?: bool, // Return settings in flat format (default: false) * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -2095,9 +2287,10 @@ public function putSettings(?array $params = null) /** - * Creates or updates an index template. + * Create or update a legacy index template * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-templates-v1.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the template @@ -2139,9 +2332,9 @@ public function putTemplate(?array $params = null) /** - * Returns information about ongoing index shard recoveries. + * Get index recovery information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-recovery.html * * @param array{ * index?: string|array, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -2149,7 +2342,7 @@ public function putTemplate(?array $params = null) * active_only?: bool, // Display only those recoveries that are currently on-going * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -2184,15 +2377,16 @@ public function recovery(?array $params = null) /** - * Performs the refresh operation in one or more indices. + * Refresh an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-refresh.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -2227,15 +2421,15 @@ public function refresh(?array $params = null) /** - * Reloads an index's search analyzers and their resources. + * Reload search analyzers * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-reload-analyzers.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-reload-analyzers.html * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index names to reload analyzers for * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * resource?: string, // changed resource to reload analyzers from if applicable * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -2269,16 +2463,16 @@ public function reloadSearchAnalyzers(?array $params = null) /** - * Resolves the specified index expressions to return information about each cluster. If no index expression is provided, this endpoint will return information about all the remote clusters that are configured on the local cluster. + * Resolve the cluster * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-cluster-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-resolve-cluster-api.html * * @param array{ * name?: string|array, // A comma-separated list of cluster:index names or wildcard expressions * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed). Only allowed when providing an index expression. * ignore_throttled?: bool, // Whether specified concrete, expanded or aliased indices should be ignored when throttled. Only allowed when providing an index expression. * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). Only allowed when providing an index expression. - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open or closed indices (default: open). Only allowed when providing an index expression. + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open or closed indices (default: open). Only allowed when providing an index expression. * timeout?: int|string, // The maximum time to wait for remote clusters to respond * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -2314,13 +2508,14 @@ public function resolveCluster(?array $params = null) /** - * Returns information about any matching indices, aliases, and data streams + * Resolve indices * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-resolve-index-api.html + * @group serverless * * @param array{ * name: string|array, // (REQUIRED) A comma-separated list of names or wildcard expressions - * expand_wildcards?: string, // Whether wildcard expressions should get expanded to open or closed indices (default: open) + * expand_wildcards?: string|array, // Whether wildcard expressions should get expanded to open or closed indices (default: open) * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -2355,10 +2550,10 @@ public function resolveIndex(?array $params = null) /** - * Updates an alias to point to a new index when the existing index - * is considered to be too large or too old. + * Roll over to a new index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-rollover-index.html + * @group serverless * * @param array{ * alias: string, // (REQUIRED) The name of the alias to rollover @@ -2406,15 +2601,15 @@ public function rollover(?array $params = null) /** - * Provides low-level information about segments in a Lucene index. + * Get index segments * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-segments.html * * @param array{ * index?: string|array, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * verbose?: bool, // Includes detailed memory usage by Lucene. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -2450,16 +2645,16 @@ public function segments(?array $params = null) /** - * Provides store information for shard copies of indices. + * Get index shard stores * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-shards-stores.html * * @param array{ * index?: string|array, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * status?: string|array, // A comma-separated list of statuses used to filter on shards to get store information for * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -2494,9 +2689,9 @@ public function shardStores(?array $params = null) /** - * Allow to shrink an existing index into a new index with fewer primary shards. + * Shrink an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-shrink-index.html * * @param array{ * index: string, // (REQUIRED) The name of the source index to shrink @@ -2509,7 +2704,7 @@ public function shardStores(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The configuration for the target index (`settings` and `aliases`). If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The configuration for the target index (`settings` and `aliases`). If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -2522,7 +2717,7 @@ public function shardStores(?array $params = null) public function shrink(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['index','target'], $params); + $this->checkRequiredParameters(['index','target','body'], $params); $url = '/' . $this->encode($params['index']) . '/_shrink/' . $this->encode($params['target']); $method = 'PUT'; @@ -2538,9 +2733,10 @@ public function shrink(?array $params = null) /** - * Simulate matching the given index name against the index templates in the system + * Simulate an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-simulate-index.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the index (it must be a concrete index name) @@ -2582,9 +2778,10 @@ public function simulateIndexTemplate(?array $params = null) /** - * Simulate resolving the given template name or body + * Simulate an index template * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-simulate-template.html + * @group serverless * * @param array{ * name?: string, // The name of the index template @@ -2628,9 +2825,9 @@ public function simulateTemplate(?array $params = null) /** - * Allows you to split an existing index into a new index with more primary shards. + * Split an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-split-index.html * * @param array{ * index: string, // (REQUIRED) The name of the source index to split @@ -2643,7 +2840,7 @@ public function simulateTemplate(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The configuration for the target index (`settings` and `aliases`). If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The configuration for the target index (`settings` and `aliases`). If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -2656,7 +2853,7 @@ public function simulateTemplate(?array $params = null) public function split(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['index','target'], $params); + $this->checkRequiredParameters(['index','target','body'], $params); $url = '/' . $this->encode($params['index']) . '/_split/' . $this->encode($params['target']); $method = 'PUT'; @@ -2672,9 +2869,9 @@ public function split(?array $params = null) /** - * Provides statistics on operations happening in an index. + * Get index statistics * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-stats.html * * @param array{ * metric?: string|array, // Limit the information returned the specific metrics. @@ -2686,7 +2883,7 @@ public function split(?array $params = null) * level?: string, // Return stats aggregated at cluster, index or shard level * include_segment_file_sizes?: bool, // Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) * include_unloaded_segments?: bool, // If set to true segment stats will include stats for segments that are not currently loaded into memory - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * forbid_closed_indices?: bool, // If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -2728,17 +2925,17 @@ public function stats(?array $params = null) /** - * Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again. + * Unfreeze an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/unfreeze-index-api.html * * @param array{ - * index: string, // (REQUIRED) The name of the index to unfreeze + * index: string|array, // (REQUIRED) A comma separated list of indices to remove a block from * timeout?: int|string, // Explicit operation timeout * master_timeout?: int|string, // Specify timeout for connection to master * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * wait_for_active_shards?: string, // Sets the number of active shards to wait for before the operation returns. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -2758,7 +2955,7 @@ public function unfreeze(?array $params = null) { $params = $params ?? []; $this->checkRequiredParameters(['index'], $params); - $url = '/' . $this->encode($params['index']) . '/_unfreeze'; + $url = '/' . $this->encode($this->convertValue($params['index'])) . '/_unfreeze'; $method = 'POST'; $url = $this->addQueryString($url, $params, ['timeout','master_timeout','ignore_unavailable','allow_no_indices','expand_wildcards','wait_for_active_shards','pretty','human','error_trace','source','filter_path']); @@ -2772,9 +2969,10 @@ public function unfreeze(?array $params = null) /** - * Updates index aliases. + * Create or update an alias * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-update-aliases + * @group serverless * * @param array{ * timeout?: int|string, // Request timeout @@ -2812,16 +3010,17 @@ public function updateAliases(?array $params = null) /** - * Allows a user to validate a potentially expensive query without executing it. + * Validate a query * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-validate.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices * explain?: bool, // Return detailed information about the error * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * q?: string, // Query in the Lucene query string syntax * analyzer?: string, // The analyzer to use for the query string * analyze_wildcard?: bool, // Specify whether wildcard and prefix queries should be analyzed (default: false) diff --git a/src/Endpoints/Inference.php b/src/Endpoints/Inference.php index 5c113489d..ad64f16b8 100644 --- a/src/Endpoints/Inference.php +++ b/src/Endpoints/Inference.php @@ -31,16 +31,18 @@ class Inference extends AbstractEndpoint /** * Perform chat completion inference * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/chat-completion-inference.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/chat-completion-inference-api.html + * @group serverless * * @param array{ * inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference request to complete. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference payload. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference payload. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -53,11 +55,11 @@ class Inference extends AbstractEndpoint public function chatCompletionUnified(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['inference_id'], $params); + $this->checkRequiredParameters(['inference_id','body'], $params); $url = '/_inference/chat_completion/' . $this->encode($params['inference_id']) . '/_stream'; $method = 'POST'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/event-stream', 'Content-Type' => 'application/json', @@ -69,18 +71,20 @@ public function chatCompletionUnified(?array $params = null) /** - * Perform completion inference + * Perform completion inference on the service * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/post-inference-api.html + * @group serverless * * @param array{ * inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference request to complete. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference payload. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference payload. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -93,11 +97,11 @@ public function chatCompletionUnified(?array $params = null) public function completion(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['inference_id'], $params); + $this->checkRequiredParameters(['inference_id','body'], $params); $url = '/_inference/completion/' . $this->encode($params['inference_id']); $method = 'POST'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -111,7 +115,8 @@ public function completion(?array $params = null) /** * Delete an inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-inference-api.html + * @group serverless * * @param array{ * inference_id: string, // (REQUIRED) The inference Id @@ -156,7 +161,8 @@ public function delete(?array $params = null) /** * Get an inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-inference-api.html + * @group serverless * * @param array{ * inference_id?: string, // The inference Id @@ -198,19 +204,21 @@ public function get(?array $params = null) /** - * Perform inference + * Perform inference on the service * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/post-inference-api.html + * @group serverless * * @param array{ * inference_id: string, // (REQUIRED) The inference Id * task_type?: string, // The task type + * timeout?: int|string, // The amount of time to wait for the inference request to complete. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference payload. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference payload. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -223,7 +231,7 @@ public function get(?array $params = null) public function inference(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['inference_id'], $params); + $this->checkRequiredParameters(['inference_id','body'], $params); if (isset($params['task_type'])) { $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['inference_id']); $method = 'POST'; @@ -231,7 +239,7 @@ public function inference(?array $params = null) $url = '/_inference/' . $this->encode($params['inference_id']); $method = 'POST'; } - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -243,19 +251,21 @@ public function inference(?array $params = null) /** - * Configure an inference endpoint for use in the Inference API + * Create an inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-inference-api.html + * @group serverless * * @param array{ * inference_id: string, // (REQUIRED) The inference Id * task_type?: string, // The task type + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -268,7 +278,7 @@ public function inference(?array $params = null) public function put(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['inference_id'], $params); + $this->checkRequiredParameters(['inference_id','body'], $params); if (isset($params['task_type'])) { $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['inference_id']); $method = 'PUT'; @@ -276,7 +286,7 @@ public function put(?array $params = null) $url = '/_inference/' . $this->encode($params['inference_id']); $method = 'PUT'; } - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -288,19 +298,21 @@ public function put(?array $params = null) /** - * Configure an AlibabaCloud AI Search inference endpoint + * Create an AlibabaCloud AI Search inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-alibabacloud-ai-search.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-alibabacloud-ai-search.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * alibabacloud_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -313,11 +325,11 @@ public function put(?array $params = null) public function putAlibabacloud(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','alibabacloud_inference_id'], $params); + $this->checkRequiredParameters(['task_type','alibabacloud_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['alibabacloud_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -329,19 +341,21 @@ public function putAlibabacloud(?array $params = null) /** - * Configure an Amazon Bedrock inference endpoint + * Create an Amazon Bedrock inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-amazon-bedrock.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-amazon-bedrock.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * amazonbedrock_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -354,11 +368,11 @@ public function putAlibabacloud(?array $params = null) public function putAmazonbedrock(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','amazonbedrock_inference_id'], $params); + $this->checkRequiredParameters(['task_type','amazonbedrock_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['amazonbedrock_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -370,19 +384,21 @@ public function putAmazonbedrock(?array $params = null) /** - * Configure a Amazon SageMaker inference endpoint + * Create an Amazon SageMaker inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-amazon-sagemaker.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonsagemaker + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * amazonsagemaker_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -395,11 +411,11 @@ public function putAmazonbedrock(?array $params = null) public function putAmazonsagemaker(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','amazonsagemaker_inference_id'], $params); + $this->checkRequiredParameters(['task_type','amazonsagemaker_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['amazonsagemaker_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -411,19 +427,21 @@ public function putAmazonsagemaker(?array $params = null) /** - * Configure an Anthropic inference endpoint + * Create an Anthropic inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-anthropic.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-anthropic.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * anthropic_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -436,11 +454,11 @@ public function putAmazonsagemaker(?array $params = null) public function putAnthropic(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','anthropic_inference_id'], $params); + $this->checkRequiredParameters(['task_type','anthropic_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['anthropic_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -452,19 +470,21 @@ public function putAnthropic(?array $params = null) /** - * Configure an Azure AI Studio inference endpoint + * Create an Azure AI studio inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-azure-ai-studio.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-azure-ai-studio.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * azureaistudio_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -477,11 +497,11 @@ public function putAnthropic(?array $params = null) public function putAzureaistudio(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','azureaistudio_inference_id'], $params); + $this->checkRequiredParameters(['task_type','azureaistudio_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['azureaistudio_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -493,19 +513,21 @@ public function putAzureaistudio(?array $params = null) /** - * Configure an Azure OpenAI inference endpoint + * Create an Azure OpenAI inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-azure-openai.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-azure-openai.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * azureopenai_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -518,11 +540,11 @@ public function putAzureaistudio(?array $params = null) public function putAzureopenai(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','azureopenai_inference_id'], $params); + $this->checkRequiredParameters(['task_type','azureopenai_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['azureopenai_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -534,19 +556,21 @@ public function putAzureopenai(?array $params = null) /** - * Configure a Cohere inference endpoint + * Create a Cohere inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-cohere.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-cohere.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * cohere_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -559,11 +583,11 @@ public function putAzureopenai(?array $params = null) public function putCohere(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','cohere_inference_id'], $params); + $this->checkRequiredParameters(['task_type','cohere_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['cohere_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -575,9 +599,10 @@ public function putCohere(?array $params = null) /** - * Configure a custom inference endpoint + * Create a custom inference endpoint * - * @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-custom + * @link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-custom + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type @@ -587,7 +612,7 @@ public function putCohere(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -600,7 +625,7 @@ public function putCohere(?array $params = null) public function putCustom(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','custom_inference_id'], $params); + $this->checkRequiredParameters(['task_type','custom_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['custom_inference_id']); $method = 'PUT'; @@ -616,19 +641,21 @@ public function putCustom(?array $params = null) /** - * Configure a DeepSeek inference endpoint + * Create a DeepSeek inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-deepseek.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-deepseek.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * deepseek_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -641,11 +668,11 @@ public function putCustom(?array $params = null) public function putDeepseek(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','deepseek_inference_id'], $params); + $this->checkRequiredParameters(['task_type','deepseek_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['deepseek_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -657,19 +684,21 @@ public function putDeepseek(?array $params = null) /** - * Configure an Elasticsearch inference endpoint + * Create an Elasticsearch inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elasticsearch.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-elasticsearch.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * elasticsearch_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -682,11 +711,11 @@ public function putDeepseek(?array $params = null) public function putElasticsearch(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','elasticsearch_inference_id'], $params); + $this->checkRequiredParameters(['task_type','elasticsearch_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['elasticsearch_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -698,19 +727,21 @@ public function putElasticsearch(?array $params = null) /** - * Configure an ELSER inference endpoint + * Create an ELSER inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elser.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-elser.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * elser_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -723,11 +754,11 @@ public function putElasticsearch(?array $params = null) public function putElser(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','elser_inference_id'], $params); + $this->checkRequiredParameters(['task_type','elser_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['elser_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -739,19 +770,21 @@ public function putElser(?array $params = null) /** - * Configure a Google AI Studio inference endpoint + * Create an Google AI Studio inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-google-ai-studio.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-google-ai-studio.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * googleaistudio_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -764,11 +797,11 @@ public function putElser(?array $params = null) public function putGoogleaistudio(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','googleaistudio_inference_id'], $params); + $this->checkRequiredParameters(['task_type','googleaistudio_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['googleaistudio_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -780,19 +813,21 @@ public function putGoogleaistudio(?array $params = null) /** - * Configure a Google Vertex AI inference endpoint + * Create a Google Vertex AI inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-google-vertex-ai.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-google-vertex-ai.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * googlevertexai_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -805,11 +840,11 @@ public function putGoogleaistudio(?array $params = null) public function putGooglevertexai(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','googlevertexai_inference_id'], $params); + $this->checkRequiredParameters(['task_type','googlevertexai_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['googlevertexai_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -821,19 +856,21 @@ public function putGooglevertexai(?array $params = null) /** - * Configure a HuggingFace inference endpoint + * Create a Hugging Face inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-hugging-face.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-hugging-face.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * huggingface_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -846,11 +883,11 @@ public function putGooglevertexai(?array $params = null) public function putHuggingFace(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','huggingface_inference_id'], $params); + $this->checkRequiredParameters(['task_type','huggingface_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['huggingface_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -862,19 +899,21 @@ public function putHuggingFace(?array $params = null) /** - * Configure a JinaAI inference endpoint + * Create an JinaAI inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-jinaai.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-jinaai.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * jinaai_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -887,11 +926,11 @@ public function putHuggingFace(?array $params = null) public function putJinaai(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','jinaai_inference_id'], $params); + $this->checkRequiredParameters(['task_type','jinaai_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['jinaai_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -903,19 +942,21 @@ public function putJinaai(?array $params = null) /** - * Configure a Mistral inference endpoint + * Create a Mistral inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-mistral.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-mistral.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * mistral_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -928,11 +969,11 @@ public function putJinaai(?array $params = null) public function putMistral(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','mistral_inference_id'], $params); + $this->checkRequiredParameters(['task_type','mistral_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['mistral_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -944,19 +985,21 @@ public function putMistral(?array $params = null) /** - * Configure an OpenAI inference endpoint + * Create an OpenAI inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-openai.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-openai.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * openai_inference_id: string, // (REQUIRED) The inference ID + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -969,11 +1012,11 @@ public function putMistral(?array $params = null) public function putOpenai(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','openai_inference_id'], $params); + $this->checkRequiredParameters(['task_type','openai_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['openai_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -985,19 +1028,21 @@ public function putOpenai(?array $params = null) /** - * Configure a VoyageAI inference endpoint + * Create a VoyageAI inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/inference-apis.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-voyageai.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * voyageai_inference_id: string, // (REQUIRED) The inference ID + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -1010,11 +1055,11 @@ public function putOpenai(?array $params = null) public function putVoyageai(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','voyageai_inference_id'], $params); + $this->checkRequiredParameters(['task_type','voyageai_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['voyageai_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -1026,19 +1071,21 @@ public function putVoyageai(?array $params = null) /** - * Configure a Watsonx inference endpoint + * Create a Watsonx inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-watsonx-ai.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-service-watsonx-ai.html + * @group serverless * * @param array{ * task_type: string, // (REQUIRED) The task type * watsonx_inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -1051,11 +1098,11 @@ public function putVoyageai(?array $params = null) public function putWatsonx(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['task_type','watsonx_inference_id'], $params); + $this->checkRequiredParameters(['task_type','watsonx_inference_id','body'], $params); $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['watsonx_inference_id']); $method = 'PUT'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -1067,18 +1114,20 @@ public function putWatsonx(?array $params = null) /** - * Perform reranking inference + * Perform reranking inference on the service * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/post-inference-api.html + * @group serverless * * @param array{ * inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // The amount of time to wait for the inference request to complete. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference payload. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference payload. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -1091,11 +1140,11 @@ public function putWatsonx(?array $params = null) public function rerank(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['inference_id'], $params); + $this->checkRequiredParameters(['inference_id','body'], $params); $url = '/_inference/rerank/' . $this->encode($params['inference_id']); $method = 'POST'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -1107,18 +1156,20 @@ public function rerank(?array $params = null) /** - * Perform sparse embedding inference + * Perform sparse embedding inference on the service * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/post-inference-api.html + * @group serverless * * @param array{ * inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference request to complete. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference payload. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference payload. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -1131,11 +1182,11 @@ public function rerank(?array $params = null) public function sparseEmbedding(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['inference_id'], $params); + $this->checkRequiredParameters(['inference_id','body'], $params); $url = '/_inference/sparse_embedding/' . $this->encode($params['inference_id']); $method = 'POST'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -1147,18 +1198,19 @@ public function sparseEmbedding(?array $params = null) /** - * Perform streaming completion inference + * Perform streaming inference * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/post-stream-inference-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/stream-inference-api.html * * @param array{ * inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // The amount of time to wait for the inference request to complete. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference payload. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference payload. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -1171,11 +1223,11 @@ public function sparseEmbedding(?array $params = null) public function streamCompletion(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['inference_id'], $params); + $this->checkRequiredParameters(['inference_id','body'], $params); $url = '/_inference/completion/' . $this->encode($params['inference_id']) . '/_stream'; $method = 'POST'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'text/event-stream', 'Content-Type' => 'application/json', @@ -1187,18 +1239,20 @@ public function streamCompletion(?array $params = null) /** - * Perform text embedding inference + * Perform text embedding inference on the service * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/post-inference-api.html + * @group serverless * * @param array{ * inference_id: string, // (REQUIRED) The inference Id + * timeout?: int|string, // Specifies the amount of time to wait for the inference request to complete. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference payload. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference payload. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -1211,11 +1265,11 @@ public function streamCompletion(?array $params = null) public function textEmbedding(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['inference_id'], $params); + $this->checkRequiredParameters(['inference_id','body'], $params); $url = '/_inference/text_embedding/' . $this->encode($params['inference_id']); $method = 'POST'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', @@ -1227,9 +1281,9 @@ public function textEmbedding(?array $params = null) /** - * Update inference + * Update an inference endpoint * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-inference-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/update-inference-api.html * * @param array{ * inference_id: string, // (REQUIRED) The inference Id @@ -1239,7 +1293,7 @@ public function textEmbedding(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The inference endpoint's task and service settings. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The inference endpoint's task and service settings. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -1252,7 +1306,7 @@ public function textEmbedding(?array $params = null) public function update(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['inference_id'], $params); + $this->checkRequiredParameters(['inference_id','body'], $params); if (isset($params['task_type'])) { $url = '/_inference/' . $this->encode($params['task_type']) . '/' . $this->encode($params['inference_id']) . '/_update'; $method = 'PUT'; diff --git a/src/Endpoints/Ingest.php b/src/Endpoints/Ingest.php index 729f40e3b..797dcb7ea 100644 --- a/src/Endpoints/Ingest.php +++ b/src/Endpoints/Ingest.php @@ -29,9 +29,9 @@ class Ingest extends AbstractEndpoint { /** - * Deletes a geoip database configuration + * Delete GeoIP database configurations * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-geoip-database-api.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ingest-delete-geoip-database * * @param array{ * id: string|array, // (REQUIRED) A comma-separated list of geoip database configurations to delete @@ -69,9 +69,9 @@ public function deleteGeoipDatabase(?array $params = null) /** - * Deletes an ip location database configuration + * Delete IP geolocation database configurations * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-ip-location-database-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-ip-location-database-api.html * * @param array{ * id: string|array, // (REQUIRED) A comma-separated list of ip location database configurations to delete @@ -109,9 +109,10 @@ public function deleteIpLocationDatabase(?array $params = null) /** - * Deletes a pipeline. + * Delete pipelines * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-pipeline-api.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) Pipeline ID @@ -149,9 +150,9 @@ public function deletePipeline(?array $params = null) /** - * Returns statistical information about geoip databases + * Get GeoIP statistics * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/geoip-stats-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/geoip-processor.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -184,9 +185,9 @@ public function geoIpStats(?array $params = null) /** - * Returns geoip database configuration. + * Get GeoIP database configurations * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-geoip-database-api.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ingest-get-geoip-database * * @param array{ * id?: string|array, // A comma-separated list of geoip database configurations to get; use `*` to get all geoip database configurations @@ -224,9 +225,9 @@ public function getGeoipDatabase(?array $params = null) /** - * Returns the specified ip location database configuration + * Get IP geolocation database configurations * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-ip-location-database-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-ip-location-database-api.html * * @param array{ * id?: string|array, // A comma-separated list of ip location database configurations to get; use `*` to get all ip location database configurations @@ -264,9 +265,10 @@ public function getIpLocationDatabase(?array $params = null) /** - * Returns a pipeline. + * Get pipelines * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-pipeline-api.html + * @group serverless * * @param array{ * id?: string, // Comma separated list of pipeline ids. Wildcards supported @@ -306,9 +308,10 @@ public function getPipeline(?array $params = null) /** - * Returns a list of the built-in patterns. + * Run a grok processor * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/grok-processor.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -341,9 +344,9 @@ public function processorGrok(?array $params = null) /** - * Puts the configuration for a geoip database to be downloaded + * Create or update a GeoIP database configuration * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-geoip-database-api.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ingest-put-geoip-database * * @param array{ * id: string, // (REQUIRED) The id of the database configuration @@ -383,9 +386,9 @@ public function putGeoipDatabase(?array $params = null) /** - * Puts the configuration for a ip location database to be downloaded + * Create or update an IP geolocation database configuration * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-ip-location-database-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-ip-location-database-api.html * * @param array{ * id: string, // (REQUIRED) The id of the database configuration @@ -425,9 +428,10 @@ public function putIpLocationDatabase(?array $params = null) /** - * Creates or updates a pipeline. + * Create or update a pipeline * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ingest.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) Pipeline ID @@ -468,9 +472,10 @@ public function putPipeline(?array $params = null) /** - * Allows to simulate a pipeline with example documents. + * Simulate a pipeline * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/simulate-pipeline-api.html + * @group serverless * * @param array{ * id?: string, // Pipeline ID diff --git a/src/Endpoints/License.php b/src/Endpoints/License.php index 79e9e6108..6ae57fe20 100644 --- a/src/Endpoints/License.php +++ b/src/Endpoints/License.php @@ -29,9 +29,9 @@ class License extends AbstractEndpoint { /** - * Deletes licensing information for the cluster + * Delete the license * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-license.html * * @param array{ * master_timeout?: int|string, // Timeout for processing on master node @@ -66,9 +66,10 @@ public function delete(?array $params = null) /** - * Retrieves licensing information for the cluster + * Get license information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-license.html + * @group serverless * * @param array{ * local?: bool, // Return local information, do not retrieve the state from master node (default: false) @@ -103,9 +104,9 @@ public function get(?array $params = null) /** - * Retrieves information about the status of the basic license. + * Get the basic license status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-basic-status.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -138,9 +139,9 @@ public function getBasicStatus(?array $params = null) /** - * Retrieves information about the status of the trial license. + * Get the trial status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-trial-status.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -173,9 +174,9 @@ public function getTrialStatus(?array $params = null) /** - * Updates the license for the cluster. + * Update the license * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-license-post * * @param array{ * acknowledge?: bool, // whether the user has acknowledged acknowledge messages (default: false) @@ -213,9 +214,9 @@ public function post(?array $params = null) /** - * Starts an indefinite basic license. + * Start a basic license * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/start-basic.html * * @param array{ * acknowledge?: bool, // whether the user has acknowledged acknowledge messages (default: false) @@ -251,9 +252,9 @@ public function postStartBasic(?array $params = null) /** - * starts a limited time trial license. + * Start a trial * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/start-trial.html * * @param array{ * type?: string, // The type of trial license to generate (default: "trial") diff --git a/src/Endpoints/Logstash.php b/src/Endpoints/Logstash.php index 19cc50b61..4ca4ed781 100644 --- a/src/Endpoints/Logstash.php +++ b/src/Endpoints/Logstash.php @@ -29,9 +29,10 @@ class Logstash extends AbstractEndpoint { /** - * Deletes Logstash Pipelines used by Central Management + * Delete a Logstash pipeline * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/logstash-api-delete-pipeline.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The ID of the Pipeline @@ -67,9 +68,10 @@ public function deletePipeline(?array $params = null) /** - * Retrieves Logstash Pipelines used by Central Management + * Get Logstash pipelines * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/logstash-api-get-pipeline.html + * @group serverless * * @param array{ * id?: string, // A comma-separated list of Pipeline IDs @@ -107,9 +109,10 @@ public function getPipeline(?array $params = null) /** - * Adds and updates Logstash Pipelines used for Central Management + * Create or update a Logstash pipeline * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/logstash-api-put-pipeline.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The ID of the Pipeline diff --git a/src/Endpoints/Migration.php b/src/Endpoints/Migration.php index 93f985f75..b562af75c 100644 --- a/src/Endpoints/Migration.php +++ b/src/Endpoints/Migration.php @@ -29,9 +29,9 @@ class Migration extends AbstractEndpoint { /** - * Retrieves information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version. + * Get deprecation information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/migration-api-deprecation.html * * @param array{ * index?: string, // Index pattern @@ -69,9 +69,9 @@ public function deprecations(?array $params = null) /** - * Find out whether system features need to be upgraded or not + * Get feature migration information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/feature-migration-api.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -104,9 +104,9 @@ public function getFeatureUpgradeStatus(?array $params = null) /** - * Begin upgrades for system features + * Start the feature migration * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/feature-migration-api.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) diff --git a/src/Endpoints/Ml.php b/src/Endpoints/Ml.php index 6a499f8f8..ba18b2842 100644 --- a/src/Endpoints/Ml.php +++ b/src/Endpoints/Ml.php @@ -29,9 +29,9 @@ class Ml extends AbstractEndpoint { /** - * Clear the cached results from a trained model deployment + * Clear trained model deployment cache * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/clear-trained-model-deployment-cache.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clear-trained-model-deployment-cache.html * * @param array{ * model_id: string, // (REQUIRED) The unique identifier of the trained model. @@ -68,9 +68,10 @@ public function clearTrainedModelDeploymentCache(?array $params = null) /** - * Closes one or more anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle. + * Close anomaly detection jobs * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-close-job.html + * @group serverless * * @param array{ * job_id: string, // (REQUIRED) The name of the job to close @@ -111,9 +112,10 @@ public function closeJob(?array $params = null) /** - * Deletes a calendar. + * Delete a calendar * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-delete-calendar.html + * @group serverless * * @param array{ * calendar_id: string, // (REQUIRED) The ID of the calendar to delete @@ -149,9 +151,10 @@ public function deleteCalendar(?array $params = null) /** - * Deletes scheduled events from a calendar. + * Delete events from a calendar * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-delete-calendar-event.html + * @group serverless * * @param array{ * calendar_id: string, // (REQUIRED) The ID of the calendar to modify @@ -188,9 +191,10 @@ public function deleteCalendarEvent(?array $params = null) /** - * Deletes anomaly detection jobs from a calendar. + * Delete anomaly jobs from a calendar * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-delete-calendar-job.html + * @group serverless * * @param array{ * calendar_id: string, // (REQUIRED) The ID of the calendar to modify @@ -227,9 +231,10 @@ public function deleteCalendarJob(?array $params = null) /** - * Deletes an existing data frame analytics job. + * Delete a data frame analytics job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-dfanalytics.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The ID of the data frame analytics to delete @@ -267,9 +272,10 @@ public function deleteDataFrameAnalytics(?array $params = null) /** - * Deletes an existing datafeed. + * Delete a datafeed * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-delete-datafeed.html + * @group serverless * * @param array{ * datafeed_id: string, // (REQUIRED) The ID of the datafeed to delete @@ -306,9 +312,9 @@ public function deleteDatafeed(?array $params = null) /** - * Deletes expired and unused machine learning data. + * Delete expired ML data * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-delete-expired-data.html * * @param array{ * job_id?: string, // The ID of the job(s) to perform expired data hygiene for @@ -350,9 +356,10 @@ public function deleteExpiredData(?array $params = null) /** - * Deletes a filter. + * Delete a filter * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-delete-filter.html + * @group serverless * * @param array{ * filter_id: string, // (REQUIRED) The ID of the filter to delete @@ -388,9 +395,9 @@ public function deleteFilter(?array $params = null) /** - * Deletes forecasts from a machine learning job. + * Delete forecasts from a job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-delete-forecast.html * * @param array{ * job_id: string, // (REQUIRED) The ID of the job from which to delete forecasts @@ -433,9 +440,10 @@ public function deleteForecast(?array $params = null) /** - * Deletes an existing anomaly detection job. + * Delete an anomaly detection job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-delete-job.html + * @group serverless * * @param array{ * job_id: string, // (REQUIRED) The ID of the job to delete @@ -474,9 +482,9 @@ public function deleteJob(?array $params = null) /** - * Deletes an existing model snapshot. + * Delete a model snapshot * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-delete-snapshot.html * * @param array{ * job_id: string, // (REQUIRED) The ID of the job to fetch @@ -513,9 +521,10 @@ public function deleteModelSnapshot(?array $params = null) /** - * Deletes an existing trained inference model that is currently not referenced by an ingest pipeline. + * Delete an unreferenced trained model * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-trained-models.html + * @group serverless * * @param array{ * model_id: string, // (REQUIRED) The ID of the trained model to delete @@ -553,9 +562,10 @@ public function deleteTrainedModel(?array $params = null) /** - * Deletes a model alias that refers to the trained model + * Delete a trained model alias * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-trained-models-aliases.html + * @group serverless * * @param array{ * model_alias: string, // (REQUIRED) The trained model alias to delete @@ -593,9 +603,10 @@ public function deleteTrainedModelAlias(?array $params = null) /** - * Estimates the model memory + * Estimate job model memory usage * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-estimate-model-memory.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -631,9 +642,10 @@ public function estimateModelMemory(?array $params = null) /** - * Evaluates the data frame analytics for an annotated index. + * Evaluate data frame analytics * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/evaluate-dfanalytics.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -669,9 +681,9 @@ public function evaluateDataFrame(?array $params = null) /** - * Explains a data frame analytics config. + * Explain data frame analytics config * - * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/explain-dfanalytics.html * * @param array{ * id?: string, // The ID of the data frame analytics to explain @@ -711,9 +723,10 @@ public function explainDataFrameAnalytics(?array $params = null) /** - * Forces any buffered data to be processed by the job. + * Force buffered data to be processed * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-flush-job.html + * @group serverless * * @param array{ * job_id: string, // (REQUIRED) The name of the job to flush @@ -756,9 +769,9 @@ public function flushJob(?array $params = null) /** - * Predicts the future behavior of a time series by using its historical behavior. + * Predict future behavior of a time series * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-forecast.html * * @param array{ * job_id: string, // (REQUIRED) The ID of the job to forecast for @@ -799,9 +812,9 @@ public function forecast(?array $params = null) /** - * Retrieves anomaly detection job results for one or more buckets. + * Get anomaly detection job results for buckets * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-bucket.html * * @param array{ * job_id: string, // (REQUIRED) ID of the job to get bucket results from @@ -853,9 +866,10 @@ public function getBuckets(?array $params = null) /** - * Retrieves information about the scheduled events in calendars. + * Get info about events in calendars * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-calendar-event.html + * @group serverless * * @param array{ * calendar_id: string, // (REQUIRED) The ID of the calendar containing the events @@ -896,9 +910,10 @@ public function getCalendarEvents(?array $params = null) /** - * Retrieves configuration information for calendars. + * Get calendar configuration info * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-calendar.html + * @group serverless * * @param array{ * calendar_id?: string, // The ID of the calendar to fetch @@ -940,9 +955,9 @@ public function getCalendars(?array $params = null) /** - * Retrieves anomaly detection job results for one or more categories. + * Get anomaly detection job results for categories * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-category.html * * @param array{ * job_id: string, // (REQUIRED) The name of the job @@ -988,9 +1003,10 @@ public function getCategories(?array $params = null) /** - * Retrieves configuration information for data frame analytics jobs. + * Get data frame analytics job configuration info * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-dfanalytics.html + * @group serverless * * @param array{ * id?: string, // The ID of the data frame analytics to fetch @@ -1032,9 +1048,10 @@ public function getDataFrameAnalytics(?array $params = null) /** - * Retrieves usage information for data frame analytics jobs. + * Get data frame analytics job stats * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-dfanalytics-stats.html + * @group serverless * * @param array{ * id?: string, // The ID of the data frame analytics stats to fetch @@ -1076,9 +1093,10 @@ public function getDataFrameAnalyticsStats(?array $params = null) /** - * Retrieves usage information for datafeeds. + * Get datafeed stats * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-datafeed-stats.html + * @group serverless * * @param array{ * datafeed_id?: string, // The ID of the datafeeds stats to fetch @@ -1117,9 +1135,10 @@ public function getDatafeedStats(?array $params = null) /** - * Retrieves configuration information for datafeeds. + * Get datafeeds configuration info * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-datafeed.html + * @group serverless * * @param array{ * datafeed_id?: string, // The ID of the datafeeds to fetch @@ -1159,9 +1178,10 @@ public function getDatafeeds(?array $params = null) /** - * Retrieves filters. + * Get filters * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-filter.html + * @group serverless * * @param array{ * filter_id?: string, // The ID of the filter to fetch @@ -1201,9 +1221,9 @@ public function getFilters(?array $params = null) /** - * Retrieves anomaly detection job results for one or more influencers. + * Get anomaly detection job results for influencers * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-influencer.html * * @param array{ * job_id: string, // (REQUIRED) Identifier for the anomaly detection job @@ -1249,9 +1269,10 @@ public function getInfluencers(?array $params = null) /** - * Retrieves usage information for anomaly detection jobs. + * Get anomaly detection job stats * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-job-stats.html + * @group serverless * * @param array{ * job_id?: string, // The ID of the jobs stats to fetch @@ -1290,9 +1311,10 @@ public function getJobStats(?array $params = null) /** - * Retrieves configuration information for anomaly detection jobs. + * Get anomaly detection jobs configuration info * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-job.html + * @group serverless * * @param array{ * job_id?: string, // The ID of the jobs to fetch @@ -1332,9 +1354,9 @@ public function getJobs(?array $params = null) /** - * Returns information on how ML is using memory. + * Get machine learning memory usage info * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-ml-memory.html * * @param array{ * node_id?: string, // Specifies the node or nodes to retrieve stats for. @@ -1374,9 +1396,9 @@ public function getMemoryStats(?array $params = null) /** - * Gets stats for anomaly detection job model snapshot upgrades that are in progress. + * Get anomaly detection job model snapshot upgrade usage info * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-job-model-snapshot-upgrade-stats.html * * @param array{ * job_id: string, // (REQUIRED) The ID of the job. May be a wildcard, comma separated list or `_all`. @@ -1414,9 +1436,9 @@ public function getModelSnapshotUpgradeStats(?array $params = null) /** - * Retrieves information about model snapshots. + * Get model snapshots info * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-snapshot.html * * @param array{ * job_id: string, // (REQUIRED) The ID of the job to fetch @@ -1465,9 +1487,10 @@ public function getModelSnapshots(?array $params = null) /** - * Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs. + * Get overall bucket results * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-overall-buckets.html + * @group serverless * * @param array{ * job_id: string, // (REQUIRED) The job IDs for which to calculate overall bucket results @@ -1512,9 +1535,9 @@ public function getOverallBuckets(?array $params = null) /** - * Retrieves anomaly records for an anomaly detection job. + * Get anomaly records for an anomaly detection job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-get-record.html * * @param array{ * job_id: string, // (REQUIRED) The ID of the job @@ -1560,14 +1583,15 @@ public function getRecords(?array $params = null) /** - * Retrieves configuration information for a trained inference model. + * Get trained model configuration info * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-trained-models.html + * @group serverless * * @param array{ * model_id?: string, // The ID of the trained models to fetch * allow_no_match?: bool, // Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) - * include?: string, // A comma-separate list of fields to optionally include. Valid options are 'definition' and 'total_feature_importance'. Default is none. + * include?: string, // A comma delimited string of optional fields to include in the responsebody. * include_model_definition?: bool, // Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false. * decompress_definition?: bool, // Should the model definition be decompressed into valid JSON or returned in a custom compressed format. Defaults to true. * from?: int, // skips a number of trained models @@ -1608,9 +1632,10 @@ public function getTrainedModels(?array $params = null) /** - * Retrieves usage information for trained inference models. + * Get trained models usage info * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-trained-models-stats.html + * @group serverless * * @param array{ * model_id?: string, // The ID of the trained models stats to fetch @@ -1651,9 +1676,10 @@ public function getTrainedModelsStats(?array $params = null) /** - * Evaluate a trained model. + * Evaluate a trained model * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/infer-trained-model.html + * @group serverless * * @param array{ * model_id: string, // (REQUIRED) The unique identifier of the trained model. @@ -1692,9 +1718,9 @@ public function inferTrainedModel(?array $params = null) /** - * Returns defaults and limits used by machine learning. + * Get machine learning information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-ml-info.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1727,9 +1753,10 @@ public function info(?array $params = null) /** - * Opens one or more anomaly detection jobs. + * Open anomaly detection jobs * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-open-job.html + * @group serverless * * @param array{ * job_id: string, // (REQUIRED) The ID of the job to open @@ -1767,9 +1794,10 @@ public function openJob(?array $params = null) /** - * Posts scheduled events in a calendar. + * Add scheduled events to the calendar * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-post-calendar-event.html + * @group serverless * * @param array{ * calendar_id: string, // (REQUIRED) The ID of the calendar to modify @@ -1807,9 +1835,9 @@ public function postCalendarEvents(?array $params = null) /** - * Sends data to an anomaly detection job for analysis. + * Send data to an anomaly detection job for analysis * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-post-data.html * * @param array{ * job_id: string, // (REQUIRED) The name of the job receiving the data @@ -1849,9 +1877,10 @@ public function postData(?array $params = null) /** - * Previews that will be analyzed given a data frame analytics config. + * Preview features used by data frame analytics * - * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/preview-dfanalytics.html + * @group serverless * * @param array{ * id?: string, // The ID of the data frame analytics to preview @@ -1891,9 +1920,10 @@ public function previewDataFrameAnalytics(?array $params = null) /** - * Previews a datafeed. + * Preview a datafeed * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-preview-datafeed.html + * @group serverless * * @param array{ * datafeed_id?: string, // The ID of the datafeed to preview @@ -1935,9 +1965,10 @@ public function previewDatafeed(?array $params = null) /** - * Instantiates a calendar. + * Create a calendar * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-put-calendar.html + * @group serverless * * @param array{ * calendar_id: string, // (REQUIRED) The ID of the calendar to create @@ -1975,9 +2006,10 @@ public function putCalendar(?array $params = null) /** - * Adds an anomaly detection job to a calendar. + * Add anomaly detection job to calendar * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-put-calendar-job.html + * @group serverless * * @param array{ * calendar_id: string, // (REQUIRED) The ID of the calendar to modify @@ -2014,9 +2046,10 @@ public function putCalendarJob(?array $params = null) /** - * Instantiates a data frame analytics job. + * Create a data frame analytics job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-dfanalytics.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The ID of the data frame analytics to create @@ -2054,16 +2087,17 @@ public function putDataFrameAnalytics(?array $params = null) /** - * Instantiates a datafeed. + * Create a datafeed * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-put-datafeed.html + * @group serverless * * @param array{ * datafeed_id: string, // (REQUIRED) The ID of the datafeed to create * ignore_unavailable?: bool, // Ignore unavailable indexes (default: false) * allow_no_indices?: bool, // Ignore if the source indices expressions resolves to no concrete indices (default: true) * ignore_throttled?: bool, // Ignore indices that are marked as throttled (default: true) - * expand_wildcards?: string, // Whether source index expressions should get expanded to open or closed indices (default: open) + * expand_wildcards?: string|array, // Whether source index expressions should get expanded to open or closed indices (default: open) * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -2098,9 +2132,10 @@ public function putDatafeed(?array $params = null) /** - * Instantiates a filter. + * Create a filter * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-put-filter.html + * @group serverless * * @param array{ * filter_id: string, // (REQUIRED) The ID of the filter to create @@ -2138,16 +2173,17 @@ public function putFilter(?array $params = null) /** - * Instantiates an anomaly detection job. + * Create an anomaly detection job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-put-job.html + * @group serverless * * @param array{ * job_id: string, // (REQUIRED) The ID of the job to create * ignore_unavailable?: bool, // Ignore unavailable indexes (default: false). Only set if datafeed_config is provided. * allow_no_indices?: bool, // Ignore if the source indices expressions resolves to no concrete indices (default: true). Only set if datafeed_config is provided. * ignore_throttled?: bool, // Ignore indices that are marked as throttled (default: true). Only set if datafeed_config is provided. - * expand_wildcards?: string, // Whether source index expressions should get expanded to open or closed indices (default: open). Only set if datafeed_config is provided. + * expand_wildcards?: string|array, // Whether source index expressions should get expanded to open or closed indices (default: open). Only set if datafeed_config is provided. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -2182,9 +2218,10 @@ public function putJob(?array $params = null) /** - * Creates an inference trained model. + * Create a trained model * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-trained-models.html + * @group serverless * * @param array{ * model_id: string, // (REQUIRED) The ID of the trained models to store @@ -2224,9 +2261,10 @@ public function putTrainedModel(?array $params = null) /** - * Creates a new model alias (or reassigns an existing one) to refer to the trained model + * Create or update a trained model alias * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-trained-models-aliases.html + * @group serverless * * @param array{ * model_alias: string, // (REQUIRED) The trained model alias to update @@ -2265,9 +2303,10 @@ public function putTrainedModelAlias(?array $params = null) /** - * Creates part of a trained model definition + * Create part of a trained model definition * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-trained-model-definition-part.html + * @group serverless * * @param array{ * model_id: string, // (REQUIRED) The ID of the trained model for this definition part @@ -2306,9 +2345,10 @@ public function putTrainedModelDefinitionPart(?array $params = null) /** - * Creates a trained model vocabulary + * Create a trained model vocabulary * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-trained-model-vocabulary.html + * @group serverless * * @param array{ * model_id: string, // (REQUIRED) The ID of the trained model for this vocabulary @@ -2346,9 +2386,10 @@ public function putTrainedModelVocabulary(?array $params = null) /** - * Resets an existing anomaly detection job. + * Reset an anomaly detection job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-reset-job.html + * @group serverless * * @param array{ * job_id: string, // (REQUIRED) The ID of the job to reset @@ -2386,9 +2427,9 @@ public function resetJob(?array $params = null) /** - * Reverts to a specific snapshot. + * Revert to a snapshot * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-revert-snapshot.html * * @param array{ * job_id: string, // (REQUIRED) The ID of the job to fetch @@ -2428,9 +2469,9 @@ public function revertModelSnapshot(?array $params = null) /** - * Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade. + * Set upgrade_mode for ML indices * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-set-upgrade-mode.html * * @param array{ * enabled?: bool, // Whether to enable upgrade_mode ML setting or not. Defaults to false. @@ -2465,9 +2506,10 @@ public function setUpgradeMode(?array $params = null) /** - * Starts a data frame analytics job. + * Start a data frame analytics job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/start-dfanalytics.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The ID of the data frame analytics to start @@ -2506,9 +2548,10 @@ public function startDataFrameAnalytics(?array $params = null) /** - * Starts one or more datafeeds. + * Start datafeeds * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-start-datafeed.html + * @group serverless * * @param array{ * datafeed_id: string, // (REQUIRED) The ID of the datafeed to start @@ -2549,9 +2592,10 @@ public function startDatafeed(?array $params = null) /** - * Start a trained model deployment. + * Start a trained model deployment * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trained-model-deployment.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/start-trained-model-deployment.html + * @group serverless * * @param array{ * model_id: string, // (REQUIRED) The unique identifier of the trained model. @@ -2562,7 +2606,7 @@ public function startDatafeed(?array $params = null) * priority?: string, // The deployment priority. * queue_capacity?: int, // Controls how many inference requests are allowed in the queue at a time. * timeout?: int|string, // Controls the amount of time to wait for the model to deploy. - * wait_for?: string, // The allocation status for which to wait + * wait_for?: string, // Specifies the allocation status to wait for before returning. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -2597,9 +2641,10 @@ public function startTrainedModelDeployment(?array $params = null) /** - * Stops one or more data frame analytics jobs. + * Stop data frame analytics jobs * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/stop-dfanalytics.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The ID of the data frame analytics to stop @@ -2640,9 +2685,10 @@ public function stopDataFrameAnalytics(?array $params = null) /** - * Stops one or more datafeeds. + * Stop datafeeds * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-stop-datafeed.html + * @group serverless * * @param array{ * datafeed_id: string, // (REQUIRED) The ID of the datafeed to stop @@ -2683,9 +2729,10 @@ public function stopDatafeed(?array $params = null) /** - * Stop a trained model deployment. + * Stop a trained model deployment * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/stop-trained-model-deployment.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/stop-trained-model-deployment.html + * @group serverless * * @param array{ * model_id: string, // (REQUIRED) The unique identifier of the trained model. @@ -2725,9 +2772,10 @@ public function stopTrainedModelDeployment(?array $params = null) /** - * Updates certain properties of a data frame analytics job. + * Update a data frame analytics job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ml-update-data-frame-analytics + * @group serverless * * @param array{ * id: string, // (REQUIRED) The ID of the data frame analytics to update @@ -2765,16 +2813,17 @@ public function updateDataFrameAnalytics(?array $params = null) /** - * Updates certain properties of a datafeed. + * Update a datafeed * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-update-datafeed.html + * @group serverless * * @param array{ * datafeed_id: string, // (REQUIRED) The ID of the datafeed to update * ignore_unavailable?: bool, // Ignore unavailable indexes (default: false) * allow_no_indices?: bool, // Ignore if the source indices expressions resolves to no concrete indices (default: true) * ignore_throttled?: bool, // Ignore indices that are marked as throttled (default: true) - * expand_wildcards?: string, // Whether source index expressions should get expanded to open or closed indices (default: open) + * expand_wildcards?: string|array, // Whether source index expressions should get expanded to open or closed indices (default: open) * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -2809,9 +2858,10 @@ public function updateDatafeed(?array $params = null) /** - * Updates the description of a filter, adds items, or removes items. + * Update a filter * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-update-filter.html + * @group serverless * * @param array{ * filter_id: string, // (REQUIRED) The ID of the filter to update @@ -2849,9 +2899,10 @@ public function updateFilter(?array $params = null) /** - * Updates certain properties of an anomaly detection job. + * Update an anomaly detection job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-update-job.html + * @group serverless * * @param array{ * job_id: string, // (REQUIRED) The ID of the job to create @@ -2889,9 +2940,9 @@ public function updateJob(?array $params = null) /** - * Updates certain properties of a snapshot. + * Update a snapshot * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-update-snapshot.html * * @param array{ * job_id: string, // (REQUIRED) The ID of the job to fetch @@ -2930,9 +2981,10 @@ public function updateModelSnapshot(?array $params = null) /** - * Updates certain properties of trained model deployment. + * Update a trained model deployment * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ml-update-trained-model-deployment + * @group serverless * * @param array{ * model_id: string, // (REQUIRED) The unique identifier of the trained model. @@ -2971,9 +3023,9 @@ public function updateTrainedModelDeployment(?array $params = null) /** - * Upgrades a given job snapshot to the current major version. + * Upgrade a snapshot * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ml-upgrade-job-model-snapshot.html * * @param array{ * job_id: string, // (REQUIRED) The ID of the job @@ -3012,9 +3064,9 @@ public function upgradeJobSnapshot(?array $params = null) /** - * Validates an anomaly detection job. + * Validate an anomaly detection job * - * @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html + * @link https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -3050,9 +3102,8 @@ public function validate(?array $params = null) /** - * Validates an anomaly detection detector. + * Validate an anomaly detection job * - * @see https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) diff --git a/src/Endpoints/Monitoring.php b/src/Endpoints/Monitoring.php index 52a878535..b45f3fe29 100644 --- a/src/Endpoints/Monitoring.php +++ b/src/Endpoints/Monitoring.php @@ -29,12 +29,11 @@ class Monitoring extends AbstractEndpoint { /** - * Used by the monitoring features to send monitoring data. + * Send monitoring data * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/monitor-elasticsearch-cluster.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8 * * @param array{ - * type?: string, // Default document type for items which don't provide one * system_id?: string, // Identifier of the monitored system * system_api_version?: string, // API Version of the monitored system * interval?: string, // Collection interval (e.g., '10s' or '10000ms') of the payload @@ -56,20 +55,16 @@ public function bulk(?array $params = null) { $params = $params ?? []; $this->checkRequiredParameters(['body'], $params); - if (isset($params['type'])) { - $url = '/_monitoring/' . $this->encode($params['type']) . '/bulk'; - $method = 'POST'; - } else { - $url = '/_monitoring/bulk'; - $method = 'POST'; - } + $url = '/_monitoring/bulk'; + $method = 'POST'; + $url = $this->addQueryString($url, $params, ['system_id','system_api_version','interval','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/x-ndjson', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); - $request = $this->addOtelAttributes($params, ['type'], $request, 'monitoring.bulk'); + $request = $this->addOtelAttributes($params, [], $request, 'monitoring.bulk'); return $this->client->sendRequest($request); } } diff --git a/src/Endpoints/Nodes.php b/src/Endpoints/Nodes.php index 5ad20abea..a2df22425 100644 --- a/src/Endpoints/Nodes.php +++ b/src/Endpoints/Nodes.php @@ -29,9 +29,9 @@ class Nodes extends AbstractEndpoint { /** - * Removes the archived repositories metering information present in the cluster. + * Clear the archived repositories metering * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clear-repositories-metering-archive-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -69,9 +69,9 @@ public function clearRepositoriesMeteringArchive(?array $params = null) /** - * Returns cluster repositories metering information. + * Get cluster repositories metering * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-repositories-metering-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -108,9 +108,9 @@ public function getRepositoriesMeteringInfo(?array $params = null) /** - * Returns information about hot threads on each node in the cluster. + * Get the hot threads for nodes * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-nodes-hot-threads.html * * @param array{ * node_id?: string|array, // 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 @@ -155,9 +155,9 @@ public function hotThreads(?array $params = null) /** - * Returns information about nodes in the cluster. + * Get node information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-nodes-info.html * * @param array{ * node_id?: string|array, // 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 @@ -204,9 +204,9 @@ public function info(?array $params = null) /** - * Reloads secure settings. + * Reload the keystore on nodes in the cluster * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-nodes-reload-secure-settings.html * * @param array{ * node_id?: string|array, // A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. @@ -247,9 +247,9 @@ public function reloadSecureSettings(?array $params = null) /** - * Returns statistical information about nodes in the cluster. + * Get node statistics * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-nodes-stats.html * * @param array{ * node_id?: string|array, // 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 @@ -310,9 +310,9 @@ public function stats(?array $params = null) /** - * Returns low-level information about REST actions usage on nodes. + * Get feature usage information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-nodes-usage.html * * @param array{ * node_id?: string|array, // 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 diff --git a/src/Endpoints/Profiling.php b/src/Endpoints/Profiling.php index 9a22b870d..5fb068db9 100644 --- a/src/Endpoints/Profiling.php +++ b/src/Endpoints/Profiling.php @@ -29,9 +29,9 @@ class Profiling extends AbstractEndpoint { /** - * Extracts a UI-optimized structure to render flamegraphs from Universal Profiling. + * Extracts a UI-optimized structure to render flamegraphs from Universal Profiling * - * @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html + * @link https://www.elastic.co/guide/en/observability/current/universal-profiling.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -67,9 +67,9 @@ public function flamegraph(?array $params = null) /** - * Extracts raw stacktrace information from Universal Profiling. + * Extracts raw stacktrace information from Universal Profiling * - * @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html + * @link https://www.elastic.co/guide/en/observability/current/universal-profiling.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -105,9 +105,9 @@ public function stacktraces(?array $params = null) /** - * Returns basic information about the status of Universal Profiling. + * Returns basic information about the status of Universal Profiling * - * @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html + * @link https://www.elastic.co/guide/en/observability/current/universal-profiling.html * * @param array{ * master_timeout?: int|string, // Explicit operation timeout for connection to master node @@ -143,9 +143,9 @@ public function status(?array $params = null) /** - * Extracts a list of topN functions from Universal Profiling. + * Extracts a list of topN functions from Universal Profiling * - * @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html + * @link https://www.elastic.co/guide/en/observability/current/universal-profiling.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) diff --git a/src/Endpoints/QueryRules.php b/src/Endpoints/QueryRules.php index 2dc54b8de..01eae9ab9 100644 --- a/src/Endpoints/QueryRules.php +++ b/src/Endpoints/QueryRules.php @@ -29,9 +29,10 @@ class QueryRules extends AbstractEndpoint { /** - * Deletes an individual query rule within a ruleset. + * Delete a query rule * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-query-rule.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-query-rule.html + * @group serverless * * @param array{ * ruleset_id: string, // (REQUIRED) The unique identifier of the query ruleset this rule exists in @@ -68,9 +69,10 @@ public function deleteRule(?array $params = null) /** - * Deletes a query ruleset. + * Delete a query ruleset * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-query-ruleset.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-query-ruleset.html + * @group serverless * * @param array{ * ruleset_id: string, // (REQUIRED) The unique identifier of the query ruleset to delete @@ -106,9 +108,10 @@ public function deleteRuleset(?array $params = null) /** - * Returns the details about an individual query rule within a ruleset. + * Get a query rule * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-query-rule.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-query-rule.html + * @group serverless * * @param array{ * ruleset_id: string, // (REQUIRED) The unique identifier of the query ruleset the rule exists within @@ -145,9 +148,10 @@ public function getRule(?array $params = null) /** - * Returns the details about a query ruleset. + * Get a query ruleset * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-query-ruleset.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-query-ruleset.html + * @group serverless * * @param array{ * ruleset_id: string, // (REQUIRED) The unique identifier of the query ruleset @@ -183,9 +187,10 @@ public function getRuleset(?array $params = null) /** - * Lists query rulesets. + * Get all query rulesets * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-query-rulesets.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/list-query-rulesets.html + * @group serverless * * @param array{ * from?: int, // Starting offset (default: 0) @@ -220,9 +225,10 @@ public function listRulesets(?array $params = null) /** - * Creates or updates a query rule within a ruleset. + * Create or update a query rule * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-query-rule.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-query-rule.html + * @group serverless * * @param array{ * ruleset_id: string, // (REQUIRED) The unique identifier of the ruleset this rule should be added to. The ruleset will be created if it does not exist. @@ -261,9 +267,10 @@ public function putRule(?array $params = null) /** - * Creates or updates a query ruleset. + * Create or update a query ruleset * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-query-ruleset.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-query-ruleset.html + * @group serverless * * @param array{ * ruleset_id: string, // (REQUIRED) The unique identifier of the ruleset to be created or updated. @@ -301,10 +308,10 @@ public function putRuleset(?array $params = null) /** - * Tests a query ruleset to identify the rules that would match input criteria + * Test a query ruleset * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/test-query-ruleset.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/test-query-ruleset.html + * @group serverless * * @param array{ * ruleset_id: string, // (REQUIRED) The unique identifier of the ruleset to test. diff --git a/src/Endpoints/Rollup.php b/src/Endpoints/Rollup.php index 2e2a3d8a7..92e819700 100644 --- a/src/Endpoints/Rollup.php +++ b/src/Endpoints/Rollup.php @@ -29,9 +29,9 @@ class Rollup extends AbstractEndpoint { /** - * Deletes an existing rollup job. + * Delete a rollup job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-delete-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/rollup-delete-job.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -68,9 +68,9 @@ public function deleteJob(?array $params = null) /** - * Retrieves the configuration, stats, and status of rollup jobs. + * Get rollup job information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/rollup-get-job.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -109,9 +109,9 @@ public function getJobs(?array $params = null) /** - * Returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern. + * Get the rollup job capabilities * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-caps.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/rollup-get-rollup-caps.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -150,9 +150,9 @@ public function getRollupCaps(?array $params = null) /** - * Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the index where rollup data is stored). + * Get the rollup index capabilities * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-index-caps.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/rollup-get-rollup-index-caps.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -189,9 +189,9 @@ public function getRollupIndexCaps(?array $params = null) /** - * Creates a rollup job. + * Create a rollup job * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-put-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/rollup-put-job.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -230,9 +230,9 @@ public function putJob(?array $params = null) /** - * Enables searching rolled-up data using the standard query DSL. + * Search rolled-up data * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-search.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/rollup-search.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -273,9 +273,9 @@ public function rollupSearch(?array $params = null) /** - * Starts an existing, stopped rollup job. + * Start rollup jobs * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-start-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/rollup-start-job.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -312,9 +312,9 @@ public function startJob(?array $params = null) /** - * Stops an existing, started rollup job. + * Stop rollup jobs * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-stop-job.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/rollup-stop-job.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ diff --git a/src/Endpoints/SearchApplication.php b/src/Endpoints/SearchApplication.php index 3c3eba13c..b90bbb827 100644 --- a/src/Endpoints/SearchApplication.php +++ b/src/Endpoints/SearchApplication.php @@ -29,10 +29,10 @@ class SearchApplication extends AbstractEndpoint { /** - * Deletes a search application. + * Delete a search application * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-search-application.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the search application @@ -68,9 +68,10 @@ public function delete(?array $params = null) /** - * Delete a behavioral analytics collection. + * Delete a behavioral analytics collection * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-analytics-collection.html + * @group serverless * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -107,10 +108,10 @@ public function deleteBehavioralAnalytics(?array $params = null) /** - * Returns the details about a search application. + * Get search application details * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-search-application.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the search application @@ -146,9 +147,10 @@ public function get(?array $params = null) /** - * Returns the existing behavioral analytics collections. + * Get behavioral analytics collections * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/list-analytics-collection.html + * @group serverless * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -187,10 +189,10 @@ public function getBehavioralAnalytics(?array $params = null) /** - * Returns the existing search applications. + * Get search applications * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/list-analytics-collection.html + * @group serverless * * @param array{ * q?: string, // Query in the Lucene query string syntax @@ -226,9 +228,9 @@ public function list(?array $params = null) /** - * Creates a behavioral analytics event for existing collection. + * Create a behavioral analytics collection event * - * @see http://todo.com/tbd + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/post-analytics-collection-event.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -269,10 +271,10 @@ public function postBehavioralAnalyticsEvent(?array $params = null) /** - * Creates or updates a search application. + * Create or update a search application * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-search-application.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the search application to be created or updated @@ -311,9 +313,10 @@ public function put(?array $params = null) /** - * Creates a behavioral analytics collection. + * Create a behavioral analytics collection * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-analytics-collection.html + * @group serverless * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -350,9 +353,9 @@ public function putBehavioralAnalytics(?array $params = null) /** - * Renders a query for given search application search parameters + * Render a search application query * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-render-query.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-application-render-query.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -391,10 +394,10 @@ public function renderQuery(?array $params = null) /** - * Perform a search against a search application + * Run a search application search * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-search.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-application-search.html + * @group serverless * * @param array{ * name: string, // (REQUIRED) The name of the search application to be searched diff --git a/src/Endpoints/SearchableSnapshots.php b/src/Endpoints/SearchableSnapshots.php index 9ab106475..82bd4466f 100644 --- a/src/Endpoints/SearchableSnapshots.php +++ b/src/Endpoints/SearchableSnapshots.php @@ -29,9 +29,9 @@ class SearchableSnapshots extends AbstractEndpoint { /** - * Retrieve node-level cache statistics about searchable snapshots. + * Get cache statistics * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/searchable-snapshots-api-cache-stats.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -72,14 +72,14 @@ public function cacheStats(?array $params = null) /** * Clear the cache of searchable snapshots. * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/searchable-snapshots-api-clear-cache.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ - * index?: string|array, // A comma-separated list of index names + * index?: string|array, // Clear the cache * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -114,9 +114,9 @@ public function clearCache(?array $params = null) /** - * Mount a snapshot as a searchable index. + * Mount a snapshot * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/searchable-snapshots-api-mount-snapshot.html * * @param array{ * repository: string, // (REQUIRED) The name of the repository containing the snapshot of the index to mount @@ -158,9 +158,9 @@ public function mount(?array $params = null) /** - * Retrieve shard-level statistics about searchable snapshots. + * Get searchable snapshot statistics * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/searchable-snapshots-api-stats.html * * @param array{ * index?: string|array, // A comma-separated list of index names diff --git a/src/Endpoints/Security.php b/src/Endpoints/Security.php index 53696bf11..f3aa8ed98 100644 --- a/src/Endpoints/Security.php +++ b/src/Endpoints/Security.php @@ -29,9 +29,9 @@ class Security extends AbstractEndpoint { /** - * Creates or updates the user profile on behalf of another user. + * Activate a user profile * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-activate-user-profile.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-activate-user-profile.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -67,9 +67,10 @@ public function activateUserProfile(?array $params = null) /** - * Enables authentication as a user and retrieve information about the authenticated user. + * Authenticate a user * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-authenticate.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -102,9 +103,9 @@ public function authenticate(?array $params = null) /** - * Bulk delete roles in the native realm. + * Bulk delete roles * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-delete-role.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-bulk-delete-role.html * * @param array{ * refresh?: string, // 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. @@ -141,9 +142,9 @@ public function bulkDeleteRole(?array $params = null) /** - * Bulk adds and updates roles in the native realm. + * Bulk create or update roles * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-put-role.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-bulk-put-role.html * * @param array{ * refresh?: string, // 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. @@ -180,9 +181,9 @@ public function bulkPutRole(?array $params = null) /** - * Updates the attributes of multiple existing API keys. + * Bulk update API keys * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-update-api-keys.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-bulk-update-api-keys.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -218,9 +219,9 @@ public function bulkUpdateApiKeys(?array $params = null) /** - * Changes the passwords of users in the native realm and built-in users. + * Change passwords * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-change-password.html * * @param array{ * username?: string, // The username of the user to change the password for @@ -262,9 +263,9 @@ public function changePassword(?array $params = null) /** - * Clear a subset or all entries from the API key cache. + * Clear the API key cache * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-api-key-cache.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-clear-api-key-cache.html * * @param array{ * ids: string|array, // (REQUIRED) A comma-separated list of IDs of API keys to clear from the cache @@ -300,9 +301,9 @@ public function clearApiKeyCache(?array $params = null) /** - * Evicts application privileges from the native application privileges cache. + * Clear the privileges cache * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-privilege-cache.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-clear-privilege-cache.html * * @param array{ * application: string|array, // (REQUIRED) A comma-separated list of application names @@ -338,9 +339,9 @@ public function clearCachedPrivileges(?array $params = null) /** - * Evicts users from the user cache. Can completely clear the cache or evict specific users. + * Clear the user cache * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-clear-cache.html * * @param array{ * realms: string|array, // (REQUIRED) Comma-separated list of realms to clear @@ -377,9 +378,9 @@ public function clearCachedRealms(?array $params = null) /** - * Evicts roles from the native role cache. + * Clear the roles cache * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-clear-role-cache.html * * @param array{ * name: string|array, // (REQUIRED) Role name @@ -415,9 +416,9 @@ public function clearCachedRoles(?array $params = null) /** - * Evicts tokens from the service account token caches. + * Clear service account token caches * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-clear-service-token-caches.html * * @param array{ * namespace: string, // (REQUIRED) An identifier for the namespace @@ -455,9 +456,10 @@ public function clearCachedServiceTokens(?array $params = null) /** - * Creates an API key for access without requiring basic authentication. + * Create an API key * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-create-api-key.html + * @group serverless * * @param array{ * refresh?: string, // 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. @@ -494,9 +496,9 @@ public function createApiKey(?array $params = null) /** - * Creates a cross-cluster API key for API key based remote cluster access. + * Create a cross-cluster API key * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-create-cross-cluster-api-key.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -532,9 +534,9 @@ public function createCrossClusterApiKey(?array $params = null) /** - * Creates a service account token for access without requiring basic authentication. + * Create a service account token * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-create-service-token.html * * @param array{ * namespace: string, // (REQUIRED) An identifier for the namespace @@ -577,9 +579,9 @@ public function createServiceToken(?array $params = null) /** - * Delegate PKI authentication. + * Delegate PKI authentication * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-delegate-pki-authentication.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-delegate-pki-authentication.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -606,6 +608,7 @@ public function delegatePki(?array $params = null) $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', + 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, [], $request, 'security.delegate_pki'); @@ -614,9 +617,9 @@ public function delegatePki(?array $params = null) /** - * Removes application privileges. + * Delete application privileges * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-delete-privilege.html * * @param array{ * application: string, // (REQUIRED) Application name @@ -654,9 +657,9 @@ public function deletePrivileges(?array $params = null) /** - * Removes roles in the native realm. + * Delete roles * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-delete-role.html * * @param array{ * name: string, // (REQUIRED) Role name @@ -693,9 +696,9 @@ public function deleteRole(?array $params = null) /** - * Removes role mappings. + * Delete role mappings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-delete-role-mapping.html * * @param array{ * name: string, // (REQUIRED) Role-mapping name @@ -732,9 +735,9 @@ public function deleteRoleMapping(?array $params = null) /** - * Deletes a service account token. + * Delete service account tokens * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-delete-service-token.html * * @param array{ * namespace: string, // (REQUIRED) An identifier for the namespace @@ -773,9 +776,9 @@ public function deleteServiceToken(?array $params = null) /** - * Deletes users from the native realm. + * Delete users * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-delete-user.html * * @param array{ * username: string, // (REQUIRED) username @@ -812,9 +815,9 @@ public function deleteUser(?array $params = null) /** - * Disables users in the native realm. + * Disable users * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-disable-user.html * * @param array{ * username: string, // (REQUIRED) The username of the user to disable @@ -851,9 +854,9 @@ public function disableUser(?array $params = null) /** - * Disables a user profile so it's not visible in user profile searches. + * Disable a user profile * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-disable-user-profile.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-disable-user-profile.html * * @param array{ * uid: string, // (REQUIRED) Unique identifier for the user profile @@ -890,9 +893,9 @@ public function disableUserProfile(?array $params = null) /** - * Enables users in the native realm. + * Enable users * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-enable-user.html * * @param array{ * username: string, // (REQUIRED) The username of the user to enable @@ -929,9 +932,9 @@ public function enableUser(?array $params = null) /** - * Enables a user profile so it's visible in user profile searches. + * Enable a user profile * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-enable-user-profile.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-enable-user-profile.html * * @param array{ * uid: string, // (REQUIRED) An unique identifier of the user profile @@ -968,9 +971,9 @@ public function enableUserProfile(?array $params = null) /** - * Allows a kibana instance to configure itself to communicate with a secured elasticsearch cluster. + * Enroll Kibana * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-kibana-enrollment.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-kibana-enrollment.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1004,9 +1007,9 @@ public function enrollKibana(?array $params = null) /** - * Allows a new node to enroll to an existing cluster with security enabled. + * Enroll a node * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-node-enrollment.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-node-enrollment.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1040,9 +1043,10 @@ public function enrollNode(?array $params = null) /** - * Retrieves information for one or more API keys. + * Get API key information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-api-key.html + * @group serverless * * @param array{ * id?: string, // API key id of the API key to be retrieved @@ -1083,9 +1087,9 @@ public function getApiKey(?array $params = null) /** - * Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch. + * Get builtin privileges * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-builtin-privileges.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1118,9 +1122,9 @@ public function getBuiltinPrivileges(?array $params = null) /** - * Retrieves application privileges. + * Get application privileges * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-privileges.html * * @param array{ * application?: string, // Application name @@ -1162,9 +1166,9 @@ public function getPrivileges(?array $params = null) /** - * Retrieves roles in the native realm. + * Get roles * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-role.html * * @param array{ * name?: string|array, // A comma-separated list of role names @@ -1202,9 +1206,9 @@ public function getRole(?array $params = null) /** - * Retrieves role mappings. + * Get role mappings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-role-mapping.html * * @param array{ * name?: string|array, // A comma-separated list of role-mapping names @@ -1242,9 +1246,9 @@ public function getRoleMapping(?array $params = null) /** - * Retrieves information about service accounts. + * Get service accounts * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-service-accounts.html * * @param array{ * namespace?: string, // An identifier for the namespace @@ -1286,9 +1290,9 @@ public function getServiceAccounts(?array $params = null) /** - * Retrieves information of all service credentials for a service account. + * Get service account credentials * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-service-credentials.html * * @param array{ * namespace: string, // (REQUIRED) An identifier for the namespace @@ -1325,9 +1329,9 @@ public function getServiceCredentials(?array $params = null) /** - * Retrieve settings for the security system indices + * Get security index settings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-settings.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-settings.html * * @param array{ * master_timeout?: int|string, // Timeout for connection to master @@ -1362,9 +1366,9 @@ public function getSettings(?array $params = null) /** - * Creates a bearer token for access without requiring basic authentication. + * Get a token * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-token.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1400,9 +1404,9 @@ public function getToken(?array $params = null) /** - * Retrieves information about users in the native realm and built-in users. + * Get users * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-user.html * * @param array{ * username?: string|array, // A comma-separated list of usernames @@ -1441,9 +1445,9 @@ public function getUser(?array $params = null) /** - * Retrieves security privileges for the logged in user. + * Get user privileges * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-user-privileges.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1476,9 +1480,9 @@ public function getUserPrivileges(?array $params = null) /** - * Retrieves user profiles for the given unique ID(s). + * Get a user profile * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-profile.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-get-user-profile.html * * @param array{ * uid: string|array, // (REQUIRED) A comma-separated list of unique identifier for user profiles @@ -1515,9 +1519,9 @@ public function getUserProfile(?array $params = null) /** - * Creates an API key on behalf of another user. + * Grant an API key * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-grant-api-key.html * * @param array{ * refresh?: string, // 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. @@ -1554,9 +1558,10 @@ public function grantApiKey(?array $params = null) /** - * Determines whether the specified user has a specified list of privileges. + * Check user privileges * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-has-privileges.html + * @group serverless * * @param array{ * user?: string, // Username @@ -1597,9 +1602,9 @@ public function hasPrivileges(?array $params = null) /** - * Determines whether the users associated with the specified profile IDs have all the requested privileges. + * Check user profile privileges * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges-user-profile.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-has-privileges-user-profile.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1635,9 +1640,10 @@ public function hasPrivilegesUserProfile(?array $params = null) /** - * Invalidates one or more API keys. + * Invalidate API keys * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-invalidate-api-key.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1673,9 +1679,9 @@ public function invalidateApiKey(?array $params = null) /** - * Invalidates one or more access tokens or refresh tokens. + * Invalidate a token * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-invalidate-token.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1711,9 +1717,9 @@ public function invalidateToken(?array $params = null) /** - * Exchanges an OpenID Connection authentication response message for an Elasticsearch access token and refresh token pair + * Authenticate OpenID Connect * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-authenticate.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-oidc-authenticate.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1749,9 +1755,9 @@ public function oidcAuthenticate(?array $params = null) /** - * Invalidates a refresh token and access token that was generated from the OpenID Connect Authenticate API + * Logout of OpenID Connect * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-logout.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-oidc-logout.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1787,9 +1793,9 @@ public function oidcLogout(?array $params = null) /** - * Creates an OAuth 2.0 authentication request as a URL string + * Prepare OpenID connect authentication * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-oidc-prepare-authentication.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-oidc-prepare-authentication.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1825,9 +1831,9 @@ public function oidcPrepareAuthentication(?array $params = null) /** - * Adds or updates application privileges. + * Create or update application privileges * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-privileges.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-put-privileges.html * * @param array{ * refresh?: string, // 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. @@ -1864,9 +1870,9 @@ public function putPrivileges(?array $params = null) /** - * Adds and updates roles in the native realm. + * Create or update roles * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-put-role.html * * @param array{ * name: string, // (REQUIRED) Role name @@ -1905,9 +1911,9 @@ public function putRole(?array $params = null) /** - * Creates and updates role mappings. + * Create or update role mappings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-put-role-mapping.html * * @param array{ * name: string, // (REQUIRED) Role-mapping name @@ -1946,9 +1952,9 @@ public function putRoleMapping(?array $params = null) /** - * Adds and updates users in the native realm. These users are commonly referred to as native users. + * Create or update users * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-put-user.html * * @param array{ * username: string, // (REQUIRED) The username of the User @@ -1987,9 +1993,10 @@ public function putUser(?array $params = null) /** - * Retrieves information for API keys using a subset of query DSL + * Find API keys with a query * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-query-api-key.html + * @group serverless * * @param array{ * with_limited_by?: bool, // flag to show the limited-by role descriptors of API Keys @@ -2027,9 +2034,9 @@ public function queryApiKeys(?array $params = null) /** - * Retrieves information for Roles using a subset of query DSL + * Find roles with a query * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-role.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-query-role.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -2064,9 +2071,9 @@ public function queryRole(?array $params = null) /** - * Retrieves information for Users using a subset of query DSL + * Find users with a query * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-user.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-query-user.html * * @param array{ * with_profile_uid?: bool, // flag to retrieve profile uid (if exists) associated with the user @@ -2102,9 +2109,9 @@ public function queryUser(?array $params = null) /** - * Exchanges a SAML Response message for an Elasticsearch access token and refresh token pair + * Authenticate SAML * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-saml-authenticate.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -2140,9 +2147,9 @@ public function samlAuthenticate(?array $params = null) /** - * Verifies the logout response sent from the SAML IdP + * Logout of SAML completely * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-saml-complete-logout.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -2178,9 +2185,9 @@ public function samlCompleteLogout(?array $params = null) /** - * Consumes a SAML LogoutRequest + * Invalidate SAML * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-saml-invalidate.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -2216,9 +2223,9 @@ public function samlInvalidate(?array $params = null) /** - * Invalidates an access token and a refresh token that were generated via the SAML Authenticate API + * Logout of SAML * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-saml-logout.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -2254,9 +2261,9 @@ public function samlLogout(?array $params = null) /** - * Creates a SAML authentication request + * Prepare SAML authentication * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-saml-prepare-authentication.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -2292,9 +2299,9 @@ public function samlPrepareAuthentication(?array $params = null) /** - * Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider + * Create SAML service provider metadata * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-saml-sp-metadata.html * * @param array{ * realm_name: string, // (REQUIRED) The name of the SAML realm to get the metadata for @@ -2331,9 +2338,9 @@ public function samlServiceProviderMetadata(?array $params = null) /** - * Get suggestions for user profiles that match specified search criteria. + * Suggest a user profile * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-suggest-user-profile.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-suggest-user-profile.html * * @param array{ * data?: string|array, // A comma-separated list of keys for which the corresponding application data are retrieved. @@ -2369,9 +2376,10 @@ public function suggestUserProfiles(?array $params = null) /** - * Updates attributes of an existing API key. + * Update an API key * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-api-key.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-update-api-key.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The ID of the API key to update @@ -2409,9 +2417,9 @@ public function updateApiKey(?array $params = null) /** - * Updates attributes of an existing cross-cluster API key. + * Update a cross-cluster API key * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-update-cross-cluster-api-key.html * * @param array{ * id: string, // (REQUIRED) The ID of the cross-cluster API key to update @@ -2449,9 +2457,9 @@ public function updateCrossClusterApiKey(?array $params = null) /** - * Update settings for the security system index + * Update security index settings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-settings.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-update-settings.html * * @param array{ * master_timeout?: int|string, // Timeout for connection to master @@ -2489,9 +2497,9 @@ public function updateSettings(?array $params = null) /** - * Update application specific data for the user profile of the given unique ID. + * Update user profile data * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-user-profile-data.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-update-user-profile-data.html * * @param array{ * uid: string, // (REQUIRED) An unique identifier of the user profile diff --git a/src/Endpoints/Shutdown.php b/src/Endpoints/Shutdown.php index 079954bfc..fc07a3d15 100644 --- a/src/Endpoints/Shutdown.php +++ b/src/Endpoints/Shutdown.php @@ -29,9 +29,9 @@ class Shutdown extends AbstractEndpoint { /** - * Removes a node from the shutdown list. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * Cancel node shutdown preparations * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-shutdown.html * * @param array{ * node_id: string, // (REQUIRED) The node id of node to be removed from the shutdown state @@ -70,9 +70,9 @@ public function deleteNode(?array $params = null) /** - * Retrieve status of a node or nodes that are currently marked as shutting down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * Get the shutdown status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-shutdown.html * * @param array{ * node_id?: string, // Which node for which to retrieve the shutdown status @@ -112,9 +112,9 @@ public function getNode(?array $params = null) /** - * Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * Prepare a node to be shut down * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-shutdown.html * * @param array{ * node_id: string, // (REQUIRED) The node id of node to be shut down diff --git a/src/Endpoints/Simulate.php b/src/Endpoints/Simulate.php index 20437ded2..b4eda7e35 100644 --- a/src/Endpoints/Simulate.php +++ b/src/Endpoints/Simulate.php @@ -29,9 +29,9 @@ class Simulate extends AbstractEndpoint { /** - * Simulates running ingest with example documents. + * Simulate data ingestion * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-ingest-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/simulate-ingest-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ diff --git a/src/Endpoints/Slm.php b/src/Endpoints/Slm.php index 0034a2f29..80d8e37ce 100644 --- a/src/Endpoints/Slm.php +++ b/src/Endpoints/Slm.php @@ -29,9 +29,9 @@ class Slm extends AbstractEndpoint { /** - * Deletes an existing snapshot lifecycle policy. + * Delete a policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-delete-policy.html * * @param array{ * policy_id: string, // (REQUIRED) The id of the snapshot lifecycle policy to remove @@ -69,9 +69,9 @@ public function deleteLifecycle(?array $params = null) /** - * Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time. + * Run a policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-execute-lifecycle.html * * @param array{ * policy_id: string, // (REQUIRED) The id of the snapshot lifecycle policy to be executed @@ -109,9 +109,9 @@ public function executeLifecycle(?array $params = null) /** - * Deletes any snapshots that are expired according to the policy's retention rules. + * Run a retention policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-execute-retention.html * * @param array{ * master_timeout?: int|string, // Explicit operation timeout for connection to master node @@ -146,9 +146,9 @@ public function executeRetention(?array $params = null) /** - * Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts. + * Get policy information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-get-policy.html * * @param array{ * policy_id?: string|array, // Comma-separated list of snapshot lifecycle policies to retrieve @@ -188,9 +188,9 @@ public function getLifecycle(?array $params = null) /** - * Returns global and policy-level statistics about actions taken by snapshot lifecycle management. + * Get snapshot lifecycle management statistics * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/slm-api-get-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-get-stats.html * * @param array{ * master_timeout?: int|string, // Explicit operation timeout for connection to master node @@ -225,9 +225,9 @@ public function getStats(?array $params = null) /** - * Retrieves the status of snapshot lifecycle management (SLM). + * Get the snapshot lifecycle management status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-get-status.html * * @param array{ * master_timeout?: int|string, // Explicit operation timeout for connection to master node @@ -262,9 +262,9 @@ public function getStatus(?array $params = null) /** - * Creates or updates a snapshot lifecycle policy. + * Create or update a policy * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-put-policy.html * * @param array{ * policy_id: string, // (REQUIRED) The id of the snapshot lifecycle policy @@ -275,7 +275,7 @@ public function getStatus(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The snapshot lifecycle policy definition to register. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The snapshot lifecycle policy definition to register. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -288,7 +288,7 @@ public function getStatus(?array $params = null) public function putLifecycle(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['policy_id'], $params); + $this->checkRequiredParameters(['policy_id','body'], $params); $url = '/_slm/policy/' . $this->encode($params['policy_id']); $method = 'PUT'; @@ -304,9 +304,9 @@ public function putLifecycle(?array $params = null) /** - * Turns on snapshot lifecycle management (SLM). + * Start snapshot lifecycle management * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-start.html * * @param array{ * master_timeout?: int|string, // Timeout for processing on master node @@ -341,9 +341,9 @@ public function start(?array $params = null) /** - * Turns off snapshot lifecycle management (SLM). + * Stop snapshot lifecycle management * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-stop.html * * @param array{ * master_timeout?: int|string, // Timeout for processing on master node diff --git a/src/Endpoints/Snapshot.php b/src/Endpoints/Snapshot.php index 68bb9acc5..d534f2bf1 100644 --- a/src/Endpoints/Snapshot.php +++ b/src/Endpoints/Snapshot.php @@ -29,9 +29,9 @@ class Snapshot extends AbstractEndpoint { /** - * Removes stale data from repository. + * Clean up the snapshot repository * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/clean-up-snapshot-repo-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clean-up-snapshot-repo-api.html * * @param array{ * repository: string, // (REQUIRED) A repository name @@ -69,9 +69,9 @@ public function cleanupRepository(?array $params = null) /** - * Clones indices from one snapshot into another snapshot in the same repository. + * Clone a snapshot * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clone-snapshot-api.html * * @param array{ * repository: string, // (REQUIRED) A repository name @@ -112,9 +112,9 @@ public function clone(?array $params = null) /** - * Creates a snapshot in a repository. + * Create a snapshot * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-snapshot-api.html * * @param array{ * repository: string, // (REQUIRED) A repository name @@ -155,9 +155,9 @@ public function create(?array $params = null) /** - * Creates a repository. + * Create or update a snapshot repository * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-snapshot-repo-api.html * * @param array{ * repository: string, // (REQUIRED) A repository name @@ -198,9 +198,9 @@ public function createRepository(?array $params = null) /** - * Deletes one or more snapshots. + * Delete snapshots * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-snapshot-api.html * * @param array{ * repository: string, // (REQUIRED) A repository name @@ -239,9 +239,9 @@ public function delete(?array $params = null) /** - * Deletes a repository. + * Delete snapshot repositories * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-snapshot-repo-api.html * * @param array{ * repository: string|array, // (REQUIRED) Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported. @@ -279,9 +279,9 @@ public function deleteRepository(?array $params = null) /** - * Returns information about a snapshot. + * Get snapshot information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-snapshot-api.html * * @param array{ * repository: string, // (REQUIRED) A repository name @@ -331,9 +331,9 @@ public function get(?array $params = null) /** - * Returns information about a repository. + * Get snapshot repository information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-snapshot-repo-api.html * * @param array{ * repository?: string|array, // A comma-separated list of repository names @@ -373,9 +373,9 @@ public function getRepository(?array $params = null) /** - * Analyzes a repository for correctness and performance + * Analyze a snapshot repository * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/repo-analysis-api.html * * @param array{ * repository: string, // (REQUIRED) A repository name @@ -385,7 +385,7 @@ public function getRepository(?array $params = null) * read_node_count?: int, // Number of nodes on which to read a blob after writing. Defaults to 10. * early_read_node_count?: int, // Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the 'rare_action_probability' parameter is also relevant. Defaults to 2. * seed?: int, // Seed for the random number generator used to create the test workload. Defaults to a random value. - * rare_action_probability?: int, // Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02. + * rare_action_probability?: float, // Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02. * max_blob_size?: string, // Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'. * max_total_data_size?: string, // Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'. * timeout?: int|string, // Explicit operation timeout. Defaults to '30s'. @@ -423,9 +423,9 @@ public function repositoryAnalyze(?array $params = null) /** - * Restores a snapshot. + * Restore a snapshot * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/restore-snapshot-api.html * * @param array{ * repository: string, // (REQUIRED) A repository name @@ -466,9 +466,9 @@ public function restore(?array $params = null) /** - * Returns information about the status of a snapshot. + * Get the snapshot status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-snapshot-status-api.html * * @param array{ * repository?: string, // A repository name @@ -512,9 +512,9 @@ public function status(?array $params = null) /** - * Verifies a repository. + * Verify a snapshot repository * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/verify-snapshot-repo-api.html * * @param array{ * repository: string, // (REQUIRED) A repository name diff --git a/src/Endpoints/Sql.php b/src/Endpoints/Sql.php index e7bfad528..70f0e2131 100644 --- a/src/Endpoints/Sql.php +++ b/src/Endpoints/Sql.php @@ -29,9 +29,10 @@ class Sql extends AbstractEndpoint { /** - * Clears the SQL cursor + * Clear an SQL search cursor * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clear-sql-cursor-api.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -67,9 +68,10 @@ public function clearCursor(?array $params = null) /** - * Deletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it. + * Delete an async SQL search * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-async-sql-search-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-async-sql-search-api.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The async search ID @@ -105,9 +107,10 @@ public function deleteAsync(?array $params = null) /** - * Returns the current status and available results for an async SQL search or stored synchronous SQL search + * Get async SQL search results * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-async-sql-search-api.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The async search ID @@ -147,9 +150,10 @@ public function getAsync(?array $params = null) /** - * Returns the current status of an async SQL search or a stored synchronous SQL search + * Get the async SQL search status * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-status-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-async-sql-search-status-api.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The async search ID @@ -185,9 +189,10 @@ public function getAsyncStatus(?array $params = null) /** - * Executes a SQL request + * Get SQL search results * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/sql-search-api.html + * @group serverless * * @param array{ * format?: string, // a short version of the Accept header, e.g. json, yaml @@ -224,9 +229,10 @@ public function query(?array $params = null) /** - * Translates SQL into Elasticsearch queries + * Translate SQL into Elasticsearch queries * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/sql-translate-api.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) diff --git a/src/Endpoints/Ssl.php b/src/Endpoints/Ssl.php index 01ebcdcdc..a7588273d 100644 --- a/src/Endpoints/Ssl.php +++ b/src/Endpoints/Ssl.php @@ -29,9 +29,9 @@ class Ssl extends AbstractEndpoint { /** - * Retrieves information about the X.509 certificates used to encrypt communications in the cluster. + * Get SSL certificates * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/security-api-ssl.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) diff --git a/src/Endpoints/Streams.php b/src/Endpoints/Streams.php index 0bbe1c304..f04bd8889 100644 --- a/src/Endpoints/Streams.php +++ b/src/Endpoints/Streams.php @@ -31,7 +31,8 @@ class Streams extends AbstractEndpoint /** * Disable the Logs Streams feature for this cluster * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-logs-disable.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch#TODO + * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * timeout?: int|string, // Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -68,7 +69,8 @@ public function logsDisable(?array $params = null) /** * Enable the Logs Streams feature for this cluster * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-logs-enable.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch#TODO + * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * timeout?: int|string, // Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. @@ -105,9 +107,11 @@ public function logsEnable(?array $params = null) /** * Return the current status of the streams feature for each streams type * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-status.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch#TODO + * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ + * master_timeout?: int|string, // Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) @@ -127,7 +131,7 @@ public function status(?array $params = null) $url = '/_streams/status'; $method = 'GET'; - $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['master_timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; diff --git a/src/Endpoints/Synonyms.php b/src/Endpoints/Synonyms.php index 992b48c9c..9e151305f 100644 --- a/src/Endpoints/Synonyms.php +++ b/src/Endpoints/Synonyms.php @@ -29,9 +29,10 @@ class Synonyms extends AbstractEndpoint { /** - * Deletes a synonym set + * Delete a synonym set * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-synonyms-set.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-synonyms-set.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The id of the synonyms set to be deleted @@ -67,9 +68,10 @@ public function deleteSynonym(?array $params = null) /** - * Deletes a synonym rule in a synonym set + * Delete a synonym rule * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-synonym-rule.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-synonym-rule.html + * @group serverless * * @param array{ * set_id: string, // (REQUIRED) The id of the synonym set to be updated @@ -107,9 +109,10 @@ public function deleteSynonymRule(?array $params = null) /** - * Retrieves a synonym set + * Get a synonym set * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-synonyms-set.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-synonyms-set.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The name of the synonyms set to be retrieved @@ -147,9 +150,10 @@ public function getSynonym(?array $params = null) /** - * Retrieves a synonym rule from a synonym set + * Get a synonym rule * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-synonym-rule.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-synonym-rule.html + * @group serverless * * @param array{ * set_id: string, // (REQUIRED) The id of the synonym set to retrieve the synonym rule from @@ -187,9 +191,10 @@ public function getSynonymRule(?array $params = null) /** - * Retrieves a summary of all defined synonym sets + * Get all synonym sets * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-synonyms-sets.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-synonyms-set.html + * @group serverless * * @param array{ * from?: int, // Starting offset @@ -224,9 +229,10 @@ public function getSynonymsSets(?array $params = null) /** - * Creates or updates a synonyms set + * Create or update a synonym set * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-synonyms-set.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-synonyms-set.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The id of the synonyms set to be created or updated @@ -264,9 +270,10 @@ public function putSynonym(?array $params = null) /** - * Creates or updates a synonym rule in a synonym set + * Create or update a synonym rule * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-synonym-rule.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-synonym-rule.html + * @group serverless * * @param array{ * set_id: string, // (REQUIRED) The id of the synonym set to be updated with the synonym rule diff --git a/src/Endpoints/Tasks.php b/src/Endpoints/Tasks.php index 5952ae53a..215f042aa 100644 --- a/src/Endpoints/Tasks.php +++ b/src/Endpoints/Tasks.php @@ -29,9 +29,9 @@ class Tasks extends AbstractEndpoint { /** - * Cancels a task, if it can be cancelled through an API. + * Cancel a task * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/tasks.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -74,9 +74,10 @@ public function cancel(?array $params = null) /** - * Returns information about a task. + * Get task information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/tasks.html + * @group serverless * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -115,9 +116,9 @@ public function get(?array $params = null) /** - * Returns a list of tasks. + * Get all tasks * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/tasks.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ diff --git a/src/Endpoints/TextStructure.php b/src/Endpoints/TextStructure.php index 079b61171..39c43acd1 100644 --- a/src/Endpoints/TextStructure.php +++ b/src/Endpoints/TextStructure.php @@ -29,9 +29,9 @@ class TextStructure extends AbstractEndpoint { /** - * Finds the structure of a text field in an index. + * Find the structure of a text field * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-field-structure.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/find-field-structure.html * * @param array{ * index?: string, // The index containing the analyzed field @@ -44,7 +44,7 @@ class TextStructure extends AbstractEndpoint * quote?: string, // Optional parameter to specify the quote character for a delimited file - must be a single character * should_trim_fields?: bool, // Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them * grok_pattern?: string, // Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file - * ecs_compatibility?: string, // Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled' + * ecs_compatibility?: string, // The mode of compatibility with ECS compliant Grok patterns.Use this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern.This setting primarily has an impact when a whole message Grok pattern such as `%{CATALINALOG}` matches the input.If the structure finder identifies a common structure but has no idea of the meaning then generic field names such as `path`, `ipaddress`, `field1`, and `field2` are used in the `grok_pattern` output.The intention in that situation is that a user who knows the meanings will rename the fields before using them. * timestamp_field?: string, // Optional parameter to specify the timestamp field in the file * timestamp_format?: string, // Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format * explain?: bool, // Whether to include a commentary on how the structure was derived @@ -79,9 +79,9 @@ public function findFieldStructure(?array $params = null) /** - * Finds the structure of a list of messages. The messages must contain data that is suitable to be ingested into Elasticsearch. + * Find the structure of text messages * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-message-structure.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/find-message-structure.html * * @param array{ * timeout?: int|string, // Timeout after which the analysis will be aborted @@ -91,7 +91,7 @@ public function findFieldStructure(?array $params = null) * quote?: string, // Optional parameter to specify the quote character for a delimited file - must be a single character * should_trim_fields?: bool, // Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them * grok_pattern?: string, // Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file - * ecs_compatibility?: string, // Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled' + * ecs_compatibility?: string, // The mode of compatibility with ECS compliant Grok patterns.Use this parameter to specify whether to use ECS Grok patterns instead of legacy ones when the structure finder creates a Grok pattern.This setting primarily has an impact when a whole message Grok pattern such as `%{CATALINALOG}` matches the input.If the structure finder identifies a common structure but has no idea of meaning then generic field names such as `path`, `ipaddress`, `field1`, and `field2` are used in the `grok_pattern` output, with the intention that a user who knows the meanings rename these fields before using it. * timestamp_field?: string, // Optional parameter to specify the timestamp field in the file * timestamp_format?: string, // Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format * explain?: bool, // Whether to include a commentary on how the structure was derived @@ -128,9 +128,9 @@ public function findMessageStructure(?array $params = null) /** - * Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch. + * Find the structure of a text file * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/find-structure.html * * @param array{ * lines_to_sample?: int, // How many lines of the file should be included in the analysis @@ -181,9 +181,9 @@ public function findStructure(?array $params = null) /** - * Tests a Grok pattern on some text. + * Test a Grok pattern * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/test-grok-pattern.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/test-grok-pattern.html * * @param array{ * ecs_compatibility?: string, // Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled' diff --git a/src/Endpoints/Transform.php b/src/Endpoints/Transform.php index 0c5f9f235..c005678f0 100644 --- a/src/Endpoints/Transform.php +++ b/src/Endpoints/Transform.php @@ -29,9 +29,10 @@ class Transform extends AbstractEndpoint { /** - * Deletes an existing transform. + * Delete a transform * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-transform.html + * @group serverless * * @param array{ * transform_id: string, // (REQUIRED) The id of the transform to delete @@ -70,9 +71,10 @@ public function deleteTransform(?array $params = null) /** - * Retrieves transform usage information for transform nodes. + * Retrieves transform usage information for transform nodes * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-node-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-node-stats.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -105,9 +107,10 @@ public function getNodeStats(?array $params = null) /** - * Retrieves configuration information for transforms. + * Get transforms * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-transform.html + * @group serverless * * @param array{ * transform_id?: string, // The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms @@ -149,9 +152,10 @@ public function getTransform(?array $params = null) /** - * Retrieves usage information for transforms. + * Get transform stats * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-transform-stats.html + * @group serverless * * @param array{ * transform_id: string, // (REQUIRED) The id of the transform for which to get stats. '_all' or '*' implies all transforms @@ -191,9 +195,10 @@ public function getTransformStats(?array $params = null) /** - * Previews a transform. + * Preview a transform * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/preview-transform.html + * @group serverless * * @param array{ * transform_id?: string, // The id of the transform to preview. @@ -234,9 +239,10 @@ public function previewTransform(?array $params = null) /** - * Instantiates a transform. + * Create a transform * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-transform.html + * @group serverless * * @param array{ * transform_id: string, // (REQUIRED) The id of the new transform. @@ -276,9 +282,10 @@ public function putTransform(?array $params = null) /** - * Resets an existing transform. + * Reset a transform * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/reset-transform.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/reset-transform.html + * @group serverless * * @param array{ * transform_id: string, // (REQUIRED) The id of the transform to reset @@ -316,9 +323,10 @@ public function resetTransform(?array $params = null) /** - * Schedules now a transform. + * Schedule a transform to start now * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/schedule-now-transform.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/schedule-now-transform.html + * @group serverless * * @param array{ * transform_id: string, // (REQUIRED) The id of the transform. @@ -356,9 +364,47 @@ public function scheduleNowTransform(?array $params = null) /** - * Starts one or more transforms. + * Set upgrade_mode for transform indices * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-set-upgrade-mode + * + * @param array{ + * enabled?: bool, // Whether to enable upgrade_mode Transform setting or not. Defaults to false. + * timeout?: int|string, // Controls the time to wait before action times out. Defaults to 30 seconds + * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) + * human?: bool, // Return human readable values for statistics. (DEFAULT: true) + * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) + * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. + * } $params + * + * @throws NoNodeAvailableException if all the hosts are offline + * @throws ClientResponseException if the status code of response is 4xx + * @throws ServerResponseException if the status code of response is 5xx + * + * @return Elasticsearch|Promise + */ + public function setUpgradeMode(?array $params = null) + { + $params = $params ?? []; + $url = '/_transform/set_upgrade_mode'; + $method = 'POST'; + + $url = $this->addQueryString($url, $params, ['enabled','timeout','pretty','human','error_trace','source','filter_path']); + $headers = [ + 'Accept' => 'application/json', + ]; + $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); + $request = $this->addOtelAttributes($params, [], $request, 'transform.set_upgrade_mode'); + return $this->client->sendRequest($request); + } + + + /** + * Start a transform + * + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/start-transform.html + * @group serverless * * @param array{ * transform_id: string, // (REQUIRED) The id of the transform to start @@ -396,9 +442,10 @@ public function startTransform(?array $params = null) /** - * Stops one or more transforms. + * Stop transforms * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/stop-transform.html + * @group serverless * * @param array{ * transform_id: string, // (REQUIRED) The id of the transform to stop @@ -439,9 +486,10 @@ public function stopTransform(?array $params = null) /** - * Updates certain properties of a transform. + * Update a transform * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-transform-update-transform + * @group serverless * * @param array{ * transform_id: string, // (REQUIRED) The id of the transform. @@ -481,9 +529,9 @@ public function updateTransform(?array $params = null) /** - * Upgrades all transforms. + * Upgrade all transforms * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/upgrade-transforms.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-transform-upgrade-transforms * * @param array{ * dry_run?: bool, // Whether to only check for updates but don't execute diff --git a/src/Endpoints/Watcher.php b/src/Endpoints/Watcher.php index 9ff0b0a28..77fb5c706 100644 --- a/src/Endpoints/Watcher.php +++ b/src/Endpoints/Watcher.php @@ -29,9 +29,9 @@ class Watcher extends AbstractEndpoint { /** - * Acknowledges a watch, manually throttling the execution of the watch's actions. + * Acknowledge a watch * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-ack-watch * * @param array{ * watch_id: string, // (REQUIRED) Watch ID @@ -72,9 +72,9 @@ public function ackWatch(?array $params = null) /** - * Activates a currently inactive watch. + * Activate a watch * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-activate-watch * * @param array{ * watch_id: string, // (REQUIRED) Watch ID @@ -110,9 +110,9 @@ public function activateWatch(?array $params = null) /** - * Deactivates a currently active watch. + * Deactivate a watch * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-deactivate-watch * * @param array{ * watch_id: string, // (REQUIRED) Watch ID @@ -148,9 +148,9 @@ public function deactivateWatch(?array $params = null) /** - * Removes a watch from Watcher. + * Delete a watch * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-delete-watch * * @param array{ * id: string, // (REQUIRED) Watch ID @@ -186,9 +186,9 @@ public function deleteWatch(?array $params = null) /** - * Forces the execution of a stored watch. + * Run a watch * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-execute-watch * * @param array{ * id?: string, // Watch ID @@ -229,9 +229,9 @@ public function executeWatch(?array $params = null) /** - * Retrieve settings for the watcher system index + * Get Watcher index settings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-settings.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-get-settings * * @param array{ * master_timeout?: int|string, // Specify timeout for connection to master @@ -266,9 +266,9 @@ public function getSettings(?array $params = null) /** - * Retrieves a watch by its ID. + * Get a watch * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-get-watch * * @param array{ * id: string, // (REQUIRED) Watch ID @@ -304,9 +304,9 @@ public function getWatch(?array $params = null) /** - * Creates a new watch, or updates an existing one. + * Create or update a watch * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-put-watch * * @param array{ * id: string, // (REQUIRED) Watch ID @@ -319,7 +319,7 @@ public function getWatch(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The watch. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The watch. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -332,7 +332,7 @@ public function getWatch(?array $params = null) public function putWatch(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['id'], $params); + $this->checkRequiredParameters(['id','body'], $params); $url = '/_watcher/watch/' . $this->encode($params['id']); $method = 'PUT'; @@ -348,9 +348,9 @@ public function putWatch(?array $params = null) /** - * Retrieves stored watches. + * Query watches * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-query-watches.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-query-watches * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -385,9 +385,9 @@ public function queryWatches(?array $params = null) /** - * Starts Watcher if it is not already running. + * Start the watch service * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-start * * @param array{ * master_timeout?: int|string, // Specify timeout for connection to master @@ -421,9 +421,9 @@ public function start(?array $params = null) /** - * Retrieves the current Watcher metrics. + * Get Watcher statistics * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-stats * * @param array{ * metric?: string|array, // Controls what additional stat metrics should be include in the response @@ -462,9 +462,9 @@ public function stats(?array $params = null) /** - * Stops Watcher if it is running. + * Stop the watch service * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-stop * * @param array{ * master_timeout?: int|string, // Specify timeout for connection to master @@ -498,9 +498,9 @@ public function stop(?array $params = null) /** - * Update settings for the watcher system index + * Update Watcher index settings * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-update-settings.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-update-settings * * @param array{ * timeout?: int|string, // Specify timeout for waiting for acknowledgement from all nodes diff --git a/src/Endpoints/Xpack.php b/src/Endpoints/Xpack.php index 045660747..f6cf07bd6 100644 --- a/src/Endpoints/Xpack.php +++ b/src/Endpoints/Xpack.php @@ -29,9 +29,9 @@ class Xpack extends AbstractEndpoint { /** - * Retrieves information about the installed X-Pack features. + * Get information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/info-api.html * * @param array{ * human?: bool, // Defines whether additional human-readable information is included in the response. In particular, it adds descriptions and a tag line. The default value is true. @@ -67,9 +67,9 @@ public function info(?array $params = null) /** - * Retrieves usage information about the installed X-Pack features. + * Get usage information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html + * @link https://www.elastic.co/docs/api/doc/elasticsearch/v8/group/endpoint-xpack * * @param array{ * master_timeout?: int|string, // Specify timeout for watch write operation diff --git a/src/Traits/ClientEndpointsTrait.php b/src/Traits/ClientEndpointsTrait.php index 5a060f33d..9dc2357fa 100644 --- a/src/Traits/ClientEndpointsTrait.php +++ b/src/Traits/ClientEndpointsTrait.php @@ -29,23 +29,23 @@ trait ClientEndpointsTrait { /** - * Allows to perform multiple index/update/delete operations in a single request. + * Bulk index or delete documents * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-bulk.html + * @group serverless * * @param array{ * index?: string, // Default index for items which don't provide one * wait_for_active_shards?: string, // Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * refresh?: string, // If `true` 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` (the default) then do nothing with refreshes. - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * timeout?: int|string, // Explicit operation timeout - * type?: string, // Default document type for items which don't provide one * _source?: string|array, // True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request * _source_excludes?: string|array, // Default list of fields to exclude from the returned _source field, can be overridden on each sub-request * _source_includes?: string|array, // Default list of fields to extract and return from the _source field, can be overridden on each sub-request * pipeline?: string, // The pipeline id to preprocess incoming documents with - * require_alias?: bool, // Sets require_alias for all incoming documents. Defaults to unset (false) - * require_data_stream?: bool, // When true, requires the destination to be a data stream (existing or to-be-created). Default is false + * require_alias?: bool, // If true, the request's actions must target an index alias. Defaults to false. + * require_data_stream?: bool, // If true, the request's actions must target a data stream (existing or to-be-created). Default to false * list_executed_pipelines?: bool, // Sets list_executed_pipelines for all incoming documents. Defaults to unset (false) * include_source_on_error?: bool, // True or false if to include the document source in the error message in case of parsing errors. Defaults to true. * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -73,7 +73,7 @@ public function bulk(?array $params = null) $url = '/_bulk'; $method = 'POST'; } - $url = $this->addQueryString($url, $params, ['wait_for_active_shards','refresh','routing','timeout','type','_source','_source_excludes','_source_includes','pipeline','require_alias','require_data_stream','list_executed_pipelines','include_source_on_error','pretty','human','error_trace','source','filter_path']); + $url = $this->addQueryString($url, $params, ['wait_for_active_shards','refresh','routing','timeout','_source','_source_excludes','_source_includes','pipeline','require_alias','require_data_stream','list_executed_pipelines','include_source_on_error','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/x-ndjson', @@ -85,9 +85,10 @@ public function bulk(?array $params = null) /** - * Explicitly clears the search context for a scroll. + * Clear a scrolling search * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clear-scroll-api.html + * @group serverless * * @param array{ * scroll_id?: string|array, // A comma-separated list of scroll IDs to clear @@ -129,7 +130,8 @@ public function clearScroll(?array $params = null) /** * Close a point in time * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/point-in-time-api.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -137,7 +139,7 @@ public function clearScroll(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // a point-in-time id to close. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) a point-in-time id to close. If body is a string must be a valid JSON. * } $params * * @throws NoNodeAvailableException if all the hosts are offline @@ -149,6 +151,7 @@ public function clearScroll(?array $params = null) public function closePointInTime(?array $params = null) { $params = $params ?? []; + $this->checkRequiredParameters(['body'], $params); $url = '/_pit'; $method = 'DELETE'; @@ -164,17 +167,18 @@ public function closePointInTime(?array $params = null) /** - * Returns number of documents matching a query. + * Count search results * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-count.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of indices to restrict the results * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * ignore_throttled?: bool, // Whether specified concrete, expanded or aliased indices should be ignored when throttled * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. - * min_score?: int, // Include only documents with a specific `_score` value in the result + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * min_score?: float, // Include only documents with a specific `_score` value in the result * preference?: string, // Specify the node or shard the operation should be performed on (default: random) * routing?: string|array, // A comma-separated list of specific routing values * q?: string, // Query in the Lucene query string syntax @@ -220,18 +224,17 @@ public function count(?array $params = null) /** - * Creates a new document in the index. - * - * Returns a 409 response when a document with a same ID already exists in the index. + * Create a new document in the index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-index_.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) Document ID * index: string, // (REQUIRED) The name of the index * wait_for_active_shards?: string, // Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * refresh?: string, // If `true` 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` (the default) then do nothing with refreshes. - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * timeout?: int|string, // Explicit operation timeout * version?: int, // Explicit version number for concurrency control * version_type?: string, // Specific version type @@ -273,16 +276,17 @@ public function create(?array $params = null) /** - * Removes a document from the index. + * Delete a document * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-delete.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The document ID * index: string, // (REQUIRED) The name of the index * wait_for_active_shards?: string, // Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * refresh?: string, // If `true` 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` (the default) then do nothing with refreshes. - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * timeout?: int|string, // Explicit operation timeout * if_seq_no?: int, // only perform the delete operation if the last operation that has changed the document has the specified sequence number * if_primary_term?: int, // only perform the delete operation if the last operation that has changed the document has the specified primary term @@ -320,9 +324,10 @@ public function delete(?array $params = null) /** - * Deletes documents matching the provided query. + * Delete documents * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-delete-by-query.html + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices @@ -334,7 +339,7 @@ public function delete(?array $params = null) * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * conflicts?: string, // What to do when the delete by query hits version conflicts? - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * lenient?: bool, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored * preference?: string, // Specify the node or shard the operation should be performed on (default: random) * q?: string, // Query in the Lucene query string syntax @@ -389,9 +394,9 @@ public function deleteByQuery(?array $params = null) /** - * Changes the number of requests per second for a particular Delete By Query operation. + * Throttle a delete by query operation * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-delete-by-query.html#docs-delete-by-query-rethrottle * * @param array{ * task_id: string, // (REQUIRED) The task id to rethrottle @@ -428,9 +433,10 @@ public function deleteByQueryRethrottle(?array $params = null) /** - * Deletes a script. + * Delete a script or search template * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-stored-script-api.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) Script ID @@ -468,9 +474,10 @@ public function deleteScript(?array $params = null) /** - * Returns information about whether a document exists in an index. + * Check a document * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-get.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The document ID @@ -479,7 +486,7 @@ public function deleteScript(?array $params = null) * preference?: string, // Specify the node or shard the operation should be performed on (default: random) * realtime?: bool, // Specify whether to perform the operation in realtime or search mode * refresh?: bool, // Refresh the shard containing the document before performing the operation - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * _source?: string|array, // True or false to return the _source field or not, or a list of fields to return * _source_excludes?: string|array, // A list of fields to exclude from the returned _source field * _source_includes?: string|array, // A list of fields to extract and return from the _source field @@ -517,9 +524,10 @@ public function exists(?array $params = null) /** - * Returns information about whether a document source exists in an index. + * Check for a document source * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-get.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The document ID @@ -527,7 +535,7 @@ public function exists(?array $params = null) * preference?: string, // Specify the node or shard the operation should be performed on (default: random) * realtime?: bool, // Specify whether to perform the operation in realtime or search mode * refresh?: bool, // Refresh the shard containing the document before performing the operation - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * _source?: string|array, // True or false to return the _source field or not, or a list of fields to return * _source_excludes?: string|array, // A list of fields to exclude from the returned _source field * _source_includes?: string|array, // A list of fields to extract and return from the _source field @@ -565,9 +573,10 @@ public function existsSource(?array $params = null) /** - * Returns information about why a specific matches (or doesn't match) a query. + * Explain a document match result * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-explain.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The document ID @@ -580,7 +589,7 @@ public function existsSource(?array $params = null) * lenient?: bool, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored * preference?: string, // Specify the node or shard the operation should be performed on (default: random) * q?: string, // Query in the Lucene query string syntax - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * _source?: string|array, // True or false to return the _source field or not, or a list of fields to return * _source_excludes?: string|array, // A list of fields to exclude from the returned _source field * _source_includes?: string|array, // A list of fields to extract and return from the _source field @@ -618,16 +627,17 @@ public function explain(?array $params = null) /** - * Returns the information about the capabilities of fields among multiple indices. + * Get the field capabilities * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-field-caps.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * fields?: string|array, // A comma-separated list of field names * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * include_unmapped?: bool, // Indicates whether unmapped fields should be included in the response. * filters?: string|array, // An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent * types?: string|array, // Only return results for fields that have one of the types in the list @@ -668,9 +678,10 @@ public function fieldCaps(?array $params = null) /** - * Returns a document. + * Get a document by its ID * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-get.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The document ID @@ -680,7 +691,7 @@ public function fieldCaps(?array $params = null) * preference?: string, // Specify the node or shard the operation should be performed on (default: random) * realtime?: bool, // Specify whether to perform the operation in realtime or search mode * refresh?: bool, // Refresh the shard containing the document before performing the operation - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * _source?: string|array, // True or false to return the _source field or not, or a list of fields to return * _source_excludes?: string|array, // A list of fields to exclude from the returned _source field * _source_includes?: string|array, // A list of fields to extract and return from the _source field @@ -718,9 +729,10 @@ public function get(?array $params = null) /** - * Returns a script. + * Get a script or search template * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-stored-script-api.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) Script ID @@ -757,9 +769,9 @@ public function getScript(?array $params = null) /** - * Returns all script contexts. + * Get script contexts * - * @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-script-contexts-api.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -792,9 +804,9 @@ public function getScriptContext(?array $params = null) /** - * Returns available script types, languages and contexts + * Get script languages * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-script-languages-api.html * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -827,9 +839,10 @@ public function getScriptLanguages(?array $params = null) /** - * Returns the source of a document. + * Get a document's source * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-get.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) The document ID @@ -837,7 +850,7 @@ public function getScriptLanguages(?array $params = null) * preference?: string, // Specify the node or shard the operation should be performed on (default: random) * realtime?: bool, // Specify whether to perform the operation in realtime or search mode * refresh?: bool, // Refresh the shard containing the document before performing the operation - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * _source?: string|array, // True or false to return the _source field or not, or a list of fields to return * _source_excludes?: string|array, // A list of fields to exclude from the returned _source field * _source_includes?: string|array, // A list of fields to extract and return from the _source field @@ -875,9 +888,9 @@ public function getSource(?array $params = null) /** - * Returns the health of the cluster. + * Get the cluster health * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/health-api.html * * @param array{ * feature?: string, // A feature of the cluster, as returned by the top-level health API @@ -918,9 +931,10 @@ public function healthReport(?array $params = null) /** - * Creates or updates a document in an index. + * Create or update a document in an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-index_.html + * @group serverless * * @param array{ * id?: string, // Document ID @@ -928,7 +942,7 @@ public function healthReport(?array $params = null) * wait_for_active_shards?: string, // Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * op_type?: string, // Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID * refresh?: string, // If `true` 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` (the default) then do nothing with refreshes. - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * timeout?: int|string, // Explicit operation timeout * version?: int, // Explicit version number for concurrency control * version_type?: string, // Specific version type @@ -976,9 +990,10 @@ public function index(?array $params = null) /** - * Returns basic information about the cluster. + * Get cluster info * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/rest-api-root.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1011,9 +1026,9 @@ public function info(?array $params = null) /** - * Performs a kNN search. + * Run a knn search * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/knn-search-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -1024,7 +1039,7 @@ public function info(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The search definition. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The search definition. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -1037,7 +1052,7 @@ public function info(?array $params = null) public function knnSearch(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['index'], $params); + $this->checkRequiredParameters(['index','body'], $params); $url = '/' . $this->encode($this->convertValue($params['index'])) . '/_knn_search'; $method = empty($params['body']) ? 'GET' : 'POST'; @@ -1053,9 +1068,10 @@ public function knnSearch(?array $params = null) /** - * Allows to get multiple documents in one request. + * Get multiple documents * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-multi-get.html + * @group serverless * * @param array{ * index?: string, // The name of the index @@ -1064,7 +1080,7 @@ public function knnSearch(?array $params = null) * preference?: string, // Specify the node or shard the operation should be performed on (default: random) * realtime?: bool, // Specify whether to perform the operation in realtime or search mode * refresh?: bool, // Refresh the shard containing the document before performing the operation - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * _source?: string|array, // True or false to return the _source field or not, or a list of fields to return * _source_excludes?: string|array, // A list of fields to exclude from the returned _source field * _source_includes?: string|array, // A list of fields to extract and return from the _source field @@ -1105,23 +1121,24 @@ public function mget(?array $params = null) /** - * Allows to execute several search operations in one request. + * Run multiple searches * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-multi-search.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names to use as default * search_type?: string, // Search operation type * max_concurrent_searches?: int, // Controls the maximum number of concurrent searches the multi search api will execute * typed_keys?: bool, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response - * pre_filter_shard_size?: int, // A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + * pre_filter_shard_size?: int, // A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. * max_concurrent_shard_requests?: int, // The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests * rest_total_hits_as_int?: bool, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response * ccs_minimize_roundtrips?: bool, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * ignore_throttled?: bool, // Whether specified concrete, expanded or aliased indices should be ignored when throttled * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * routing?: string|array, // A comma-separated list of specific routing values * include_named_queries_score?: bool, // Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false) * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1161,9 +1178,10 @@ public function msearch(?array $params = null) /** - * Allows to execute several search template operations in one request. + * Run multiple templated searches * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/multi-search-template.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names to use as default @@ -1209,9 +1227,10 @@ public function msearchTemplate(?array $params = null) /** - * Returns multiple termvectors in one request. + * Get multiple term vectors * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-multi-termvectors.html + * @group serverless * * @param array{ * index?: string, // The index in which the document resides. @@ -1223,7 +1242,7 @@ public function msearchTemplate(?array $params = null) * positions?: bool, // Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". * payloads?: bool, // Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". * preference?: string, // Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". - * routing?: string, // Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". + * routing?: string|array, // Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". * realtime?: bool, // Specifies if requests are real-time as opposed to near-real-time (default: true). * version?: int, // Explicit version number for concurrency control * version_type?: string, // Specific version type @@ -1263,16 +1282,17 @@ public function mtermvectors(?array $params = null) /** - * Open a point in time that can be used in subsequent searches + * Open a point in time * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/point-in-time-api.html + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices * preference?: string, // Specify the node or shard the operation should be performed on (default: random) - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * keep_alive?: string, // Specific the time to live for the point in time * allow_partial_search_results?: bool, // Specify whether to tolerate shards missing when creating the point-in-time, or otherwise throw an exception. (default: false) * max_concurrent_shard_requests?: int, // The number of concurrent shard requests per node executed concurrently when opening this point-in-time. This value should be used to limit the impact of opening the point-in-time on the cluster @@ -1310,9 +1330,10 @@ public function openPointInTime(?array $params = null) /** - * Returns whether the cluster is running. + * Ping the cluster * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster.html + * @group serverless * * @param array{ * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) @@ -1345,9 +1366,10 @@ public function ping(?array $params = null) /** - * Creates or updates a script. + * Create or update a script or search template * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-stored-script-api.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) Script ID @@ -1392,15 +1414,16 @@ public function putScript(?array $params = null) /** - * Allows to evaluate the quality of ranked search results over a set of typical search queries + * Evaluate ranked search results * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-rank-eval.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * search_type?: string, // Search operation type * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -1439,11 +1462,10 @@ public function rankEval(?array $params = null) /** - * Allows to copy documents from one index to another, optionally filtering the source - * documents by a query, changing the destination index settings, or fetching the - * documents from a remote cluster. + * Reindex documents * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-reindex.html + * @group serverless * * @param array{ * refresh?: bool, // Should the affected indexes be refreshed? @@ -1488,9 +1510,9 @@ public function reindex(?array $params = null) /** - * Changes the number of requests per second for a particular Reindex operation. + * Throttle a reindex operation * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-reindex.html * * @param array{ * task_id: string, // (REQUIRED) The task id to rethrottle @@ -1527,9 +1549,10 @@ public function reindexRethrottle(?array $params = null) /** - * Allows to use the Mustache language to pre-render a search definition. + * Render a search template * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/render-search-template-api.html + * @group serverless * * @param array{ * id?: string, // The id of the stored search template @@ -1538,7 +1561,7 @@ public function reindexRethrottle(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The search definition template and its params. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The search definition template and its params. If body is a string must be a valid JSON. * } $params * * @throws NoNodeAvailableException if all the hosts are offline @@ -1550,6 +1573,7 @@ public function reindexRethrottle(?array $params = null) public function renderSearchTemplate(?array $params = null) { $params = $params ?? []; + $this->checkRequiredParameters(['body'], $params); if (isset($params['id'])) { $url = '/_render/template/' . $this->encode($params['id']); $method = empty($params['body']) ? 'GET' : 'POST'; @@ -1569,9 +1593,10 @@ public function renderSearchTemplate(?array $params = null) /** - * Allows an arbitrary script to be executed and a result to be returned + * Run a script * - * @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html + * @link https://www.elastic.co/guide/en/elasticsearch/painless/8.19/painless-execute-api.html + * @group serverless * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ @@ -1580,7 +1605,7 @@ public function renderSearchTemplate(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // The script to execute. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) The script to execute. If body is a string must be a valid JSON. * } $params * * @throws NoNodeAvailableException if all the hosts are offline @@ -1592,6 +1617,7 @@ public function renderSearchTemplate(?array $params = null) public function scriptsPainlessExecute(?array $params = null) { $params = $params ?? []; + $this->checkRequiredParameters(['body'], $params); $url = '/_scripts/painless/_execute'; $method = empty($params['body']) ? 'GET' : 'POST'; @@ -1607,9 +1633,10 @@ public function scriptsPainlessExecute(?array $params = null) /** - * Allows to retrieve a large numbers of results from a single search request. + * Run a scrolling search * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/scroll-api.html + * @group serverless * * @param array{ * scroll_id?: string, // The scroll ID @@ -1651,9 +1678,10 @@ public function scroll(?array $params = null) /** - * Returns results matching a query. + * Run a search * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-search.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices @@ -1670,7 +1698,7 @@ public function scroll(?array $params = null) * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * ignore_throttled?: bool, // Whether specified concrete, expanded or aliased indices should be ignored when throttled * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * lenient?: bool, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored * preference?: string, // Specify the node or shard the operation should be performed on (default: random) * q?: string, // Query in the Lucene query string syntax @@ -1698,7 +1726,7 @@ public function scroll(?array $params = null) * request_cache?: bool, // Specify if request cache should be used for this request or not, defaults to index level setting * batched_reduce_size?: int, // The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. * max_concurrent_shard_requests?: int, // The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests - * pre_filter_shard_size?: int, // A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + * pre_filter_shard_size?: int, // A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. * rest_total_hits_as_int?: bool, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response * min_compatible_shard_node?: string, // The minimum compatible version that all shards involved in search should have for this request to be successful * include_named_queries_score?: bool, // Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false) @@ -1738,10 +1766,10 @@ public function search(?array $params = null) /** - * Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile. + * Search a vector tile * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html - * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-vector-tile-api.html + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) Comma-separated list of data streams, indices, or aliases to search @@ -1791,18 +1819,18 @@ public function searchMvt(?array $params = null) /** - * Returns information about the indices and shards that a search request would be executed against. + * Get the search shards * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-shards.html * * @param array{ * index?: string|array, // A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * preference?: string, // Specify the node or shard the operation should be performed on (default: random) - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * local?: bool, // Return local information, do not retrieve the state from master node (default: false) * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * master_timeout?: int|string, // Explicit operation timeout for connection to master node * pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false) * human?: bool, // Return human readable values for statistics. (DEFAULT: true) @@ -1838,16 +1866,17 @@ public function searchShards(?array $params = null) /** - * Allows to use the Mustache language to pre-render a search definition. + * Run a search with a search template * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-template-api.html + * @group serverless * * @param array{ * index?: string|array, // A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * ignore_throttled?: bool, // Whether specified concrete, expanded or aliased indices should be ignored when throttled * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * preference?: string, // Specify the node or shard the operation should be performed on (default: random) * routing?: string|array, // A comma-separated list of specific routing values * scroll?: int|string, // Specify how long a consistent view of the index should be maintained for scrolled search @@ -1894,9 +1923,10 @@ public function searchTemplate(?array $params = null) /** - * The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios. + * Get terms in an index * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-terms-enum.html + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices @@ -1905,7 +1935,7 @@ public function searchTemplate(?array $params = null) * error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false) * source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path?: string|array, // A comma-separated list of filters used to reduce the response. - * body?: string|array, // field name, string which is the prefix expected in matching terms, timeout and size for max number of results. If body is a string must be a valid JSON. + * body: string|array, // (REQUIRED) field name, string which is the prefix expected in matching terms, timeout and size for max number of results. If body is a string must be a valid JSON. * } $params * * @throws MissingParameterException if a required parameter is missing @@ -1918,7 +1948,7 @@ public function searchTemplate(?array $params = null) public function termsEnum(?array $params = null) { $params = $params ?? []; - $this->checkRequiredParameters(['index'], $params); + $this->checkRequiredParameters(['index','body'], $params); $url = '/' . $this->encode($this->convertValue($params['index'])) . '/_terms_enum'; $method = empty($params['body']) ? 'GET' : 'POST'; @@ -1934,9 +1964,10 @@ public function termsEnum(?array $params = null) /** - * Returns information and statistics about terms in the fields of a particular document. + * Get term vector information * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-termvectors.html + * @group serverless * * @param array{ * index: string, // (REQUIRED) The index in which the document resides. @@ -1948,7 +1979,7 @@ public function termsEnum(?array $params = null) * positions?: bool, // Specifies if term positions should be returned. * payloads?: bool, // Specifies if term payloads should be returned. * preference?: string, // Specify the node or shard the operation should be performed on (default: random). - * routing?: string, // Specific routing value. + * routing?: string|array, // Specific routing value. * realtime?: bool, // Specifies if request is real-time as opposed to near-real-time (default: true). * version?: int, // Explicit version number for concurrency control * version_type?: string, // Specific version type @@ -1990,9 +2021,10 @@ public function termvectors(?array $params = null) /** - * Updates a document with a script or partial document. + * Update a document * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-update.html + * @group serverless * * @param array{ * id: string, // (REQUIRED) Document ID @@ -2004,7 +2036,7 @@ public function termvectors(?array $params = null) * lang?: string, // The script language (default: painless) * refresh?: string, // If `true` 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` (the default) then do nothing with refreshes. * retry_on_conflict?: int, // Specify how many times should the operation be retried when a conflict occurs (default: 0) - * routing?: string, // Specific routing value + * routing?: string|array, // Specific routing value * timeout?: int|string, // Explicit operation timeout * if_seq_no?: int, // only perform the update operation if the last operation that has changed the document has the specified sequence number * if_primary_term?: int, // only perform the update operation if the last operation that has changed the document has the specified primary term @@ -2044,10 +2076,10 @@ public function update(?array $params = null) /** - * Performs an update on every document in the index without changing the source, - * for example to pick up a mapping change. + * Update documents * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-update-by-query.html + * @group serverless * * @param array{ * index: string|array, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices @@ -2059,7 +2091,7 @@ public function update(?array $params = null) * ignore_unavailable?: bool, // Whether specified concrete indices should be ignored when unavailable (missing or closed) * allow_no_indices?: bool, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) * conflicts?: string, // What to do when the update by query hits version conflicts? - * expand_wildcards?: string, // Whether to expand wildcard expression to concrete indices that are open, closed or both. + * expand_wildcards?: string|array, // Whether to expand wildcard expression to concrete indices that are open, closed or both. * lenient?: bool, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored * pipeline?: string, // Ingest pipeline to set on index requests made by this action. (default: none) * preference?: string, // Specify the node or shard the operation should be performed on (default: random) @@ -2116,9 +2148,9 @@ public function updateByQuery(?array $params = null) /** - * Changes the number of requests per second for a particular Update By Query operation. + * Throttle an update by query operation * - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html + * @link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-update-by-query.html#docs-update-by-query-rethrottle * * @param array{ * task_id: string, // (REQUIRED) The task id to rethrottle