1_0/Role/API.pm untested

filter: Statementstmt 0.0% 0 / 335 Branchbran n/a Conditioncond 0.0% 0 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 348 CC 1 SCAR 6.9
CC
1
Cov
0%
api
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # Licensed to Elasticsearch B.V under one or more agreements.
2 # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3 # See the LICENSE file in the project root for more information
4  
5 package Search::Elasticsearch::Client::1_0::Role::API;
6 $Search::Elasticsearch::Client::1_0::Role::API::VERSION = '7.30_1'; # TRIAL
7  
8 $Search::Elasticsearch::Client::1_0::Role::API::VERSION = '7.301';
9 use Moo::Role;
10 with 'Search::Elasticsearch::Role::API';
11  
12 use Search::Elasticsearch::Util qw(throw);
13 use namespace::clean;
14  
15 has 'api_version' => ( is => 'ro', default => '1_0' );
16  
17 our %API;
18  
19 #===================================
20 sub api {
21 #===================================
22 my $name = $_[1] || return \%API;
23 return $API{$name}
24 || throw( 'Internal', "Unknown api name ($name)" );
25 }
26  
27 #===================================
28 %API = (
29 #===================================
30 'bulk.metadata' => {
31 params => [
32 'index', 'type', 'id', 'fields',
33 'routing', 'parent', 'timestamp', 'ttl',
34 'version', 'version_type'
35 ]
36 },
37 'bulk.update' => {
38 params => [
39 'doc', 'upsert',
40 'doc_as_upsert', 'fields',
41 'scripted_upsert', 'script',
42 'script_id', 'script_file',
43 'params', 'lang',
44 'detect_noop',
45 ]
46 },
47 'bulk.required' => { params => [ 'index', 'type' ] },
48  
49 #=== AUTOGEN - START ===
50  
51 'bulk' => {
52 body => { required => 1 },
53 doc => "docs-bulk",
54 method => "POST",
55 parts => { index => {}, type => {} },
56 paths => [
57 [ { index => 0, type => 1 }, "{index}", "{type}", "_bulk" ],
58 [ { index => 0 }, "{index}", "_bulk" ],
59 [ {}, "_bulk" ],
60 ],
61 qs => {
62 consistency => "enum",
63 filter_path => "list",
64 refresh => "boolean",
65 replication => "enum",
66 routing => "string",
67 timeout => "time",
68 },
69 serialize => "bulk",
70 },
71  
72 'clear_scroll' => {
73 body => {},
74 doc => "search-request-scroll",
75 method => "DELETE",
76 parts => { scroll_id => { multi => 1 } },
77 paths => [
78 [ { scroll_id => 2 }, "_search", "scroll", "{scroll_id}" ],
79 [ {}, "_search", "scroll" ],
80 ],
81 qs => { filter_path => "list" },
82 },
83  
84 'count' => {
85 body => {},
86 doc => "search-count",
87 method => "POST",
88 parts => { index => { multi => 1 }, type => { multi => 1 } },
89 paths => [
90 [ { index => 0, type => 1 }, "{index}", "{type}", "_count" ],
91 [ { index => 0 }, "{index}", "_count" ],
92 [ {}, "_count" ],
93 ],
94 qs => {
95 allow_no_indices => "boolean",
96 analyze_wildcard => "boolean",
97 analyzer => "string",
98 default_operator => "enum",
99 df => "string",
100 expand_wildcards => "enum",
101 filter_path => "list",
102 ignore_unavailable => "boolean",
103 lenient => "boolean",
104 lowercase_expanded_terms => "boolean",
105 min_score => "number",
106 preference => "string",
107 q => "string",
108 routing => "string",
109 },
110 },
111  
112 'count_percolate' => {
113 body => {},
114 doc => "search-percolate",
115 parts => {
116 id => {},
117 index => { required => 1 },
118 type => { required => 1 }
119 },
120 paths => [
121 [ { id => 2, index => 0, type => 1 }, "{index}",
122 "{type}", "{id}",
123 "_percolate", "count",
124 ],
125 [ { index => 0, type => 1 }, "{index}",
126 "{type}", "_percolate",
127 "count",
128 ],
129 ],
130 qs => {
131 allow_no_indices => "boolean",
132 expand_wildcards => "enum",
133 filter_path => "list",
134 ignore_unavailable => "boolean",
135 percolate_index => "string",
136 percolate_type => "string",
137 preference => "string",
138 routing => "list",
139 version => "number",
140 version_type => "enum",
141 },
142 },
143  
144 'delete' => {
145 doc => "docs-delete",
146 method => "DELETE",
147 parts => {
148 id => { required => 1 },
149 index => { required => 1 },
150 type => { required => 1 },
151 },
152 paths => [
153 [ { id => 2, index => 0, type => 1 }, "{index}",
154 "{type}", "{id}"
155 ],
156 ],
157 qs => {
158 consistency => "enum",
159 filter_path => "list",
160 parent => "string",
161 refresh => "boolean",
162 replication => "enum",
163 routing => "string",
164 timeout => "time",
165 version => "number",
166 version_type => "enum",
167 },
168 },
169  
170 'delete_by_query' => {
171 body => {},
172 doc => "docs-delete-by-query",
173 method => "DELETE",
174 parts => {
175 index => { multi => 1, required => 1 },
176 type => { multi => 1 }
177 },
178 paths => [
179 [ { index => 0, type => 1 }, "{index}", "{type}", "_query" ],
180 [ { index => 0 }, "{index}", "_query" ],
181 ],
182 qs => {
183 allow_no_indices => "boolean",
184 analyzer => "string",
185 consistency => "enum",
186 default_operator => "enum",
187 df => "string",
188 expand_wildcards => "enum",
189 filter_path => "list",
190 ignore_unavailable => "boolean",
191 q => "string",
192 replication => "enum",
193 routing => "string",
194 timeout => "time",
195 },
196 },
197  
198 'delete_script' => {
199 doc => "modules-scripting",
200 method => "DELETE",
201 parts => { id => { required => 1 }, lang => { required => 1 } },
202 paths => [ [ { id => 2, lang => 1 }, "_scripts", "{lang}", "{id}" ] ],
203 qs => {
204 filter_path => "list",
205 version => "number",
206 version_type => "enum"
207 },
208 },
209  
210 'delete_template' => {
211 doc => "search-template",
212 method => "DELETE",
213 parts => { id => {} },
214 paths => [ [ { id => 2 }, "_search", "template", "{id}" ] ],
215 qs => {
216 filter_path => "list",
217 version => "number",
218 version_type => "enum"
219 },
220 },
221  
222 'exists' => {
223 doc => "docs-get",
224 method => "HEAD",
225 parts => {
226 id => { required => 1 },
227 index => { required => 1 },
228 type => { required => 1 },
229 },
230 paths => [
231 [ { id => 2, index => 0, type => 1 }, "{index}",
232 "{type}", "{id}"
233 ],
234 ],
235 qs => {
236 parent => "string",
237 preference => "string",
238 realtime => "boolean",
239 refresh => "boolean",
240 routing => "string",
241 },
242 },
243  
244 'explain' => {
245 body => {},
246 doc => "search-explain",
247 parts => {
248 id => { required => 1 },
249 index => { required => 1 },
250 type => { required => 1 },
251 },
252 paths => [
253 [ { id => 2, index => 0, type => 1 }, "{index}",
254 "{type}", "{id}",
255 "_explain",
256 ],
257 ],
258 qs => {
259 _source => "list",
260 _source_exclude => "list",
261 _source_include => "list",
262 analyze_wildcard => "boolean",
263 analyzer => "string",
264 default_operator => "enum",
265 df => "string",
266 fields => "list",
267 filter_path => "list",
268 lenient => "boolean",
269 lowercase_expanded_terms => "boolean",
270 parent => "string",
271 preference => "string",
272 q => "string",
273 routing => "string",
274 },
275 },
276  
277 'field_stats' => {
278 doc => "search-field-stats",
279 parts => { index => { multi => 1 } },
280 paths => [
281 [ { index => 0 }, "{index}", "_field_stats" ],
282 [ {}, "_field_stats" ],
283 ],
284 qs => {
285 allow_no_indices => "boolean",
286 expand_wildcards => "enum",
287 fields => "list",
288 filter_path => "list",
289 ignore_unavailable => "boolean",
290 level => "enum",
291 },
292 },
293  
294 'get' => {
295 doc => "docs-get",
296 parts => {
297 id => { required => 1 },
298 index => { required => 1 },
299 type => { required => 1 },
300 },
301 paths => [
302 [ { id => 2, index => 0, type => 1 }, "{index}",
303 "{type}", "{id}"
304 ],
305 ],
306 qs => {
307 _source => "list",
308 _source_exclude => "list",
309 _source_include => "list",
310 fields => "list",
311 filter_path => "list",
312 parent => "string",
313 preference => "string",
314 realtime => "boolean",
315 refresh => "boolean",
316 routing => "string",
317 version => "number",
318 version_type => "enum",
319 },
320 },
321  
322 'get_script' => {
323 doc => "modules-scripting",
324 parts => { id => { required => 1 }, lang => { required => 1 } },
325 paths => [ [ { id => 2, lang => 1 }, "_scripts", "{lang}", "{id}" ] ],
326 qs => {
327 filter_path => "list",
328 version => "number",
329 version_type => "enum"
330 },
331 },
332  
333 'get_source' => {
334 doc => "docs-get",
335 parts => {
336 id => { required => 1 },
337 index => { required => 1 },
338 type => { required => 1 },
339 },
340 paths => [
341 [ { id => 2, index => 0, type => 1 },
342 "{index}", "{type}", "{id}", "_source",
343 ],
344 ],
345 qs => {
346 _source => "list",
347 _source_exclude => "list",
348 _source_include => "list",
349 filter_path => "list",
350 parent => "string",
351 preference => "string",
352 realtime => "boolean",
353 refresh => "boolean",
354 routing => "string",
355 version => "number",
356 version_type => "enum",
357 },
358 },
359  
360 'get_template' => {
361 doc => "search-template",
362 parts => { id => { required => 1 } },
363 paths => [ [ { id => 2 }, "_search", "template", "{id}" ] ],
364 qs => {
365 filter_path => "list",
366 version => "number",
367 version_type => "enum"
368 },
369 },
370  
371 'index' => {
372 body => { required => 1 },
373 doc => "docs-index_",
374 method => "POST",
375 parts => {
376 id => {},
377 index => { required => 1 },
378 type => { required => 1 }
379 },
380 paths => [
381 [ { id => 2, index => 0, type => 1 }, "{index}",
382 "{type}", "{id}"
383 ],
384 [ { index => 0, type => 1 }, "{index}", "{type}" ],
385 ],
386 qs => {
387 consistency => "enum",
388 filter_path => "list",
389 op_type => "enum",
390 parent => "string",
391 refresh => "boolean",
392 replication => "enum",
393 routing => "string",
394 timeout => "time",
395 timestamp => "time",
396 ttl => "time",
397 version => "number",
398 version_type => "enum",
399 },
400 },
401  
402 'info' => {
403 doc => "",
404 parts => {},
405 paths => [ [ {} ] ],
406 qs => { filter_path => "list" }
407 },
408  
409 'mget' => {
410 body => { required => 1 },
411 doc => "docs-multi-get",
412 parts => { index => {}, type => {} },
413 paths => [
414 [ { index => 0, type => 1 }, "{index}", "{type}", "_mget" ],
415 [ { index => 0 }, "{index}", "_mget" ],
416 [ {}, "_mget" ],
417 ],
418 qs => {
419 _source => "list",
420 _source_exclude => "list",
421 _source_include => "list",
422 fields => "list",
423 filter_path => "list",
424 preference => "string",
425 realtime => "boolean",
426 refresh => "boolean",
427 },
428 },
429  
430 'mlt' => {
431 body => {},
432 doc => "search-more-like-this",
433 parts => {
434 id => { required => 1 },
435 index => { required => 1 },
436 type => { required => 1 },
437 },
438 paths => [
439 [ { id => 2, index => 0, type => 1 },
440 "{index}", "{type}", "{id}", "_mlt",
441 ],
442 ],
443 qs => {
444 boost_terms => "number",
445 filter_path => "list",
446 max_doc_freq => "number",
447 max_query_terms => "number",
448 max_word_length => "number",
449 min_doc_freq => "number",
450 min_term_freq => "number",
451 min_word_length => "number",
452 mlt_fields => "list",
453 percent_terms_to_match => "number",
454 routing => "string",
455 search_from => "number",
456 search_indices => "list",
457 search_scroll => "string",
458 search_size => "number",
459 search_source => "string",
460 search_type => "string",
461 search_types => "list",
462 stop_words => "list",
463 },
464 },
465  
466 'mpercolate' => {
467 body => { required => 1 },
468 doc => "search-percolate",
469 parts => { index => {}, type => {} },
470 paths => [
471 [ { index => 0, type => 1 }, "{index}", "{type}", "_mpercolate" ],
472 [ { index => 0 }, "{index}", "_mpercolate" ],
473 [ {}, "_mpercolate" ],
474 ],
475 qs => {
476 allow_no_indices => "boolean",
477 expand_wildcards => "enum",
478 filter_path => "list",
479 ignore_unavailable => "boolean",
480 },
481 serialize => "bulk",
482 },
483  
484 'msearch' => {
485 body => { required => 1 },
486 doc => "search-multi-search",
487 parts => { index => { multi => 1 }, type => { multi => 1 } },
488 paths => [
489 [ { index => 0, type => 1 }, "{index}", "{type}", "_msearch" ],
490 [ { index => 0 }, "{index}", "_msearch" ],
491 [ {}, "_msearch" ],
492 ],
493 qs => { filter_path => "list", search_type => "enum" },
494 serialize => "bulk",
495 },
496  
497 'mtermvectors' => {
498 body => {},
499 doc => "docs-multi-termvectors",
500 parts => { index => {}, type => {} },
501 paths => [
502 [ { index => 0, type => 1 }, "{index}",
503 "{type}", "_mtermvectors"
504 ],
505 [ { index => 0 }, "{index}", "_mtermvectors" ],
506 [ {}, "_mtermvectors" ],
507 ],
508 qs => {
509 field_statistics => "boolean",
510 fields => "list",
511 filter_path => "list",
512 ids => "list",
513 offsets => "boolean",
514 parent => "string",
515 payloads => "boolean",
516 positions => "boolean",
517 preference => "string",
518 realtime => "boolean",
519 routing => "string",
520 term_statistics => "boolean",
521 },
522 },
523  
524 'percolate' => {
525 body => {},
526 doc => "search-percolate",
527 parts => {
528 id => {},
529 index => { required => 1 },
530 type => { required => 1 }
531 },
532 paths => [
533 [ { id => 2, index => 0, type => 1 }, "{index}",
534 "{type}", "{id}",
535 "_percolate",
536 ],
537 [ { index => 0, type => 1 }, "{index}", "{type}", "_percolate" ],
538 ],
539 qs => {
540 allow_no_indices => "boolean",
541 expand_wildcards => "enum",
542 filter_path => "list",
543 ignore_unavailable => "boolean",
544 percolate_format => "enum",
545 percolate_index => "string",
546 percolate_preference => "string",
547 percolate_routing => "string",
548 percolate_type => "string",
549 preference => "string",
550 routing => "list",
551 version => "number",
552 version_type => "enum",
553 },
554 },
555  
556 'ping' => {
557 doc => "",
558 method => "HEAD",
559 parts => {},
560 paths => [ [ {} ] ],
561 qs => {}
562 },
563  
564 'put_script' => {
565 body => { required => 1 },
566 doc => "modules-scripting",
567 method => "PUT",
568 parts => { id => { required => 1 }, lang => { required => 1 } },
569 paths => [ [ { id => 2, lang => 1 }, "_scripts", "{lang}", "{id}" ] ],
570 qs => {
571 filter_path => "list",
572 op_type => "enum",
573 version => "number",
574 version_type => "enum",
575 },
576 },
577  
578 'put_template' => {
579 body => { required => 1 },
580 doc => "search-template",
581 method => "PUT",
582 parts => { id => { required => 1 } },
583 paths => [ [ { id => 2 }, "_search", "template", "{id}" ] ],
584 qs => {
585 filter_path => "list",
586 op_type => "enum",
587 version => "number",
588 version_type => "enum",
589 },
590 },
591  
592 'scroll' => {
593 body => {},
594 doc => "search-request-scroll",
595 parts => { scroll_id => {} },
596 paths => [
597 [ { scroll_id => 2 }, "_search", "scroll", "{scroll_id}" ],
598 [ {}, "_search", "scroll" ],
599 ],
600 qs => { filter_path => "list", scroll => "time" },
601 },
602  
603 'search' => {
604 body => {},
605 doc => "search-search",
606 parts => { index => { multi => 1 }, type => { multi => 1 } },
607 paths => [
608 [ { index => 0, type => 1 }, "{index}", "{type}", "_search" ],
609 [ { index => 0 }, "{index}", "_search" ],
610 [ {}, "_search" ],
611 ],
612 qs => {
613 _source => "list",
614 _source_exclude => "list",
615 _source_include => "list",
616 allow_no_indices => "boolean",
617 analyze_wildcard => "boolean",
618 analyzer => "string",
619 default_operator => "enum",
620 df => "string",
621 expand_wildcards => "enum",
622 explain => "boolean",
623 fielddata_fields => "list",
624 fields => "list",
625 filter_path => "list",
626 from => "number",
627 ignore_unavailable => "boolean",
628 lenient => "boolean",
629 lowercase_expanded_terms => "boolean",
630 preference => "string",
631 q => "string",
632 query_cache => "boolean",
633 routing => "list",
634 scroll => "time",
635 search_type => "enum",
636 size => "number",
637 sort => "list",
638 stats => "list",
639 suggest_field => "string",
640 suggest_mode => "enum",
641 suggest_size => "number",
642 suggest_text => "string",
643 timeout => "time",
644 track_scores => "boolean",
645 version => "boolean",
646 },
647 },
648  
649 'search_exists' => {
650 body => {},
651 doc => "search-exists",
652 method => "POST",
653 parts => { index => { multi => 1 }, type => { multi => 1 } },
654 paths => [
655 [ { index => 0, type => 1 }, "{index}",
656 "{type}", "_search",
657 "exists",
658 ],
659 [ { index => 0 }, "{index}", "_search", "exists" ],
660 [ {}, "_search", "exists" ],
661 ],
662 qs => {
663 allow_no_indices => "boolean",
664 analyze_wildcard => "boolean",
665 analyzer => "string",
666 default_operator => "enum",
667 df => "string",
668 expand_wildcards => "enum",
669 filter_path => "list",
670 ignore_unavailable => "boolean",
671 lenient => "boolean",
672 lowercase_expanded_terms => "boolean",
673 min_score => "number",
674 preference => "string",
675 q => "string",
676 routing => "string",
677 },
678 },
679  
680 'search_shards' => {
681 doc => "search-shards",
682 parts => { index => {}, type => {} },
683 paths => [
684 [ { index => 0, type => 1 }, "{index}",
685 "{type}", "_search_shards",
686 ],
687 [ { index => 0 }, "{index}", "_search_shards" ],
688 [ {}, "_search_shards" ],
689 ],
690 qs => {
691 allow_no_indices => "boolean",
692 expand_wildcards => "enum",
693 filter_path => "list",
694 ignore_unavailable => "boolean",
695 local => "boolean",
696 preference => "string",
697 routing => "string",
698 },
699 },
700  
701 'search_template' => {
702 body => {},
703 doc => "search-template",
704 parts => { index => { multi => 1 }, type => { multi => 1 } },
705 paths => [
706 [ { index => 0, type => 1 }, "{index}",
707 "{type}", "_search",
708 "template",
709 ],
710 [ { index => 0 }, "{index}", "_search", "template" ],
711 [ {}, "_search", "template" ],
712 ],
713 qs => {
714 allow_no_indices => "boolean",
715 expand_wildcards => "enum",
716 filter_path => "list",
717 ignore_unavailable => "boolean",
718 preference => "string",
719 routing => "list",
720 scroll => "time",
721 search_type => "enum",
722 },
723 },
724  
725 'suggest' => {
726 body => { required => 1 },
727 doc => "search-suggesters",
728 method => "POST",
729 parts => { index => { multi => 1 } },
730 paths =>
731 [ [ { index => 0 }, "{index}", "_suggest" ], [ {}, "_suggest" ] ],
732 qs => {
733 allow_no_indices => "boolean",
734 expand_wildcards => "enum",
735 filter_path => "list",
736 ignore_unavailable => "boolean",
737 preference => "string",
738 routing => "string",
739 },
740 },
741  
742 'termvector' => {
743 body => {},
744 doc => "docs-termvectors",
745 parts => {
746 id => {},
747 index => { required => 1 },
748 type => { required => 1 }
749 },
750 paths => [
751 [ { id => 2, index => 0, type => 1 }, "{index}",
752 "{type}", "{id}",
753 "_termvector",
754 ],
755 [ { index => 0, type => 1 }, "{index}", "{type}", "_termvector" ],
756 ],
757 qs => {
758 field_statistics => "boolean",
759 fields => "list",
760 filter_path => "list",
761 offsets => "boolean",
762 parent => "string",
763 payloads => "boolean",
764 positions => "boolean",
765 preference => "string",
766 realtime => "boolean",
767 routing => "string",
768 term_statistics => "boolean",
769 },
770 },
771  
772 'update' => {
773 body => {},
774 doc => "docs-update",
775 method => "POST",
776 parts => {
777 id => { required => 1 },
778 index => { required => 1 },
779 type => { required => 1 },
780 },
781 paths => [
782 [ { id => 2, index => 0, type => 1 },
783 "{index}", "{type}", "{id}", "_update",
784 ],
785 ],
786 qs => {
787 consistency => "enum",
788 fields => "list",
789 filter_path => "list",
790 lang => "string",
791 parent => "string",
792 refresh => "boolean",
793 replication => "enum",
794 retry_on_conflict => "number",
795 routing => "string",
796 script => "string",
797 script_id => "string",
798 scripted_upsert => "boolean",
799 timeout => "time",
800 timestamp => "time",
801 ttl => "time",
802 version => "number",
803 version_type => "enum",
804 },
805 },
806  
807 'cat.aliases' => {
808 doc => "cat-alias",
809 parts => { name => { multi => 1 } },
810 paths => [
811 [ { name => 2 }, "_cat", "aliases", "{name}" ],
812 [ {}, "_cat", "aliases" ],
813 ],
814 qs => {
815 h => "list",
816 help => "boolean",
817 local => "boolean",
818 master_timeout => "time",
819 v => "boolean",
820 },
821 },
822  
823 'cat.allocation' => {
824 doc => "cat-allocation",
825 parts => { node_id => { multi => 1 } },
826 paths => [
827 [ { node_id => 2 }, "_cat", "allocation", "{node_id}" ],
828 [ {}, "_cat", "allocation" ],
829 ],
830 qs => {
831 bytes => "enum",
832 h => "list",
833 help => "boolean",
834 local => "boolean",
835 master_timeout => "time",
836 v => "boolean",
837 },
838 },
839  
840 'cat.count' => {
841 doc => "cat-count",
842 parts => { index => { multi => 1 } },
843 paths => [
844 [ { index => 2 }, "_cat", "count", "{index}" ],
845 [ {}, "_cat", "count" ],
846 ],
847 qs => {
848 h => "list",
849 help => "boolean",
850 local => "boolean",
851 master_timeout => "time",
852 v => "boolean",
853 },
854 },
855  
856 'cat.fielddata' => {
857 doc => "cat-fielddata",
858 parts => { fields => { multi => 1 } },
859 paths => [
860 [ { fields => 2 }, "_cat", "fielddata", "{fields}" ],
861 [ {}, "_cat", "fielddata" ],
862 ],
863 qs => {
864 bytes => "enum",
865 h => "list",
866 help => "boolean",
867 local => "boolean",
868 master_timeout => "time",
869 v => "boolean",
870 },
871 },
872  
873 'cat.health' => {
874 doc => "cat-health",
875 parts => {},
876 paths => [ [ {}, "_cat", "health" ] ],
877 qs => {
878 h => "list",
879 help => "boolean",
880 local => "boolean",
881 master_timeout => "time",
882 ts => "boolean",
883 v => "boolean",
884 },
885 },
886  
887 'cat.help' => {
888 doc => "cat",
889 parts => {},
890 paths => [ [ {}, "_cat" ] ],
891 qs => { help => "boolean" },
892 },
893  
894 'cat.indices' => {
895 doc => "cat-indices",
896 parts => { index => { multi => 1 } },
897 paths => [
898 [ { index => 2 }, "_cat", "indices", "{index}" ],
899 [ {}, "_cat", "indices" ],
900 ],
901 qs => {
902 bytes => "enum",
903 h => "list",
904 help => "boolean",
905 local => "boolean",
906 master_timeout => "time",
907 pri => "boolean",
908 v => "boolean",
909 },
910 },
911  
912 'cat.master' => {
913 doc => "cat-master",
914 parts => {},
915 paths => [ [ {}, "_cat", "master" ] ],
916 qs => {
917 h => "list",
918 help => "boolean",
919 local => "boolean",
920 master_timeout => "time",
921 v => "boolean",
922 },
923 },
924  
925 'cat.nodes' => {
926 doc => "cat-nodes",
927 parts => {},
928 paths => [ [ {}, "_cat", "nodes" ] ],
929 qs => {
930 h => "list",
931 help => "boolean",
932 local => "boolean",
933 master_timeout => "time",
934 v => "boolean",
935 },
936 },
937  
938 'cat.pending_tasks' => {
939 doc => "cat-pending-tasks",
940 parts => {},
941 paths => [ [ {}, "_cat", "pending_tasks" ] ],
942 qs => {
943 h => "list",
944 help => "boolean",
945 local => "boolean",
946 master_timeout => "time",
947 v => "boolean",
948 },
949 },
950  
951 'cat.plugins' => {
952 doc => "cat-plugins",
953 parts => {},
954 paths => [ [ {}, "_cat", "plugins" ] ],
955 qs => {
956 h => "list",
957 help => "boolean",
958 local => "boolean",
959 master_timeout => "time",
960 v => "boolean",
961 },
962 },
963  
964 'cat.recovery' => {
965 doc => "cat-recovery",
966 parts => { index => { multi => 1 } },
967 paths => [
968 [ { index => 2 }, "_cat", "recovery", "{index}" ],
969 [ {}, "_cat", "recovery" ],
970 ],
971 qs => {
972 bytes => "enum",
973 h => "list",
974 help => "boolean",
975 master_timeout => "time",
976 v => "boolean",
977 },
978 },
979  
980 'cat.segments' => {
981 doc => "cat-segments",
982 parts => { index => { multi => 1 } },
983 paths => [
984 [ { index => 2 }, "_cat", "segments", "{index}" ],
985 [ {}, "_cat", "segments" ],
986 ],
987 qs => { h => "list", help => "boolean", v => "boolean" },
988 },
989  
990 'cat.shards' => {
991 doc => "cat-shards",
992 parts => { index => { multi => 1 } },
993 paths => [
994 [ { index => 2 }, "_cat", "shards", "{index}" ],
995 [ {}, "_cat", "shards" ],
996 ],
997 qs => {
998 h => "list",
999 help => "boolean",
1000 local => "boolean",
1001 master_timeout => "time",
1002 v => "boolean",
1003 },
1004 },
1005  
1006 'cat.thread_pool' => {
1007 doc => "cat-thread-pool",
1008 parts => {},
1009 paths => [ [ {}, "_cat", "thread_pool" ] ],
1010 qs => {
1011 full_id => "boolean",
1012 h => "list",
1013 help => "boolean",
1014 local => "boolean",
1015 master_timeout => "time",
1016 v => "boolean",
1017 },
1018 },
1019  
1020 'cluster.get_settings' => {
1021 doc => "cluster-update-settings",
1022 parts => {},
1023 paths => [ [ {}, "_cluster", "settings" ] ],
1024 qs => {
1025 filter_path => "list",
1026 flat_settings => "boolean",
1027 master_timeout => "time",
1028 timeout => "time",
1029 },
1030 },
1031  
1032 'cluster.health' => {
1033 doc => "cluster-health",
1034 parts => { index => {} },
1035 paths => [
1036 [ { index => 2 }, "_cluster", "health", "{index}" ],
1037 [ {}, "_cluster", "health" ],
1038 ],
1039 qs => {
1040 filter_path => "list",
1041 level => "enum",
1042 local => "boolean",
1043 master_timeout => "time",
1044 timeout => "time",
1045 wait_for_active_shards => "number",
1046 wait_for_nodes => "string",
1047 wait_for_relocating_shards => "number",
1048 wait_for_status => "enum",
1049 },
1050 },
1051  
1052 'cluster.pending_tasks' => {
1053 doc => "cluster-pending",
1054 parts => {},
1055 paths => [ [ {}, "_cluster", "pending_tasks" ] ],
1056 qs => {
1057 filter_path => "list",
1058 local => "boolean",
1059 master_timeout => "time"
1060 },
1061 },
1062  
1063 'cluster.put_settings' => {
1064 body => {},
1065 doc => "cluster-update-settings",
1066 method => "PUT",
1067 parts => {},
1068 paths => [ [ {}, "_cluster", "settings" ] ],
1069 qs => {
1070 filter_path => "list",
1071 flat_settings => "boolean",
1072 master_timeout => "time",
1073 timeout => "time",
1074 },
1075 },
1076  
1077 'cluster.reroute' => {
1078 body => {},
1079 doc => "cluster-reroute",
1080 method => "POST",
1081 parts => {},
1082 paths => [ [ {}, "_cluster", "reroute" ] ],
1083 qs => {
1084 dry_run => "boolean",
1085 explain => "boolean",
1086 filter_path => "list",
1087 master_timeout => "time",
1088 metric => "list",
1089 timeout => "time",
1090 },
1091 },
1092  
1093 'cluster.state' => {
1094 doc => "cluster-state",
1095 parts => { index => { multi => 1 }, metric => { multi => 1 } },
1096 paths => [
1097 [ { index => 3, metric => 2 }, "_cluster",
1098 "state", "{metric}",
1099 "{index}",
1100 ],
1101 [ { metric => 2 }, "_cluster", "state", "{metric}" ],
1102 [ {}, "_cluster", "state" ],
1103 ],
1104 qs => {
1105 allow_no_indices => "boolean",
1106 expand_wildcards => "enum",
1107 filter_path => "list",
1108 flat_settings => "boolean",
1109 ignore_unavailable => "boolean",
1110 local => "boolean",
1111 master_timeout => "time",
1112 },
1113 },
1114  
1115 'cluster.stats' => {
1116 doc => "cluster-stats",
1117 parts => { node_id => { multi => 1 } },
1118 paths => [
1119 [ { node_id => 3 }, "_cluster", "stats", "nodes", "{node_id}" ],
1120 [ {}, "_cluster", "stats" ],
1121 ],
1122 qs => {
1123 filter_path => "list",
1124 flat_settings => "boolean",
1125 human => "boolean",
1126 timeout => "time",
1127 },
1128 },
1129  
1130 'indices.analyze' => {
1131 body => {},
1132 doc => "indices-analyze",
1133 parts => { index => {} },
1134 paths =>
1135 [ [ { index => 0 }, "{index}", "_analyze" ], [ {}, "_analyze" ] ],
1136 qs => {
1137 analyzer => "string",
1138 char_filters => "list",
1139 field => "string",
1140 filter_path => "list",
1141 filters => "list",
1142 format => "enum",
1143 prefer_local => "boolean",
1144 text => "string",
1145 tokenizer => "string",
1146 },
1147 },
1148  
1149 'indices.clear_cache' => {
1150 doc => "indices-clearcache",
1151 method => "POST",
1152 parts => { index => { multi => 1 } },
1153 paths => [
1154 [ { index => 0 }, "{index}", "_cache", "clear" ],
1155 [ {}, "_cache", "clear" ],
1156 ],
1157 qs => {
1158 allow_no_indices => "boolean",
1159 expand_wildcards => "enum",
1160 fielddata => "boolean",
1161 fields => "list",
1162 filter => "boolean",
1163 filter_cache => "boolean",
1164 filter_keys => "boolean",
1165 filter_path => "list",
1166 id => "boolean",
1167 id_cache => "boolean",
1168 ignore_unavailable => "boolean",
1169 query_cache => "boolean",
1170 recycler => "boolean",
1171 },
1172 },
1173  
1174 'indices.close' => {
1175 doc => "indices-open-close",
1176 method => "POST",
1177 parts => { index => { required => 1 } },
1178 paths => [ [ { index => 0 }, "{index}", "_close" ] ],
1179 qs => {
1180 allow_no_indices => "boolean",
1181 expand_wildcards => "enum",
1182 filter_path => "list",
1183 ignore_unavailable => "boolean",
1184 master_timeout => "time",
1185 timeout => "time",
1186 },
1187 },
1188  
1189 'indices.create' => {
1190 body => {},
1191 doc => "indices-create-index",
1192 method => "PUT",
1193 parts => { index => { required => 1 } },
1194 paths => [ [ { index => 0 }, "{index}" ] ],
1195 qs => {
1196 filter_path => "list",
1197 master_timeout => "time",
1198 timeout => "time"
1199 },
1200 },
1201  
1202 'indices.delete' => {
1203 doc => "indices-delete-index",
1204 method => "DELETE",
1205 parts => { index => { multi => 1, required => 1 } },
1206 paths => [ [ { index => 0 }, "{index}" ] ],
1207 qs => {
1208 filter_path => "list",
1209 master_timeout => "time",
1210 timeout => "time"
1211 },
1212 },
1213  
1214 'indices.delete_alias' => {
1215 doc => "indices-aliases",
1216 method => "DELETE",
1217 parts => {
1218 index => { multi => 1, required => 1 },
1219 name => { multi => 1, required => 1 },
1220 },
1221 paths =>
1222 [ [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ] ],
1223 qs => {
1224 filter_path => "list",
1225 master_timeout => "time",
1226 timeout => "time"
1227 },
1228 },
1229  
1230 'indices.delete_mapping' => {
1231 doc => "indices-delete-mapping",
1232 method => "DELETE",
1233 parts => {
1234 index => { multi => 1, required => 1 },
1235 type => { multi => 1, required => 1 },
1236 },
1237 paths => [
1238 [ { index => 0, type => 2 }, "{index}", "_mapping", "{type}" ]
1239 ],
1240 qs => { filter_path => "list", master_timeout => "time" },
1241 },
1242  
1243 'indices.delete_template' => {
1244 doc => "indices-templates",
1245 method => "DELETE",
1246 parts => { name => { required => 1 } },
1247 paths => [ [ { name => 1 }, "_template", "{name}" ] ],
1248 qs => {
1249 filter_path => "list",
1250 master_timeout => "time",
1251 timeout => "time"
1252 },
1253 },
1254  
1255 'indices.delete_warmer' => {
1256 doc => "indices-warmers",
1257 method => "DELETE",
1258 parts => {
1259 index => { multi => 1, required => 1 },
1260 name => { multi => 1, required => 1 },
1261 },
1262 paths =>
1263 [ [ { index => 0, name => 2 }, "{index}", "_warmer", "{name}" ] ],
1264 qs => { filter_path => "list", master_timeout => "time" },
1265 },
1266  
1267 'indices.exists' => {
1268 doc => "indices-exists",
1269 method => "HEAD",
1270 parts => { index => { multi => 1, required => 1 } },
1271 paths => [ [ { index => 0 }, "{index}" ] ],
1272 qs => {
1273 allow_no_indices => "boolean",
1274 expand_wildcards => "enum",
1275 ignore_unavailable => "boolean",
1276 local => "boolean",
1277 },
1278 },
1279  
1280 'indices.exists_alias' => {
1281 doc => "indices-aliases",
1282 method => "HEAD",
1283 parts => { index => { multi => 1 }, name => { multi => 1 } },
1284 paths => [
1285 [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ],
1286 [ { index => 0 }, "{index}", "_alias" ],
1287 [ { name => 1 }, "_alias", "{name}" ],
1288 ],
1289 qs => {
1290 allow_no_indices => "boolean",
1291 expand_wildcards => "enum",
1292 ignore_unavailable => "boolean",
1293 local => "boolean",
1294 },
1295 },
1296  
1297 'indices.exists_template' => {
1298 doc => "indices-templates",
1299 method => "HEAD",
1300 parts => { name => { required => 1 } },
1301 paths => [ [ { name => 1 }, "_template", "{name}" ] ],
1302 qs => { local => "boolean", master_timeout => "time" },
1303 },
1304  
1305 'indices.exists_type' => {
1306 doc => "indices-types-exists",
1307 method => "HEAD",
1308 parts => {
1309 index => { multi => 1, required => 1 },
1310 type => { multi => 1, required => 1 },
1311 },
1312 paths => [ [ { index => 0, type => 1 }, "{index}", "{type}" ] ],
1313 qs => {
1314 allow_no_indices => "boolean",
1315 expand_wildcards => "enum",
1316 ignore_unavailable => "boolean",
1317 local => "boolean",
1318 },
1319 },
1320  
1321 'indices.flush' => {
1322 doc => "indices-flush",
1323 method => "POST",
1324 parts => { index => { multi => 1 } },
1325 paths =>
1326 [ [ { index => 0 }, "{index}", "_flush" ], [ {}, "_flush" ] ],
1327 qs => {
1328 allow_no_indices => "boolean",
1329 expand_wildcards => "enum",
1330 filter_path => "list",
1331 force => "boolean",
1332 ignore_unavailable => "boolean",
1333 wait_if_ongoing => "boolean",
1334 },
1335 },
1336  
1337 'indices.flush_synced' => {
1338 doc => "indices-synced-flush",
1339 method => "POST",
1340 parts => {
1341 allow_no_indices => {},
1342 expand_wildcards => {},
1343 ignore_unavailable => {},
1344 index => { multi => 1 },
1345 },
1346 paths => [
1347 [ { index => 0 }, "{index}", "_flush", "synced" ],
1348 [ {}, "_flush", "synced" ],
1349 ],
1350 qs => { filter_path => "list" },
1351 },
1352  
1353 'indices.get' => {
1354 doc => "indices-get-index",
1355 parts => {
1356 feature => { multi => 1 },
1357 index => { multi => 1, required => 1 }
1358 },
1359 paths => [
1360 [ { feature => 1, index => 0 }, "{index}", "{feature}" ],
1361 [ { index => 0 }, "{index}" ],
1362 ],
1363 qs => {
1364 allow_no_indices => "boolean",
1365 expand_wildcards => "enum",
1366 filter_path => "list",
1367 ignore_unavailable => "boolean",
1368 local => "boolean",
1369 },
1370 },
1371  
1372 'indices.get_alias' => {
1373 doc => "indices-aliases",
1374 parts => { index => { multi => 1 }, name => { multi => 1 } },
1375 paths => [
1376 [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ],
1377 [ { index => 0 }, "{index}", "_alias" ],
1378 [ { name => 1 }, "_alias", "{name}" ],
1379 [ {}, "_alias" ],
1380 ],
1381 qs => {
1382 allow_no_indices => "boolean",
1383 expand_wildcards => "enum",
1384 filter_path => "list",
1385 ignore_unavailable => "boolean",
1386 local => "boolean",
1387 },
1388 },
1389  
1390 'indices.get_aliases' => {
1391 doc => "indices-aliases",
1392 parts => { index => { multi => 1 }, name => { multi => 1 } },
1393 paths => [
1394 [ { index => 0, name => 2 }, "{index}", "_aliases", "{name}" ],
1395 [ { index => 0 }, "{index}", "_aliases" ],
1396 [ { name => 1 }, "_aliases", "{name}" ],
1397 [ {}, "_aliases" ],
1398 ],
1399 qs =>
1400 { filter_path => "list", local => "boolean", timeout => "time" },
1401 },
1402  
1403 'indices.get_field_mapping' => {
1404 doc => "indices-get-field-mapping",
1405 parts => {
1406 field => { multi => 1, required => 1 },
1407 index => { multi => 1 },
1408 type => { multi => 1 },
1409 },
1410 paths => [
1411 [ { field => 4, index => 0, type => 2 }, "{index}",
1412 "_mapping", "{type}",
1413 "field", "{field}",
1414 ],
1415 [ { field => 3, index => 0 }, "{index}",
1416 "_mapping", "field",
1417 "{field}",
1418 ],
1419 [ { field => 3, type => 1 }, "_mapping",
1420 "{type}", "field",
1421 "{field}",
1422 ],
1423 [ { field => 2 }, "_mapping", "field", "{field}" ],
1424 ],
1425 qs => {
1426 allow_no_indices => "boolean",
1427 expand_wildcards => "enum",
1428 filter_path => "list",
1429 ignore_unavailable => "boolean",
1430 include_defaults => "boolean",
1431 local => "boolean",
1432 },
1433 },
1434  
1435 'indices.get_mapping' => {
1436 doc => "indices-get-mapping",
1437 parts => { index => { multi => 1 }, type => { multi => 1 } },
1438 paths => [
1439 [ { index => 0, type => 2 }, "{index}", "_mapping", "{type}" ],
1440 [ { index => 0 }, "{index}", "_mapping" ],
1441 [ { type => 1 }, "_mapping", "{type}" ],
1442 [ {}, "_mapping" ],
1443 ],
1444 qs => {
1445 allow_no_indices => "boolean",
1446 expand_wildcards => "enum",
1447 filter_path => "list",
1448 ignore_unavailable => "boolean",
1449 local => "boolean",
1450 },
1451 },
1452  
1453 'indices.get_settings' => {
1454 doc => "indices-get-settings",
1455 parts => { index => { multi => 1 }, name => { multi => 1 } },
1456 paths => [
1457 [ { index => 0, name => 2 }, "{index}", "_settings", "{name}" ],
1458 [ { index => 0 }, "{index}", "_settings" ],
1459 [ { name => 1 }, "_settings", "{name}" ],
1460 [ {}, "_settings" ],
1461 ],
1462 qs => {
1463 allow_no_indices => "boolean",
1464 expand_wildcards => "enum",
1465 filter_path => "list",
1466 flat_settings => "boolean",
1467 ignore_unavailable => "boolean",
1468 local => "boolean",
1469 },
1470 },
1471  
1472 'indices.get_template' => {
1473 doc => "indices-templates",
1474 parts => { name => {} },
1475 paths =>
1476 [ [ { name => 1 }, "_template", "{name}" ], [ {}, "_template" ] ],
1477 qs => {
1478 filter_path => "list",
1479 flat_settings => "boolean",
1480 local => "boolean",
1481 master_timeout => "time",
1482 },
1483 },
1484  
1485 'indices.get_upgrade' => {
1486 doc => "indices-upgrade",
1487 parts => { index => { multi => 1 } },
1488 paths =>
1489 [ [ { index => 0 }, "{index}", "_upgrade" ], [ {}, "_upgrade" ] ],
1490 qs => {
1491 allow_no_indices => "boolean",
1492 expand_wildcards => "enum",
1493 filter_path => "list",
1494 human => "boolean",
1495 ignore_unavailable => "boolean",
1496 },
1497 },
1498  
1499 'indices.get_warmer' => {
1500 doc => "indices-warmers",
1501 parts => {
1502 index => { multi => 1 },
1503 name => { multi => 1 },
1504 type => { multi => 1 }
1505 },
1506 paths => [
1507 [ { index => 0, name => 3, type => 1 },
1508 "{index}", "{type}", "_warmer", "{name}",
1509 ],
1510 [ { index => 0, name => 2 }, "{index}", "_warmer", "{name}" ],
1511 [ { index => 0 }, "{index}", "_warmer" ],
1512 [ { name => 1 }, "_warmer", "{name}" ],
1513 [ {}, "_warmer" ],
1514 ],
1515 qs => {
1516 allow_no_indices => "boolean",
1517 expand_wildcards => "enum",
1518 filter_path => "list",
1519 ignore_unavailable => "boolean",
1520 local => "boolean",
1521 },
1522 },
1523  
1524 'indices.open' => {
1525 doc => "indices-open-close",
1526 method => "POST",
1527 parts => { index => { required => 1 } },
1528 paths => [ [ { index => 0 }, "{index}", "_open" ] ],
1529 qs => {
1530 allow_no_indices => "boolean",
1531 expand_wildcards => "enum",
1532 filter_path => "list",
1533 ignore_unavailable => "boolean",
1534 master_timeout => "time",
1535 timeout => "time",
1536 },
1537 },
1538  
1539 'indices.optimize' => {
1540 doc => "indices-optimize",
1541 method => "POST",
1542 parts => { index => { multi => 1 } },
1543 paths => [
1544 [ { index => 0 }, "{index}", "_optimize" ],
1545 [ {}, "_optimize" ]
1546 ],
1547 qs => {
1548 allow_no_indices => "boolean",
1549 expand_wildcards => "enum",
1550 filter_path => "list",
1551 flush => "boolean",
1552 force => "boolean",
1553 ignore_unavailable => "boolean",
1554 max_num_segments => "number",
1555 only_expunge_deletes => "boolean",
1556 wait_for_merge => "boolean",
1557 },
1558 },
1559  
1560 'indices.put_alias' => {
1561 body => {},
1562 doc => "indices-aliases",
1563 method => "PUT",
1564 parts => {
1565 index => { multi => 1, required => 1 },
1566 name => { required => 1 }
1567 },
1568 paths =>
1569 [ [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ] ],
1570 qs => {
1571 filter_path => "list",
1572 master_timeout => "time",
1573 timeout => "time"
1574 },
1575 },
1576  
1577 'indices.put_mapping' => {
1578 body => { required => 1 },
1579 doc => "indices-put-mapping",
1580 method => "PUT",
1581 parts => { index => { multi => 1 }, type => { required => 1 } },
1582 paths => [
1583 [ { index => 0, type => 2 }, "{index}", "_mapping", "{type}" ],
1584 [ { type => 1 }, "_mapping", "{type}" ],
1585 ],
1586 qs => {
1587 allow_no_indices => "boolean",
1588 expand_wildcards => "enum",
1589 filter_path => "list",
1590 ignore_conflicts => "boolean",
1591 ignore_unavailable => "boolean",
1592 master_timeout => "time",
1593 timeout => "time",
1594 },
1595 },
1596  
1597 'indices.put_settings' => {
1598 body => { required => 1 },
1599 doc => "indices-update-settings",
1600 method => "PUT",
1601 parts => { index => { multi => 1 } },
1602 paths => [
1603 [ { index => 0 }, "{index}", "_settings" ],
1604 [ {}, "_settings" ]
1605 ],
1606 qs => {
1607 allow_no_indices => "boolean",
1608 expand_wildcards => "enum",
1609 filter_path => "list",
1610 flat_settings => "boolean",
1611 ignore_unavailable => "boolean",
1612 master_timeout => "time",
1613 },
1614 },
1615  
1616 'indices.put_template' => {
1617 body => { required => 1 },
1618 doc => "indices-templates",
1619 method => "PUT",
1620 parts => { name => { required => 1 } },
1621 paths => [ [ { name => 1 }, "_template", "{name}" ] ],
1622 qs => {
1623 create => "boolean",
1624 filter_path => "list",
1625 flat_settings => "boolean",
1626 master_timeout => "time",
1627 order => "number",
1628 timeout => "time",
1629 },
1630 },
1631  
1632 'indices.put_warmer' => {
1633 body => { required => 1 },
1634 doc => "indices-warmers",
1635 method => "PUT",
1636 parts => {
1637 index => { multi => 1 },
1638 name => { required => 1 },
1639 type => { multi => 1 },
1640 },
1641 paths => [
1642 [ { index => 0, name => 3, type => 1 },
1643 "{index}", "{type}", "_warmer", "{name}",
1644 ],
1645 [ { index => 0, name => 2 }, "{index}", "_warmer", "{name}" ],
1646 [ { name => 1 }, "_warmer", "{name}" ],
1647 ],
1648 qs => {
1649 allow_no_indices => "boolean",
1650 expand_wildcards => "enum",
1651 filter_path => "list",
1652 ignore_unavailable => "boolean",
1653 master_timeout => "time",
1654 },
1655 },
1656  
1657 'indices.recovery' => {
1658 doc => "indices-recovery",
1659 parts => { index => { multi => 1 } },
1660 paths => [
1661 [ { index => 0 }, "{index}", "_recovery" ],
1662 [ {}, "_recovery" ]
1663 ],
1664 qs => {
1665 active_only => "boolean",
1666 detailed => "boolean",
1667 filter_path => "list",
1668 human => "boolean",
1669 },
1670 },
1671  
1672 'indices.refresh' => {
1673 doc => "indices-refresh",
1674 method => "POST",
1675 parts => { index => { multi => 1 } },
1676 paths =>
1677 [ [ { index => 0 }, "{index}", "_refresh" ], [ {}, "_refresh" ] ],
1678 qs => {
1679 allow_no_indices => "boolean",
1680 expand_wildcards => "enum",
1681 filter_path => "list",
1682 force => "boolean",
1683 ignore_unavailable => "boolean",
1684 },
1685 },
1686  
1687 'indices.segments' => {
1688 doc => "indices-segments",
1689 parts => { index => { multi => 1 } },
1690 paths => [
1691 [ { index => 0 }, "{index}", "_segments" ],
1692 [ {}, "_segments" ]
1693 ],
1694 qs => {
1695 allow_no_indices => "boolean",
1696 expand_wildcards => "enum",
1697 filter_path => "list",
1698 human => "boolean",
1699 ignore_unavailable => "boolean",
1700 },
1701 },
1702  
1703 'indices.stats' => {
1704 doc => "indices-stats",
1705 parts => { index => { multi => 1 }, metric => { multi => 1 } },
1706 paths => [
1707 [ { index => 0, metric => 2 }, "{index}", "_stats", "{metric}" ],
1708 [ { index => 0 }, "{index}", "_stats" ],
1709 [ { metric => 1 }, "_stats", "{metric}" ],
1710 [ {}, "_stats" ],
1711 ],
1712 qs => {
1713 completion_fields => "list",
1714 fielddata_fields => "list",
1715 fields => "list",
1716 filter_path => "list",
1717 groups => "list",
1718 human => "boolean",
1719 level => "enum",
1720 types => "list",
1721 },
1722 },
1723  
1724 'indices.status' => {
1725 doc => "indices-status",
1726 parts => { index => { multi => 1 } },
1727 paths =>
1728 [ [ { index => 0 }, "{index}", "_status" ], [ {}, "_status" ] ],
1729 qs => {
1730 allow_no_indices => "boolean",
1731 expand_wildcards => "enum",
1732 filter_path => "list",
1733 human => "boolean",
1734 ignore_unavailable => "boolean",
1735 recovery => "boolean",
1736 snapshot => "boolean",
1737 },
1738 },
1739  
1740 'indices.update_aliases' => {
1741 body => { required => 1 },
1742 doc => "indices-aliases",
1743 method => "POST",
1744 parts => {},
1745 paths => [ [ {}, "_aliases" ] ],
1746 qs => {
1747 filter_path => "list",
1748 master_timeout => "time",
1749 timeout => "time"
1750 },
1751 },
1752  
1753 'indices.upgrade' => {
1754 doc => "indices-upgrade",
1755 method => "POST",
1756 parts => { index => { multi => 1 } },
1757 paths =>
1758 [ [ { index => 0 }, "{index}", "_upgrade" ], [ {}, "_upgrade" ] ],
1759 qs => {
1760 allow_no_indices => "boolean",
1761 expand_wildcards => "enum",
1762 filter_path => "list",
1763 ignore_unavailable => "boolean",
1764 only_ancient_segments => "boolean",
1765 wait_for_completion => "boolean",
1766 },
1767 },
1768  
1769 'indices.validate_query' => {
1770 body => {},
1771 doc => "search-validate",
1772 parts => { index => { multi => 1 }, type => { multi => 1 } },
1773 paths => [
1774 [ { index => 0, type => 1 }, "{index}",
1775 "{type}", "_validate",
1776 "query",
1777 ],
1778 [ { index => 0 }, "{index}", "_validate", "query" ],
1779 [ {}, "_validate", "query" ],
1780 ],
1781 qs => {
1782 allow_no_indices => "boolean",
1783 analyze_wildcard => "boolean",
1784 analyzer => "string",
1785 default_operator => "enum",
1786 df => "string",
1787 expand_wildcards => "enum",
1788 explain => "boolean",
1789 filter_path => "list",
1790 ignore_unavailable => "boolean",
1791 lenient => "boolean",
1792 lowercase_expanded_terms => "boolean",
1793 q => "string",
1794 rewrite => "boolean",
1795 },
1796 },
1797  
1798 'nodes.hot_threads' => {
1799 doc => "cluster-nodes-hot-threads",
1800 parts => { node_id => { multi => 1 } },
1801 paths => [
1802 [ { node_id => 1 }, "_nodes", "{node_id}", "hot_threads" ],
1803 [ {}, "_nodes", "hot_threads" ],
1804 ],
1805 qs => {
1806 filter_path => "list",
1807 ignore_idle_threads => "boolean",
1808 interval => "time",
1809 snapshots => "number",
1810 threads => "number",
1811 timeout => "time",
1812 type => "enum",
1813 },
1814 },
1815  
1816 'nodes.info' => {
1817 doc => "cluster-nodes-info",
1818 parts => { metric => { multi => 1 }, node_id => { multi => 1 } },
1819 paths => [
1820 [ { metric => 2, node_id => 1 }, "_nodes",
1821 "{node_id}", "{metric}",
1822 ],
1823 [ { metric => 1 }, "_nodes", "{metric}" ],
1824 [ { node_id => 1 }, "_nodes", "{node_id}" ],
1825 [ {}, "_nodes" ],
1826 ],
1827 qs => {
1828 filter_path => "list",
1829 flat_settings => "boolean",
1830 human => "boolean",
1831 timeout => "time",
1832 },
1833 },
1834  
1835 'nodes.shutdown' => {
1836 doc => "cluster-nodes-shutdown",
1837 method => "POST",
1838 parts => { node_id => { multi => 1 } },
1839 paths => [
1840 [ { node_id => 2 }, "_cluster",
1841 "nodes", "{node_id}",
1842 "_shutdown"
1843 ],
1844 [ {}, "_shutdown" ],
1845 ],
1846 qs => { delay => "time", exit => "boolean", filter_path => "list" },
1847 },
1848  
1849 'nodes.stats' => {
1850 doc => "cluster-nodes-stats",
1851 parts => {
1852 index_metric => { multi => 1 },
1853 metric => { multi => 1 },
1854 node_id => { multi => 1 },
1855 },
1856 paths => [
1857 [ { index_metric => 4, metric => 3, node_id => 1 },
1858 "_nodes", "{node_id}", "stats", "{metric}", "{index_metric}",
1859 ],
1860 [ { index_metric => 3, metric => 2 }, "_nodes",
1861 "stats", "{metric}",
1862 "{index_metric}",
1863 ],
1864 [ { metric => 3, node_id => 1 }, "_nodes",
1865 "{node_id}", "stats",
1866 "{metric}",
1867 ],
1868 [ { metric => 2 }, "_nodes", "stats", "{metric}" ],
1869 [ { node_id => 1 }, "_nodes", "{node_id}", "stats" ],
1870 [ {}, "_nodes", "stats" ],
1871 ],
1872 qs => {
1873 completion_fields => "list",
1874 fielddata_fields => "list",
1875 fields => "list",
1876 filter_path => "list",
1877 groups => "boolean",
1878 human => "boolean",
1879 level => "enum",
1880 timeout => "time",
1881 types => "list",
1882 },
1883 },
1884  
1885 'snapshot.create' => {
1886 body => {},
1887 doc => "modules-snapshots",
1888 method => "PUT",
1889 parts => {
1890 repository => { required => 1 },
1891 snapshot => { required => 1 }
1892 },
1893 paths => [
1894 [ { repository => 1, snapshot => 2 }, "_snapshot",
1895 "{repository}", "{snapshot}",
1896 ],
1897 ],
1898 qs => {
1899 filter_path => "list",
1900 master_timeout => "time",
1901 wait_for_completion => "boolean",
1902 },
1903 },
1904  
1905 'snapshot.create_repository' => {
1906 body => { required => 1 },
1907 doc => "modules-snapshots",
1908 method => "PUT",
1909 parts => { repository => { required => 1 } },
1910 paths => [ [ { repository => 1 }, "_snapshot", "{repository}" ] ],
1911 qs => {
1912 filter_path => "list",
1913 master_timeout => "time",
1914 timeout => "time",
1915 verify => "boolean",
1916 },
1917 },
1918  
1919 'snapshot.delete' => {
1920 doc => "modules-snapshots",
1921 method => "DELETE",
1922 parts => {
1923 repository => { required => 1 },
1924 snapshot => { required => 1 }
1925 },
1926 paths => [
1927 [ { repository => 1, snapshot => 2 }, "_snapshot",
1928 "{repository}", "{snapshot}",
1929 ],
1930 ],
1931 qs => { filter_path => "list", master_timeout => "time" },
1932 },
1933  
1934 'snapshot.delete_repository' => {
1935 doc => "modules-snapshots",
1936 method => "DELETE",
1937 parts => { repository => { multi => 1, required => 1 } },
1938 paths => [ [ { repository => 1 }, "_snapshot", "{repository}" ] ],
1939 qs => {
1940 filter_path => "list",
1941 master_timeout => "time",
1942 timeout => "time"
1943 },
1944 },
1945  
1946 'snapshot.get' => {
1947 doc => "modules-snapshots",
1948 parts => {
1949 repository => { required => 1 },
1950 snapshot => { multi => 1, required => 1 },
1951 },
1952 paths => [
1953 [ { repository => 1, snapshot => 2 }, "_snapshot",
1954 "{repository}", "{snapshot}",
1955 ],
1956 ],
1957 qs => { filter_path => "list", master_timeout => "time" },
1958 },
1959  
1960 'snapshot.get_repository' => {
1961 doc => "modules-snapshots",
1962 parts => { repository => { multi => 1 } },
1963 paths => [
1964 [ { repository => 1 }, "_snapshot", "{repository}" ],
1965 [ {}, "_snapshot" ],
1966 ],
1967 qs => {
1968 filter_path => "list",
1969 local => "boolean",
1970 master_timeout => "time"
1971 },
1972 },
1973  
1974 'snapshot.restore' => {
1975 body => {},
1976 doc => "modules-snapshots",
1977 method => "POST",
1978 parts => {
1979 repository => { required => 1 },
1980 snapshot => { required => 1 }
1981 },
1982 paths => [
1983 [ { repository => 1, snapshot => 2 }, "_snapshot",
1984 "{repository}", "{snapshot}",
1985 "_restore",
1986 ],
1987 ],
1988 qs => {
1989 filter_path => "list",
1990 master_timeout => "time",
1991 wait_for_completion => "boolean",
1992 },
1993 },
1994  
1995 'snapshot.status' => {
1996 doc => "modules-snapshots",
1997 parts => { repository => {}, snapshot => { multi => 1 } },
1998 paths => [
1999 [ { repository => 1, snapshot => 2 }, "_snapshot",
2000 "{repository}", "{snapshot}",
2001 "_status",
2002 ],
2003 [ { repository => 1 }, "_snapshot", "{repository}", "_status" ],
2004 [ {}, "_snapshot", "_status" ],
2005 ],
2006 qs => { filter_path => "list", master_timeout => "time" },
2007 },
2008  
2009 'snapshot.verify_repository' => {
2010 doc => "modules-snapshots",
2011 method => "POST",
2012 parts => { repository => { required => 1 } },
2013 paths => [
2014 [ { repository => 1 }, "_snapshot", "{repository}", "_verify" ],
2015 ],
2016 qs => {
2017 filter_path => "list",
2018 master_timeout => "time",
2019 timeout => "time"
2020 },
2021 },
2022  
2023 #=== AUTOGEN - END ===
2024  
2025 );
2026  
2027 __PACKAGE__->_qs_init( \%API );
2028 1;
2029  
2030 =pod
2031  
2032 =encoding UTF-8
2033  
2034 =head1 NAME
2035  
2036 Search::Elasticsearch::Client::1_0::Role::API - This class contains the spec for the Elasticsearch APIs
2037  
2038 =head1 VERSION
2039  
2040 version 7.30_1
2041  
2042 =head1 DESCRIPTION
2043  
2044 All of the Elasticsearch APIs are defined in this role. The example given below
2045 is the definition for the L<Search::Elasticsearch::Client::1_0::Direct/index()> method:
2046  
2047 'index' => {
2048 body => { required => 1 },
2049 doc => "docs-index_",
2050 method => "POST",
2051 parts => {
2052 id => {},
2053 index => { required => 1 },
2054 type => { required => 1 }
2055 },
2056 paths => [
2057 [ { id => 2, index => 0, type => 1 }, "{index}",
2058 "{type}", "{id}"
2059 ],
2060 [ { index => 0, type => 1 }, "{index}", "{type}" ],
2061 ],
2062 qs => {
2063 filter_path => "list",
2064 op_type => "enum",
2065 parent => "string",
2066 pipeline => "string",
2067 refresh => "enum",
2068 routing => "string",
2069 timeout => "time",
2070 timestamp => "time",
2071 ttl => "time",
2072 version => "number",
2073 version_type => "enum",
2074 wait_for_active_shards => "string",
2075 },
2076 },
2077  
2078 These definitions can be used by different L<Search::Elasticsearch::Role::Client>
2079 implementations to provide distinct user interfaces.
2080  
2081 =head1 METHODS
2082  
2083 =head2 C<api()>
2084  
2085 $defn = $api->api($name);
2086  
2087 The only method in this class is the C<api()> method which takes the name
2088 of the I<action> and returns its definition. Actions in the
2089 C<indices> or C<cluster> namespace use the namespace as a prefix, eg:
2090  
2091 $defn = $e->api('indices.create');
2092 $defn = $e->api('cluster.node_stats');
2093  
2094 =head1 SEE ALSO
2095  
2096 =over
2097  
2098 =item *
2099  
2100 L<Search::Elasticsearch::Role::API>
2101  
2102 =item *
2103  
2104 L<Search::Elasticsearch::Client::1_0::Direct>
2105  
2106 =back
2107  
2108 =head1 AUTHOR
2109  
2110 Enrico Zimuel <enrico.zimuel@elastic.co>
2111  
2112 =head1 COPYRIGHT AND LICENSE
2113  
2114 This software is Copyright (c) 2020 by Elasticsearch BV.
2115  
2116 This is free software, licensed under:
2117  
2118 The Apache License, Version 2.0, January 2004
2119  
2120 =cut
2121  
2122 __END__