1<?php 2/** 3 * Elasticsearch PHP client 4 * 5 * @link https://github.com/elastic/elasticsearch-php/ 6 * @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co) 7 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 8 * @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1 9 * 10 * Licensed to Elasticsearch B.V under one or more agreements. 11 * Elasticsearch B.V licenses this file to you under the Apache 2.0 License or 12 * the GNU Lesser General Public License, Version 2.1, at your option. 13 * See the LICENSE file in the project root for more information. 14 */ 15declare(strict_types = 1); 16 17namespace Elasticsearch\Namespaces; 18 19use Elasticsearch\Namespaces\AbstractNamespace; 20 21/** 22 * Class CatNamespace 23 * 24 * NOTE: this file is autogenerated using util/GenerateEndpoints.php 25 * and Elasticsearch 7.16.0-SNAPSHOT (dfc9a8e7563ed5f24b5210ed21ed92ae182cd0ee) 26 */ 27class CatNamespace extends AbstractNamespace 28{ 29 30 /** 31 * Shows information about currently configured aliases to indices including filter and routing infos. 32 * 33 * $params['name'] = (list) A comma-separated list of alias names to return 34 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 35 * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) 36 * $params['h'] = (list) Comma-separated list of column names to display 37 * $params['help'] = (boolean) Return help information (Default = false) 38 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 39 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 40 * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = all) 41 * 42 * @param array $params Associative array of parameters 43 * @return array 44 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html 45 */ 46 public function aliases(array $params = []) 47 { 48 $name = $this->extractArgument($params, 'name'); 49 50 $endpointBuilder = $this->endpoints; 51 $endpoint = $endpointBuilder('Cat\Aliases'); 52 $endpoint->setParams($params); 53 $endpoint->setName($name); 54 55 return $this->performRequest($endpoint); 56 } 57 /** 58 * Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using. 59 * 60 * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information 61 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 62 * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) 63 * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) 64 * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node 65 * $params['h'] = (list) Comma-separated list of column names to display 66 * $params['help'] = (boolean) Return help information (Default = false) 67 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 68 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 69 * 70 * @param array $params Associative array of parameters 71 * @return array 72 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html 73 */ 74 public function allocation(array $params = []) 75 { 76 $node_id = $this->extractArgument($params, 'node_id'); 77 78 $endpointBuilder = $this->endpoints; 79 $endpoint = $endpointBuilder('Cat\Allocation'); 80 $endpoint->setParams($params); 81 $endpoint->setNodeId($node_id); 82 83 return $this->performRequest($endpoint); 84 } 85 /** 86 * Provides quick access to the document count of the entire cluster, or individual indices. 87 * 88 * $params['index'] = (list) A comma-separated list of index names to limit the returned information 89 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 90 * $params['h'] = (list) Comma-separated list of column names to display 91 * $params['help'] = (boolean) Return help information (Default = false) 92 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 93 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 94 * 95 * @param array $params Associative array of parameters 96 * @return array 97 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html 98 */ 99 public function count(array $params = []) 100 { 101 $index = $this->extractArgument($params, 'index'); 102 103 $endpointBuilder = $this->endpoints; 104 $endpoint = $endpointBuilder('Cat\Count'); 105 $endpoint->setParams($params); 106 $endpoint->setIndex($index); 107 108 return $this->performRequest($endpoint); 109 } 110 /** 111 * Shows how much heap memory is currently being used by fielddata on every data node in the cluster. 112 * 113 * $params['fields'] = (list) A comma-separated list of fields to return the fielddata size 114 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 115 * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) 116 * $params['h'] = (list) Comma-separated list of column names to display 117 * $params['help'] = (boolean) Return help information (Default = false) 118 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 119 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 120 * 121 * @param array $params Associative array of parameters 122 * @return array 123 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html 124 */ 125 public function fielddata(array $params = []) 126 { 127 $fields = $this->extractArgument($params, 'fields'); 128 129 $endpointBuilder = $this->endpoints; 130 $endpoint = $endpointBuilder('Cat\Fielddata'); 131 $endpoint->setParams($params); 132 $endpoint->setFields($fields); 133 134 return $this->performRequest($endpoint); 135 } 136 /** 137 * Returns a concise representation of the cluster health. 138 * 139 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 140 * $params['h'] = (list) Comma-separated list of column names to display 141 * $params['help'] = (boolean) Return help information (Default = false) 142 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 143 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 144 * $params['ts'] = (boolean) Set to false to disable timestamping (Default = true) 145 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 146 * 147 * @param array $params Associative array of parameters 148 * @return array 149 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html 150 */ 151 public function health(array $params = []) 152 { 153 154 $endpointBuilder = $this->endpoints; 155 $endpoint = $endpointBuilder('Cat\Health'); 156 $endpoint->setParams($params); 157 158 return $this->performRequest($endpoint); 159 } 160 /** 161 * Returns help for the Cat APIs. 162 * 163 * $params['help'] = (boolean) Return help information (Default = false) 164 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 165 * 166 * @param array $params Associative array of parameters 167 * @return array 168 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html 169 */ 170 public function help(array $params = []) 171 { 172 173 $endpointBuilder = $this->endpoints; 174 $endpoint = $endpointBuilder('Cat\Help'); 175 $endpoint->setParams($params); 176 177 return $this->performRequest($endpoint); 178 } 179 /** 180 * Returns information about indices: number of primaries and replicas, document counts, disk size, ... 181 * 182 * $params['index'] = (list) A comma-separated list of index names to limit the returned information 183 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 184 * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) 185 * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) 186 * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node 187 * $params['h'] = (list) Comma-separated list of column names to display 188 * $params['health'] = (enum) A health status ("green", "yellow", or "red" to filter only indices matching the specified health status (Options = green,yellow,red) 189 * $params['help'] = (boolean) Return help information (Default = false) 190 * $params['pri'] = (boolean) Set to true to return stats only for primary shards (Default = false) 191 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 192 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 193 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 194 * $params['include_unloaded_segments'] = (boolean) If set to true segment stats will include stats for segments that are not currently loaded into memory (Default = false) 195 * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = all) 196 * 197 * @param array $params Associative array of parameters 198 * @return array 199 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html 200 */ 201 public function indices(array $params = []) 202 { 203 $index = $this->extractArgument($params, 'index'); 204 205 $endpointBuilder = $this->endpoints; 206 $endpoint = $endpointBuilder('Cat\Indices'); 207 $endpoint->setParams($params); 208 $endpoint->setIndex($index); 209 210 return $this->performRequest($endpoint); 211 } 212 /** 213 * Returns information about the master node. 214 * 215 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 216 * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) 217 * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node 218 * $params['h'] = (list) Comma-separated list of column names to display 219 * $params['help'] = (boolean) Return help information (Default = false) 220 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 221 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 222 * 223 * @param array $params Associative array of parameters 224 * @return array 225 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html 226 */ 227 public function master(array $params = []) 228 { 229 230 $endpointBuilder = $this->endpoints; 231 $endpoint = $endpointBuilder('Cat\Master'); 232 $endpoint->setParams($params); 233 234 return $this->performRequest($endpoint); 235 } 236 /** 237 * Gets configuration and usage information about data frame analytics jobs. 238 * 239 * $params['id'] = (string) The ID of the data frame analytics to fetch 240 * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified) 241 * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) 242 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 243 * $params['h'] = (list) Comma-separated list of column names to display 244 * $params['help'] = (boolean) Return help information (Default = false) 245 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 246 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 247 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 248 * 249 * @param array $params Associative array of parameters 250 * @return array 251 * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html 252 */ 253 public function mlDataFrameAnalytics(array $params = []) 254 { 255 $id = $this->extractArgument($params, 'id'); 256 257 $endpointBuilder = $this->endpoints; 258 $endpoint = $endpointBuilder('Cat\MlDataFrameAnalytics'); 259 $endpoint->setParams($params); 260 $endpoint->setId($id); 261 262 return $this->performRequest($endpoint); 263 } 264 /** 265 * Gets configuration and usage information about datafeeds. 266 * 267 * $params['datafeed_id'] = (string) The ID of the datafeeds stats to fetch 268 * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) 269 * $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) 270 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 271 * $params['h'] = (list) Comma-separated list of column names to display 272 * $params['help'] = (boolean) Return help information (Default = false) 273 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 274 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 275 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 276 * 277 * @param array $params Associative array of parameters 278 * @return array 279 * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html 280 */ 281 public function mlDatafeeds(array $params = []) 282 { 283 $datafeed_id = $this->extractArgument($params, 'datafeed_id'); 284 285 $endpointBuilder = $this->endpoints; 286 $endpoint = $endpointBuilder('Cat\MlDatafeeds'); 287 $endpoint->setParams($params); 288 $endpoint->setDatafeedId($datafeed_id); 289 290 return $this->performRequest($endpoint); 291 } 292 /** 293 * Gets configuration and usage information about anomaly detection jobs. 294 * 295 * $params['job_id'] = (string) The ID of the jobs stats to fetch 296 * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) 297 * $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) 298 * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) 299 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 300 * $params['h'] = (list) Comma-separated list of column names to display 301 * $params['help'] = (boolean) Return help information (Default = false) 302 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 303 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 304 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 305 * 306 * @param array $params Associative array of parameters 307 * @return array 308 * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html 309 */ 310 public function mlJobs(array $params = []) 311 { 312 $job_id = $this->extractArgument($params, 'job_id'); 313 314 $endpointBuilder = $this->endpoints; 315 $endpoint = $endpointBuilder('Cat\MlJobs'); 316 $endpoint->setParams($params); 317 $endpoint->setJobId($job_id); 318 319 return $this->performRequest($endpoint); 320 } 321 /** 322 * Gets configuration and usage information about inference trained models. 323 * 324 * $params['model_id'] = (string) The ID of the trained models stats to fetch 325 * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) (Default = true) 326 * $params['from'] = (int) skips a number of trained models (Default = 0) 327 * $params['size'] = (int) specifies a max number of trained models to get (Default = 100) 328 * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) 329 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 330 * $params['h'] = (list) Comma-separated list of column names to display 331 * $params['help'] = (boolean) Return help information (Default = false) 332 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 333 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 334 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 335 * 336 * @param array $params Associative array of parameters 337 * @return array 338 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html 339 */ 340 public function mlTrainedModels(array $params = []) 341 { 342 $model_id = $this->extractArgument($params, 'model_id'); 343 344 $endpointBuilder = $this->endpoints; 345 $endpoint = $endpointBuilder('Cat\MlTrainedModels'); 346 $endpoint->setParams($params); 347 $endpoint->setModelId($model_id); 348 349 return $this->performRequest($endpoint); 350 } 351 /** 352 * Returns information about custom node attributes. 353 * 354 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 355 * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) 356 * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node 357 * $params['h'] = (list) Comma-separated list of column names to display 358 * $params['help'] = (boolean) Return help information (Default = false) 359 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 360 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 361 * 362 * @param array $params Associative array of parameters 363 * @return array 364 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html 365 */ 366 public function nodeattrs(array $params = []) 367 { 368 369 $endpointBuilder = $this->endpoints; 370 $endpoint = $endpointBuilder('Cat\NodeAttrs'); 371 $endpoint->setParams($params); 372 373 return $this->performRequest($endpoint); 374 } 375 /** 376 * Returns basic statistics about performance of cluster nodes. 377 * 378 * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) 379 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 380 * $params['full_id'] = (boolean) Return the full node ID instead of the shortened version (default: false) 381 * $params['local'] = (boolean) Calculate the selected nodes using the local cluster state rather than the state from master node (default: false) 382 * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node 383 * $params['h'] = (list) Comma-separated list of column names to display 384 * $params['help'] = (boolean) Return help information (Default = false) 385 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 386 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 387 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 388 * $params['include_unloaded_segments'] = (boolean) If set to true segment stats will include stats for segments that are not currently loaded into memory (Default = false) 389 * 390 * @param array $params Associative array of parameters 391 * @return array 392 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html 393 */ 394 public function nodes(array $params = []) 395 { 396 397 $endpointBuilder = $this->endpoints; 398 $endpoint = $endpointBuilder('Cat\Nodes'); 399 $endpoint->setParams($params); 400 401 return $this->performRequest($endpoint); 402 } 403 /** 404 * Returns a concise representation of the cluster pending tasks. 405 * 406 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 407 * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) 408 * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node 409 * $params['h'] = (list) Comma-separated list of column names to display 410 * $params['help'] = (boolean) Return help information (Default = false) 411 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 412 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 413 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 414 * 415 * @param array $params Associative array of parameters 416 * @return array 417 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html 418 */ 419 public function pendingTasks(array $params = []) 420 { 421 422 $endpointBuilder = $this->endpoints; 423 $endpoint = $endpointBuilder('Cat\PendingTasks'); 424 $endpoint->setParams($params); 425 426 return $this->performRequest($endpoint); 427 } 428 /** 429 * Returns information about installed plugins across nodes node. 430 * 431 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 432 * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) 433 * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node 434 * $params['h'] = (list) Comma-separated list of column names to display 435 * $params['help'] = (boolean) Return help information (Default = false) 436 * $params['include_bootstrap'] = (boolean) Include bootstrap plugins in the response (Default = false) 437 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 438 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 439 * 440 * @param array $params Associative array of parameters 441 * @return array 442 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html 443 */ 444 public function plugins(array $params = []) 445 { 446 447 $endpointBuilder = $this->endpoints; 448 $endpoint = $endpointBuilder('Cat\Plugins'); 449 $endpoint->setParams($params); 450 451 return $this->performRequest($endpoint); 452 } 453 /** 454 * Returns information about index shard recoveries, both on-going completed. 455 * 456 * $params['index'] = (list) Comma-separated list or wildcard expression of index names to limit the returned information 457 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 458 * $params['active_only'] = (boolean) If `true`, the response only includes ongoing shard recoveries (Default = false) 459 * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) 460 * $params['detailed'] = (boolean) If `true`, the response includes detailed information about shard recoveries (Default = false) 461 * $params['h'] = (list) Comma-separated list of column names to display 462 * $params['help'] = (boolean) Return help information (Default = false) 463 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 464 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 465 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 466 * 467 * @param array $params Associative array of parameters 468 * @return array 469 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html 470 */ 471 public function recovery(array $params = []) 472 { 473 $index = $this->extractArgument($params, 'index'); 474 475 $endpointBuilder = $this->endpoints; 476 $endpoint = $endpointBuilder('Cat\Recovery'); 477 $endpoint->setParams($params); 478 $endpoint->setIndex($index); 479 480 return $this->performRequest($endpoint); 481 } 482 /** 483 * Returns information about snapshot repositories registered in the cluster. 484 * 485 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 486 * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (Default = false) 487 * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node 488 * $params['h'] = (list) Comma-separated list of column names to display 489 * $params['help'] = (boolean) Return help information (Default = false) 490 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 491 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 492 * 493 * @param array $params Associative array of parameters 494 * @return array 495 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html 496 */ 497 public function repositories(array $params = []) 498 { 499 500 $endpointBuilder = $this->endpoints; 501 $endpoint = $endpointBuilder('Cat\Repositories'); 502 $endpoint->setParams($params); 503 504 return $this->performRequest($endpoint); 505 } 506 /** 507 * Provides low-level information about the segments in the shards of an index. 508 * 509 * $params['index'] = (list) A comma-separated list of index names to limit the returned information 510 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 511 * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) 512 * $params['h'] = (list) Comma-separated list of column names to display 513 * $params['help'] = (boolean) Return help information (Default = false) 514 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 515 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 516 * 517 * @param array $params Associative array of parameters 518 * @return array 519 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html 520 */ 521 public function segments(array $params = []) 522 { 523 $index = $this->extractArgument($params, 'index'); 524 525 $endpointBuilder = $this->endpoints; 526 $endpoint = $endpointBuilder('Cat\Segments'); 527 $endpoint->setParams($params); 528 $endpoint->setIndex($index); 529 530 return $this->performRequest($endpoint); 531 } 532 /** 533 * Provides a detailed view of shard allocation on nodes. 534 * 535 * $params['index'] = (list) A comma-separated list of index names to limit the returned information 536 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 537 * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) 538 * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) 539 * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node 540 * $params['h'] = (list) Comma-separated list of column names to display 541 * $params['help'] = (boolean) Return help information (Default = false) 542 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 543 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 544 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 545 * 546 * @param array $params Associative array of parameters 547 * @return array 548 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html 549 */ 550 public function shards(array $params = []) 551 { 552 $index = $this->extractArgument($params, 'index'); 553 554 $endpointBuilder = $this->endpoints; 555 $endpoint = $endpointBuilder('Cat\Shards'); 556 $endpoint->setParams($params); 557 $endpoint->setIndex($index); 558 559 return $this->performRequest($endpoint); 560 } 561 /** 562 * Returns all snapshots in a specific repository. 563 * 564 * $params['repository'] = (list) Name of repository from which to fetch the snapshot information 565 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 566 * $params['ignore_unavailable'] = (boolean) Set to true to ignore unavailable snapshots (Default = false) 567 * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node 568 * $params['h'] = (list) Comma-separated list of column names to display 569 * $params['help'] = (boolean) Return help information (Default = false) 570 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 571 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 572 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 573 * 574 * @param array $params Associative array of parameters 575 * @return array 576 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html 577 */ 578 public function snapshots(array $params = []) 579 { 580 $repository = $this->extractArgument($params, 'repository'); 581 582 $endpointBuilder = $this->endpoints; 583 $endpoint = $endpointBuilder('Cat\Snapshots'); 584 $endpoint->setParams($params); 585 $endpoint->setRepository($repository); 586 587 return $this->performRequest($endpoint); 588 } 589 /** 590 * Returns information about the tasks currently executing on one or more nodes in the cluster. 591 * 592 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 593 * $params['nodes'] = (list) 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 594 * $params['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all. 595 * $params['detailed'] = (boolean) Return detailed task information (default: false) 596 * $params['parent_task_id'] = (string) Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. 597 * $params['h'] = (list) Comma-separated list of column names to display 598 * $params['help'] = (boolean) Return help information (Default = false) 599 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 600 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 601 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 602 * 603 * @param array $params Associative array of parameters 604 * @return array 605 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html 606 */ 607 public function tasks(array $params = []) 608 { 609 610 $endpointBuilder = $this->endpoints; 611 $endpoint = $endpointBuilder('Cat\Tasks'); 612 $endpoint->setParams($params); 613 614 return $this->performRequest($endpoint); 615 } 616 /** 617 * Returns information about existing templates. 618 * 619 * $params['name'] = (string) A pattern that returned template names must match 620 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 621 * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) 622 * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node 623 * $params['h'] = (list) Comma-separated list of column names to display 624 * $params['help'] = (boolean) Return help information (Default = false) 625 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 626 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 627 * 628 * @param array $params Associative array of parameters 629 * @return array 630 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html 631 */ 632 public function templates(array $params = []) 633 { 634 $name = $this->extractArgument($params, 'name'); 635 636 $endpointBuilder = $this->endpoints; 637 $endpoint = $endpointBuilder('Cat\Templates'); 638 $endpoint->setParams($params); 639 $endpoint->setName($name); 640 641 return $this->performRequest($endpoint); 642 } 643 /** 644 * Returns cluster-wide thread pool statistics per node.By default the active, queue and rejected statistics are returned for all thread pools. 645 * 646 * $params['thread_pool_patterns'] = (list) A comma-separated list of regular-expressions to filter the thread pools in the output 647 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 648 * $params['size'] = (enum) The multiplier in which to display values (Options = ,k,m,g,t,p) 649 * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) 650 * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node 651 * $params['h'] = (list) Comma-separated list of column names to display 652 * $params['help'] = (boolean) Return help information (Default = false) 653 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 654 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 655 * 656 * @param array $params Associative array of parameters 657 * @return array 658 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html 659 */ 660 public function threadPool(array $params = []) 661 { 662 $thread_pool_patterns = $this->extractArgument($params, 'thread_pool_patterns'); 663 664 $endpointBuilder = $this->endpoints; 665 $endpoint = $endpointBuilder('Cat\ThreadPool'); 666 $endpoint->setParams($params); 667 $endpoint->setThreadPoolPatterns($thread_pool_patterns); 668 669 return $this->performRequest($endpoint); 670 } 671 /** 672 * Gets configuration and usage information about transforms. 673 * 674 * $params['transform_id'] = (string) The id of the transform for which to get stats. '_all' or '*' implies all transforms 675 * $params['from'] = (int) skips a number of transform configs, defaults to 0 676 * $params['size'] = (int) specifies a max number of transforms to get, defaults to 100 677 * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) 678 * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml 679 * $params['h'] = (list) Comma-separated list of column names to display 680 * $params['help'] = (boolean) Return help information (Default = false) 681 * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by 682 * $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) 683 * $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) 684 * 685 * @param array $params Associative array of parameters 686 * @return array 687 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html 688 */ 689 public function transforms(array $params = []) 690 { 691 $transform_id = $this->extractArgument($params, 'transform_id'); 692 693 $endpointBuilder = $this->endpoints; 694 $endpoint = $endpointBuilder('Cat\Transforms'); 695 $endpoint->setParams($params); 696 $endpoint->setTransformId($transform_id); 697 698 return $this->performRequest($endpoint); 699 } 700} 701