2_0/Role/API.pm untested

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