File Coverage

blib/lib/Search/Elasticsearch/Client/5_0/Role/API.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition 3 5 60.0
subroutine 4 4 100.0
pod 1 1 100.0
total 19 21 90.4


line stmt bran cond sub pod time code
1             package Search::Elasticsearch::Client::5_0::Role::API;
2             $Search::Elasticsearch::Client::5_0::Role::API::VERSION = '6.00';
3 1     1   1180 use Moo::Role;
  1         4  
  1         12  
4             with 'Search::Elasticsearch::Role::API';
5              
6 1     1   671 use Search::Elasticsearch::Util qw(throw);
  1         3  
  1         13  
7 1     1   480 use namespace::clean;
  1         4  
  1         11  
8              
9             has 'api_version' => ( is => 'ro', default => '5_0' );
10              
11             our %API;
12              
13             #===================================
14             sub api {
15             #===================================
16 5   100 5 1 29 my $name = $_[1] || return \%API;
17 4   33     16 return $API{$name}
18             || throw( 'Internal', "Unknown api name ($name)" );
19             }
20              
21             #===================================
22             %API = (
23             #===================================
24              
25             'bulk.metadata' => {
26             params => {
27             '_index' => '_index',
28             'index' => '_index',
29             '_type' => '_type',
30             'type' => '_type',
31             '_id' => '_id',
32             'id' => '_id',
33             'pipeline' => 'pipeline',
34             'routing' => 'routing',
35             '_routing' => 'routing',
36             'parent' => 'parent',
37             '_parent' => 'parent',
38             'timestamp' => 'timestamp',
39             '_timestamp' => 'timestamp',
40             'ttl' => 'ttl',
41             '_ttl' => 'ttl',
42             'version' => 'version',
43             '_version' => 'version',
44             'version_type' => 'version_type',
45             '_version_type' => 'version_type'
46             }
47             },
48             'bulk.update' => {
49             params => [
50             '_source', '_source_include',
51             '_source_exclude', 'detect_noop',
52             'doc', 'doc_as_upsert',
53             'fields', 'scripted_upsert',
54             'script', 'upsert',
55             ]
56             },
57             'bulk.required' => { params => [ 'index', 'type' ] },
58              
59             #=== AUTOGEN - START ===
60              
61             'bulk' => {
62             body => { required => 1 },
63             doc => "docs-bulk",
64             method => "POST",
65             parts => { index => {}, type => {} },
66             paths => [
67             [ { index => 0, type => 1 }, "{index}", "{type}", "_bulk" ],
68             [ { index => 0 }, "{index}", "_bulk" ],
69             [ {}, "_bulk" ],
70             ],
71             qs => {
72             _source => "list",
73             _source_exclude => "list",
74             _source_include => "list",
75             error_trace => "boolean",
76             fields => "list",
77             filter_path => "list",
78             human => "boolean",
79             pipeline => "string",
80             refresh => "enum",
81             routing => "string",
82             timeout => "time",
83             wait_for_active_shards => "string",
84             },
85             serialize => "bulk",
86             },
87              
88             'clear_scroll' => {
89             body => {},
90             doc => "search-request-scroll",
91             method => "DELETE",
92             parts => { scroll_id => { multi => 1 } },
93             paths => [
94             [ { scroll_id => 2 }, "_search", "scroll", "{scroll_id}" ],
95             [ {}, "_search", "scroll" ],
96             ],
97             qs => {
98             error_trace => "boolean",
99             filter_path => "list",
100             human => "boolean"
101             },
102             },
103              
104             'count' => {
105             body => {},
106             doc => "search-count",
107             method => "POST",
108             parts => { index => { multi => 1 }, type => { multi => 1 } },
109             paths => [
110             [ { index => 0, type => 1 }, "{index}", "{type}", "_count" ],
111             [ { index => 0 }, "{index}", "_count" ],
112             [ {}, "_count" ],
113             ],
114             qs => {
115             allow_no_indices => "boolean",
116             analyze_wildcard => "boolean",
117             analyzer => "string",
118             default_operator => "enum",
119             df => "string",
120             error_trace => "boolean",
121             expand_wildcards => "enum",
122             filter_path => "list",
123             human => "boolean",
124             ignore_unavailable => "boolean",
125             lenient => "boolean",
126             min_score => "number",
127             preference => "string",
128             q => "string",
129             routing => "list",
130             terminate_after => "number",
131             },
132             },
133              
134             'count_percolate' => {
135             body => {},
136             doc => "search-percolate",
137             parts => {
138             id => {},
139             index => { required => 1 },
140             type => { required => 1 }
141             },
142             paths => [
143             [ { id => 2, index => 0, type => 1 }, "{index}",
144             "{type}", "{id}",
145             "_percolate", "count",
146             ],
147             [ { index => 0, type => 1 }, "{index}",
148             "{type}", "_percolate",
149             "count",
150             ],
151             ],
152             qs => {
153             allow_no_indices => "boolean",
154             error_trace => "boolean",
155             expand_wildcards => "enum",
156             filter_path => "list",
157             human => "boolean",
158             ignore_unavailable => "boolean",
159             percolate_index => "string",
160             percolate_type => "string",
161             preference => "string",
162             routing => "list",
163             version => "number",
164             version_type => "enum",
165             },
166             },
167              
168             'create' => {
169             body => { required => 1 },
170             doc => "docs-index_",
171             method => "PUT",
172             parts => {
173             id => { required => 1 },
174             index => { required => 1 },
175             type => { required => 1 },
176             },
177             paths => [
178             [ { id => 2, index => 0, type => 1 },
179             "{index}", "{type}", "{id}", "_create",
180             ],
181             ],
182             qs => {
183             error_trace => "boolean",
184             filter_path => "list",
185             human => "boolean",
186             parent => "string",
187             pipeline => "string",
188             refresh => "enum",
189             routing => "string",
190             timeout => "time",
191             timestamp => "time",
192             ttl => "time",
193             version => "number",
194             version_type => "enum",
195             wait_for_active_shards => "string",
196             },
197             },
198              
199             'delete' => {
200             doc => "docs-delete",
201             method => "DELETE",
202             parts => {
203             id => { required => 1 },
204             index => { required => 1 },
205             type => { required => 1 },
206             },
207             paths => [
208             [ { id => 2, index => 0, type => 1 }, "{index}",
209             "{type}", "{id}"
210             ],
211             ],
212             qs => {
213             error_trace => "boolean",
214             filter_path => "list",
215             human => "boolean",
216             parent => "string",
217             refresh => "enum",
218             routing => "string",
219             timeout => "time",
220             version => "number",
221             version_type => "enum",
222             wait_for_active_shards => "string",
223             },
224             },
225              
226             'delete_by_query' => {
227             body => { required => 1 },
228             doc => "docs-delete-by-query",
229             method => "POST",
230             parts => {
231             index => { multi => 1, required => 1 },
232             type => { multi => 1 }
233             },
234             paths => [
235             [ { index => 0, type => 1 }, "{index}",
236             "{type}", "_delete_by_query",
237             ],
238             [ { index => 0 }, "{index}", "_delete_by_query" ],
239             ],
240             qs => {
241             _source => "list",
242             _source_exclude => "list",
243             _source_include => "list",
244             allow_no_indices => "boolean",
245             analyze_wildcard => "boolean",
246             analyzer => "string",
247             conflicts => "enum",
248             default_operator => "enum",
249             df => "string",
250             error_trace => "boolean",
251             expand_wildcards => "enum",
252             filter_path => "list",
253             from => "number",
254             human => "boolean",
255             ignore_unavailable => "boolean",
256             lenient => "boolean",
257             preference => "string",
258             q => "string",
259             refresh => "boolean",
260             request_cache => "boolean",
261             requests_per_second => "number",
262             routing => "list",
263             scroll => "time",
264             scroll_size => "number",
265             search_timeout => "time",
266             search_type => "enum",
267             size => "number",
268             slices => "number",
269             sort => "list",
270             stats => "list",
271             terminate_after => "number",
272             timeout => "time",
273             version => "boolean",
274             wait_for_active_shards => "string",
275             wait_for_completion => "boolean",
276             },
277             },
278              
279             'delete_script' => {
280             doc => "modules-scripting",
281             method => "DELETE",
282             parts => { id => { required => 1 }, lang => { required => 1 } },
283             paths => [
284             [ { id => 2, lang => 1 }, "_scripts", "{lang}", "{id}" ],
285             [ { lang => 1 }, "_scripts", "{lang}" ],
286             ],
287             qs => {
288             error_trace => "boolean",
289             filter_path => "list",
290             human => "boolean",
291             master_timeout => "time",
292             timeout => "time",
293             },
294             },
295              
296             'delete_template' => {
297             doc => "search-template",
298             method => "DELETE",
299             parts => { id => { required => 1 } },
300             paths => [ [ { id => 2 }, "_search", "template", "{id}" ] ],
301             qs => {
302             error_trace => "boolean",
303             filter_path => "list",
304             human => "boolean"
305             },
306             },
307              
308             'exists' => {
309             doc => "docs-get",
310             method => "HEAD",
311             parts => {
312             id => { required => 1 },
313             index => { required => 1 },
314             type => { required => 1 },
315             },
316             paths => [
317             [ { id => 2, index => 0, type => 1 }, "{index}",
318             "{type}", "{id}"
319             ],
320             ],
321             qs => {
322             _source => "list",
323             _source_exclude => "list",
324             _source_include => "list",
325             error_trace => "boolean",
326             filter_path => "list",
327             human => "boolean",
328             parent => "string",
329             preference => "string",
330             realtime => "boolean",
331             refresh => "boolean",
332             routing => "string",
333             stored_fields => "list",
334             version => "number",
335             version_type => "enum",
336             },
337             },
338              
339             'exists_source' => {
340             doc => "docs-get",
341             method => "HEAD",
342             parts => {
343             id => { required => 1 },
344             index => { required => 1 },
345             type => { required => 1 },
346             },
347             paths => [
348             [ { id => 2, index => 0, type => 1 },
349             "{index}", "{type}", "{id}", "_source",
350             ],
351             ],
352             qs => {
353             _source => "list",
354             _source_exclude => "list",
355             _source_include => "list",
356             error_trace => "boolean",
357             filter_path => "list",
358             human => "boolean",
359             parent => "string",
360             preference => "string",
361             realtime => "boolean",
362             refresh => "boolean",
363             routing => "string",
364             version => "number",
365             version_type => "enum",
366             },
367             },
368              
369             'explain' => {
370             body => {},
371             doc => "search-explain",
372             parts => {
373             id => { required => 1 },
374             index => { required => 1 },
375             type => { required => 1 },
376             },
377             paths => [
378             [ { id => 2, index => 0, type => 1 }, "{index}",
379             "{type}", "{id}",
380             "_explain",
381             ],
382             ],
383             qs => {
384             _source => "list",
385             _source_exclude => "list",
386             _source_include => "list",
387             analyze_wildcard => "boolean",
388             analyzer => "string",
389             default_operator => "enum",
390             df => "string",
391             error_trace => "boolean",
392             filter_path => "list",
393             human => "boolean",
394             lenient => "boolean",
395             parent => "string",
396             preference => "string",
397             q => "string",
398             routing => "string",
399             stored_fields => "list",
400             },
401             },
402              
403             'field_caps' => {
404             body => {},
405             doc => "search-field-caps",
406             parts => { index => { multi => 1 } },
407             paths => [
408             [ { index => 0 }, "{index}", "_field_caps" ],
409             [ {}, "_field_caps" ],
410             ],
411             qs => {
412             allow_no_indices => "boolean",
413             error_trace => "boolean",
414             expand_wildcards => "enum",
415             fields => "list",
416             filter_path => "list",
417             human => "boolean",
418             ignore_unavailable => "boolean",
419             },
420             },
421              
422             'field_stats' => {
423             body => {},
424             doc => "search-field-stats",
425             parts => { index => { multi => 1 } },
426             paths => [
427             [ { index => 0 }, "{index}", "_field_stats" ],
428             [ {}, "_field_stats" ],
429             ],
430             qs => {
431             allow_no_indices => "boolean",
432             error_trace => "boolean",
433             expand_wildcards => "enum",
434             fields => "list",
435             filter_path => "list",
436             human => "boolean",
437             ignore_unavailable => "boolean",
438             level => "enum",
439             },
440             },
441              
442             'get' => {
443             doc => "docs-get",
444             parts => {
445             id => { required => 1 },
446             index => { required => 1 },
447             type => { required => 1 },
448             },
449             paths => [
450             [ { id => 2, index => 0, type => 1 }, "{index}",
451             "{type}", "{id}"
452             ],
453             ],
454             qs => {
455             _source => "list",
456             _source_exclude => "list",
457             _source_include => "list",
458             error_trace => "boolean",
459             filter_path => "list",
460             human => "boolean",
461             parent => "string",
462             preference => "string",
463             realtime => "boolean",
464             refresh => "boolean",
465             routing => "string",
466             stored_fields => "list",
467             version => "number",
468             version_type => "enum",
469             },
470             },
471              
472             'get_script' => {
473             doc => "modules-scripting",
474             parts => { id => { required => 1 }, lang => { required => 1 } },
475             paths => [
476             [ { id => 2, lang => 1 }, "_scripts", "{lang}", "{id}" ],
477             [ { lang => 1 }, "_scripts", "{lang}" ],
478             ],
479             qs => {
480             error_trace => "boolean",
481             filter_path => "list",
482             human => "boolean"
483             },
484             },
485              
486             'get_source' => {
487             doc => "docs-get",
488             parts => {
489             id => { required => 1 },
490             index => { required => 1 },
491             type => { required => 1 },
492             },
493             paths => [
494             [ { id => 2, index => 0, type => 1 },
495             "{index}", "{type}", "{id}", "_source",
496             ],
497             ],
498             qs => {
499             _source => "list",
500             _source_exclude => "list",
501             _source_include => "list",
502             error_trace => "boolean",
503             filter_path => "list",
504             human => "boolean",
505             parent => "string",
506             preference => "string",
507             realtime => "boolean",
508             refresh => "boolean",
509             routing => "string",
510             version => "number",
511             version_type => "enum",
512             },
513             },
514              
515             'get_template' => {
516             doc => "search-template",
517             parts => { id => { required => 1 } },
518             paths => [ [ { id => 2 }, "_search", "template", "{id}" ] ],
519             qs => {
520             error_trace => "boolean",
521             filter_path => "list",
522             human => "boolean"
523             },
524             },
525              
526             'index' => {
527             body => { required => 1 },
528             doc => "docs-index_",
529             method => "POST",
530             parts => {
531             id => {},
532             index => { required => 1 },
533             type => { required => 1 }
534             },
535             paths => [
536             [ { id => 2, index => 0, type => 1 }, "{index}",
537             "{type}", "{id}"
538             ],
539             [ { index => 0, type => 1 }, "{index}", "{type}" ],
540             ],
541             qs => {
542             error_trace => "boolean",
543             filter_path => "list",
544             human => "boolean",
545             op_type => "enum",
546             parent => "string",
547             pipeline => "string",
548             refresh => "enum",
549             routing => "string",
550             timeout => "time",
551             timestamp => "time",
552             ttl => "time",
553             version => "number",
554             version_type => "enum",
555             wait_for_active_shards => "string",
556             },
557             },
558              
559             'info' => {
560             doc => "",
561             parts => {},
562             paths => [ [ {} ] ],
563             qs => {
564             error_trace => "boolean",
565             filter_path => "list",
566             human => "boolean"
567             },
568             },
569              
570             'mget' => {
571             body => { required => 1 },
572             doc => "docs-multi-get",
573             parts => { index => {}, type => {} },
574             paths => [
575             [ { index => 0, type => 1 }, "{index}", "{type}", "_mget" ],
576             [ { index => 0 }, "{index}", "_mget" ],
577             [ {}, "_mget" ],
578             ],
579             qs => {
580             _source => "list",
581             _source_exclude => "list",
582             _source_include => "list",
583             error_trace => "boolean",
584             filter_path => "list",
585             human => "boolean",
586             preference => "string",
587             realtime => "boolean",
588             refresh => "boolean",
589             routing => "string",
590             stored_fields => "list",
591             },
592             },
593              
594             'mpercolate' => {
595             body => { required => 1 },
596             doc => "search-percolate",
597             parts => { index => {}, type => {} },
598             paths => [
599             [ { index => 0, type => 1 }, "{index}", "{type}", "_mpercolate" ],
600             [ { index => 0 }, "{index}", "_mpercolate" ],
601             [ {}, "_mpercolate" ],
602             ],
603             qs => {
604             allow_no_indices => "boolean",
605             error_trace => "boolean",
606             expand_wildcards => "enum",
607             filter_path => "list",
608             human => "boolean",
609             ignore_unavailable => "boolean",
610             },
611             serialize => "bulk",
612             },
613              
614             'msearch' => {
615             body => { required => 1 },
616             doc => "search-multi-search",
617             parts => { index => { multi => 1 }, type => { multi => 1 } },
618             paths => [
619             [ { index => 0, type => 1 }, "{index}", "{type}", "_msearch" ],
620             [ { index => 0 }, "{index}", "_msearch" ],
621             [ {}, "_msearch" ],
622             ],
623             qs => {
624             error_trace => "boolean",
625             filter_path => "list",
626             human => "boolean",
627             max_concurrent_searches => "number",
628             pre_filter_shard_size => "number",
629             search_type => "enum",
630             typed_keys => "boolean",
631             },
632             serialize => "bulk",
633             },
634              
635             'msearch_template' => {
636             body => { required => 1 },
637             doc => "search-template",
638             parts => { index => { multi => 1 }, type => { multi => 1 } },
639             paths => [
640             [ { index => 0, type => 1 }, "{index}",
641             "{type}", "_msearch",
642             "template",
643             ],
644             [ { index => 0 }, "{index}", "_msearch", "template" ],
645             [ {}, "_msearch", "template" ],
646             ],
647             qs => {
648             error_trace => "boolean",
649             filter_path => "list",
650             human => "boolean",
651             max_concurrent_searches => "number",
652             search_type => "enum",
653             typed_keys => "boolean",
654             },
655             serialize => "bulk",
656             },
657              
658             'mtermvectors' => {
659             body => {},
660             doc => "docs-multi-termvectors",
661             parts => { index => {}, type => {} },
662             paths => [
663             [ { index => 0, type => 1 }, "{index}",
664             "{type}", "_mtermvectors"
665             ],
666             [ { index => 0 }, "{index}", "_mtermvectors" ],
667             [ {}, "_mtermvectors" ],
668             ],
669             qs => {
670             error_trace => "boolean",
671             field_statistics => "boolean",
672             fields => "list",
673             filter_path => "list",
674             human => "boolean",
675             ids => "list",
676             offsets => "boolean",
677             parent => "string",
678             payloads => "boolean",
679             positions => "boolean",
680             preference => "string",
681             realtime => "boolean",
682             routing => "string",
683             term_statistics => "boolean",
684             version => "number",
685             version_type => "enum",
686             },
687             },
688              
689             'percolate' => {
690             body => {},
691             doc => "search-percolate",
692             parts => {
693             id => {},
694             index => { required => 1 },
695             type => { required => 1 }
696             },
697             paths => [
698             [ { id => 2, index => 0, type => 1 }, "{index}",
699             "{type}", "{id}",
700             "_percolate",
701             ],
702             [ { index => 0, type => 1 }, "{index}", "{type}", "_percolate" ],
703             ],
704             qs => {
705             allow_no_indices => "boolean",
706             error_trace => "boolean",
707             expand_wildcards => "enum",
708             filter_path => "list",
709             human => "boolean",
710             ignore_unavailable => "boolean",
711             percolate_format => "enum",
712             percolate_index => "string",
713             percolate_preference => "string",
714             percolate_routing => "string",
715             percolate_type => "string",
716             preference => "string",
717             routing => "list",
718             version => "number",
719             version_type => "enum",
720             },
721             },
722              
723             'ping' => {
724             doc => "",
725             method => "HEAD",
726             parts => {},
727             paths => [ [ {} ] ],
728             qs => {
729             error_trace => "boolean",
730             filter_path => "list",
731             human => "boolean"
732             },
733             },
734              
735             'put_script' => {
736             body => { required => 1 },
737             doc => "modules-scripting",
738             method => "PUT",
739             parts => { id => { required => 1 }, lang => { required => 1 } },
740             paths => [
741             [ { id => 2, lang => 1 }, "_scripts", "{lang}", "{id}" ],
742             [ { lang => 1 }, "_scripts", "{lang}" ],
743             ],
744             qs => {
745             error_trace => "boolean",
746             filter_path => "list",
747             human => "boolean",
748             master_timeout => "time",
749             timeout => "time",
750             },
751             },
752              
753             'put_template' => {
754             body => { required => 1 },
755             doc => "search-template",
756             method => "PUT",
757             parts => { id => { required => 1 } },
758             paths => [ [ { id => 2 }, "_search", "template", "{id}" ] ],
759             qs => {
760             error_trace => "boolean",
761             filter_path => "list",
762             human => "boolean"
763             },
764             },
765              
766             'reindex' => {
767             body => { required => 1 },
768             doc => "docs-reindex",
769             method => "POST",
770             parts => {},
771             paths => [ [ {}, "_reindex" ] ],
772             qs => {
773             error_trace => "boolean",
774             filter_path => "list",
775             human => "boolean",
776             refresh => "boolean",
777             requests_per_second => "number",
778             slices => "number",
779             timeout => "time",
780             wait_for_active_shards => "string",
781             wait_for_completion => "boolean",
782             },
783             },
784              
785             'reindex_rethrottle' => {
786             doc => "docs-reindex",
787             method => "POST",
788             parts => { task_id => {} },
789             paths =>
790             [ [ { task_id => 1 }, "_reindex", "{task_id}", "_rethrottle" ] ],
791             qs => {
792             error_trace => "boolean",
793             filter_path => "list",
794             human => "boolean",
795             requests_per_second => "number",
796             },
797             },
798              
799             'render_search_template' => {
800             body => {},
801             doc => "search-template",
802             parts => { id => {} },
803             paths => [
804             [ { id => 2 }, "_render", "template", "{id}" ],
805             [ {}, "_render", "template" ],
806             ],
807             qs => {
808             error_trace => "boolean",
809             filter_path => "list",
810             human => "boolean"
811             },
812             },
813              
814             'scroll' => {
815             body => {},
816             doc => "search-request-scroll",
817             parts => { scroll_id => {} },
818             paths => [
819             [ { scroll_id => 2 }, "_search", "scroll", "{scroll_id}" ],
820             [ {}, "_search", "scroll" ],
821             ],
822             qs => {
823             error_trace => "boolean",
824             filter_path => "list",
825             human => "boolean",
826             scroll => "time",
827             },
828             },
829              
830             'search' => {
831             body => {},
832             doc => "search-search",
833             parts => { index => { multi => 1 }, type => { multi => 1 } },
834             paths => [
835             [ { index => 0, type => 1 }, "{index}", "{type}", "_search" ],
836             [ { index => 0 }, "{index}", "_search" ],
837             [ {}, "_search" ],
838             ],
839             qs => {
840             _source => "list",
841             _source_exclude => "list",
842             _source_include => "list",
843             allow_no_indices => "boolean",
844             analyze_wildcard => "boolean",
845             analyzer => "string",
846             batched_reduce_size => "number",
847             default_operator => "enum",
848             df => "string",
849             docvalue_fields => "list",
850             error_trace => "boolean",
851             expand_wildcards => "enum",
852             explain => "boolean",
853             fielddata_fields => "list",
854             filter_path => "list",
855             from => "number",
856             human => "boolean",
857             ignore_unavailable => "boolean",
858             lenient => "boolean",
859             max_concurrent_shard_requests => "number",
860             pre_filter_shard_size => "number",
861             preference => "string",
862             q => "string",
863             request_cache => "boolean",
864             routing => "list",
865             scroll => "time",
866             search_type => "enum",
867             size => "number",
868             sort => "list",
869             stats => "list",
870             stored_fields => "list",
871             suggest_field => "string",
872             suggest_mode => "enum",
873             suggest_size => "number",
874             suggest_text => "string",
875             terminate_after => "number",
876             timeout => "time",
877             track_scores => "boolean",
878             typed_keys => "boolean",
879             version => "boolean",
880             },
881             },
882              
883             'search_shards' => {
884             doc => "search-shards",
885             parts => { index => { multi => 1 }, type => { multi => 1 } },
886             paths => [
887             [ { index => 0, type => 1 }, "{index}",
888             "{type}", "_search_shards",
889             ],
890             [ { index => 0 }, "{index}", "_search_shards" ],
891             [ {}, "_search_shards" ],
892             ],
893             qs => {
894             allow_no_indices => "boolean",
895             error_trace => "boolean",
896             expand_wildcards => "enum",
897             filter_path => "list",
898             human => "boolean",
899             ignore_unavailable => "boolean",
900             local => "boolean",
901             preference => "string",
902             routing => "string",
903             },
904             },
905              
906             'search_template' => {
907             body => {},
908             doc => "search-template",
909             parts => { index => { multi => 1 }, type => { multi => 1 } },
910             paths => [
911             [ { index => 0, type => 1 }, "{index}",
912             "{type}", "_search",
913             "template",
914             ],
915             [ { index => 0 }, "{index}", "_search", "template" ],
916             [ {}, "_search", "template" ],
917             ],
918             qs => {
919             allow_no_indices => "boolean",
920             error_trace => "boolean",
921             expand_wildcards => "enum",
922             explain => "boolean",
923             filter_path => "list",
924             human => "boolean",
925             ignore_unavailable => "boolean",
926             preference => "string",
927             profile => "boolean",
928             routing => "list",
929             scroll => "time",
930             search_type => "enum",
931             typed_keys => "boolean",
932             },
933             },
934              
935             'suggest' => {
936             body => { required => 1 },
937             doc => "search-suggesters",
938             method => "POST",
939             parts => { index => { multi => 1 } },
940             paths =>
941             [ [ { index => 0 }, "{index}", "_suggest" ], [ {}, "_suggest" ] ],
942             qs => {
943             allow_no_indices => "boolean",
944             error_trace => "boolean",
945             expand_wildcards => "enum",
946             filter_path => "list",
947             human => "boolean",
948             ignore_unavailable => "boolean",
949             preference => "string",
950             routing => "string",
951             },
952             },
953              
954             'termvectors' => {
955             body => {},
956             doc => "docs-termvectors",
957             parts => {
958             id => {},
959             index => { required => 1 },
960             type => { required => 1 }
961             },
962             paths => [
963             [ { id => 2, index => 0, type => 1 }, "{index}",
964             "{type}", "{id}",
965             "_termvectors",
966             ],
967             [ { index => 0, type => 1 }, "{index}", "{type}",
968             "_termvectors"
969             ],
970             ],
971             qs => {
972             error_trace => "boolean",
973             field_statistics => "boolean",
974             fields => "list",
975             filter_path => "list",
976             human => "boolean",
977             offsets => "boolean",
978             parent => "string",
979             payloads => "boolean",
980             positions => "boolean",
981             preference => "string",
982             realtime => "boolean",
983             routing => "string",
984             term_statistics => "boolean",
985             version => "number",
986             version_type => "enum",
987             },
988             },
989              
990             'update' => {
991             body => {},
992             doc => "docs-update",
993             method => "POST",
994             parts => {
995             id => { required => 1 },
996             index => { required => 1 },
997             type => { required => 1 },
998             },
999             paths => [
1000             [ { id => 2, index => 0, type => 1 },
1001             "{index}", "{type}", "{id}", "_update",
1002             ],
1003             ],
1004             qs => {
1005             _source => "list",
1006             _source_exclude => "list",
1007             _source_include => "list",
1008             error_trace => "boolean",
1009             fields => "list",
1010             filter_path => "list",
1011             human => "boolean",
1012             lang => "string",
1013             parent => "string",
1014             refresh => "enum",
1015             retry_on_conflict => "number",
1016             routing => "string",
1017             timeout => "time",
1018             timestamp => "time",
1019             ttl => "time",
1020             version => "number",
1021             version_type => "enum",
1022             wait_for_active_shards => "string",
1023             },
1024             },
1025              
1026             'update_by_query' => {
1027             body => {},
1028             doc => "docs-update-by-query",
1029             method => "POST",
1030             parts => {
1031             index => { multi => 1, required => 1 },
1032             type => { multi => 1 }
1033             },
1034             paths => [
1035             [ { index => 0, type => 1 }, "{index}",
1036             "{type}", "_update_by_query",
1037             ],
1038             [ { index => 0 }, "{index}", "_update_by_query" ],
1039             ],
1040             qs => {
1041             _source => "list",
1042             _source_exclude => "list",
1043             _source_include => "list",
1044             allow_no_indices => "boolean",
1045             analyze_wildcard => "boolean",
1046             analyzer => "string",
1047             conflicts => "enum",
1048             default_operator => "enum",
1049             df => "string",
1050             error_trace => "boolean",
1051             expand_wildcards => "enum",
1052             filter_path => "list",
1053             from => "number",
1054             human => "boolean",
1055             ignore_unavailable => "boolean",
1056             lenient => "boolean",
1057             pipeline => "string",
1058             preference => "string",
1059             q => "string",
1060             refresh => "boolean",
1061             request_cache => "boolean",
1062             requests_per_second => "number",
1063             routing => "list",
1064             scroll => "time",
1065             scroll_size => "number",
1066             search_timeout => "time",
1067             search_type => "enum",
1068             size => "number",
1069             slices => "number",
1070             sort => "list",
1071             stats => "list",
1072             terminate_after => "number",
1073             timeout => "time",
1074             version => "boolean",
1075             version_type => "boolean",
1076             wait_for_active_shards => "string",
1077             wait_for_completion => "boolean",
1078             },
1079             },
1080              
1081             'cat.aliases' => {
1082             doc => "cat-alias",
1083             parts => { name => { multi => 1 } },
1084             paths => [
1085             [ { name => 2 }, "_cat", "aliases", "{name}" ],
1086             [ {}, "_cat", "aliases" ],
1087             ],
1088             qs => {
1089             error_trace => "boolean",
1090             filter_path => "list",
1091             format => "string",
1092             h => "list",
1093             help => "boolean",
1094             human => "boolean",
1095             local => "boolean",
1096             master_timeout => "time",
1097             s => "list",
1098             v => "boolean",
1099             },
1100             },
1101              
1102             'cat.allocation' => {
1103             doc => "cat-allocation",
1104             parts => { node_id => { multi => 1 } },
1105             paths => [
1106             [ { node_id => 2 }, "_cat", "allocation", "{node_id}" ],
1107             [ {}, "_cat", "allocation" ],
1108             ],
1109             qs => {
1110             bytes => "enum",
1111             error_trace => "boolean",
1112             filter_path => "list",
1113             format => "string",
1114             h => "list",
1115             help => "boolean",
1116             human => "boolean",
1117             local => "boolean",
1118             master_timeout => "time",
1119             s => "list",
1120             v => "boolean",
1121             },
1122             },
1123              
1124             'cat.count' => {
1125             doc => "cat-count",
1126             parts => { index => { multi => 1 } },
1127             paths => [
1128             [ { index => 2 }, "_cat", "count", "{index}" ],
1129             [ {}, "_cat", "count" ],
1130             ],
1131             qs => {
1132             error_trace => "boolean",
1133             filter_path => "list",
1134             format => "string",
1135             h => "list",
1136             help => "boolean",
1137             human => "boolean",
1138             local => "boolean",
1139             master_timeout => "time",
1140             s => "list",
1141             v => "boolean",
1142             },
1143             },
1144              
1145             'cat.fielddata' => {
1146             doc => "cat-fielddata",
1147             parts => { fields => { multi => 1 } },
1148             paths => [
1149             [ { fields => 2 }, "_cat", "fielddata", "{fields}" ],
1150             [ {}, "_cat", "fielddata" ],
1151             ],
1152             qs => {
1153             bytes => "enum",
1154             error_trace => "boolean",
1155             filter_path => "list",
1156             format => "string",
1157             h => "list",
1158             help => "boolean",
1159             human => "boolean",
1160             local => "boolean",
1161             master_timeout => "time",
1162             s => "list",
1163             v => "boolean",
1164             },
1165             },
1166              
1167             'cat.health' => {
1168             doc => "cat-health",
1169             parts => {},
1170             paths => [ [ {}, "_cat", "health" ] ],
1171             qs => {
1172             error_trace => "boolean",
1173             filter_path => "list",
1174             format => "string",
1175             h => "list",
1176             help => "boolean",
1177             human => "boolean",
1178             local => "boolean",
1179             master_timeout => "time",
1180             s => "list",
1181             ts => "boolean",
1182             v => "boolean",
1183             },
1184             },
1185              
1186             'cat.help' => {
1187             doc => "cat",
1188             parts => {},
1189             paths => [ [ {}, "_cat" ] ],
1190             qs => {
1191             error_trace => "boolean",
1192             filter_path => "list",
1193             help => "boolean",
1194             human => "boolean",
1195             s => "list",
1196             },
1197             },
1198              
1199             'cat.indices' => {
1200             doc => "cat-indices",
1201             parts => { index => { multi => 1 } },
1202             paths => [
1203             [ { index => 2 }, "_cat", "indices", "{index}" ],
1204             [ {}, "_cat", "indices" ],
1205             ],
1206             qs => {
1207             bytes => "enum",
1208             error_trace => "boolean",
1209             filter_path => "list",
1210             format => "string",
1211             h => "list",
1212             health => "enum",
1213             help => "boolean",
1214             human => "boolean",
1215             local => "boolean",
1216             master_timeout => "time",
1217             pri => "boolean",
1218             s => "list",
1219             v => "boolean",
1220             },
1221             },
1222              
1223             'cat.master' => {
1224             doc => "cat-master",
1225             parts => {},
1226             paths => [ [ {}, "_cat", "master" ] ],
1227             qs => {
1228             error_trace => "boolean",
1229             filter_path => "list",
1230             format => "string",
1231             h => "list",
1232             help => "boolean",
1233             human => "boolean",
1234             local => "boolean",
1235             master_timeout => "time",
1236             s => "list",
1237             v => "boolean",
1238             },
1239             },
1240              
1241             'cat.nodeattrs' => {
1242             doc => "cat-nodeattrs",
1243             parts => {},
1244             paths => [ [ {}, "_cat", "nodeattrs" ] ],
1245             qs => {
1246             error_trace => "boolean",
1247             filter_path => "list",
1248             format => "string",
1249             h => "list",
1250             help => "boolean",
1251             human => "boolean",
1252             local => "boolean",
1253             master_timeout => "time",
1254             s => "list",
1255             v => "boolean",
1256             },
1257             },
1258              
1259             'cat.nodes' => {
1260             doc => "cat-nodes",
1261             parts => {},
1262             paths => [ [ {}, "_cat", "nodes" ] ],
1263             qs => {
1264             error_trace => "boolean",
1265             filter_path => "list",
1266             format => "string",
1267             full_id => "boolean",
1268             h => "list",
1269             help => "boolean",
1270             human => "boolean",
1271             local => "boolean",
1272             master_timeout => "time",
1273             s => "list",
1274             v => "boolean",
1275             },
1276             },
1277              
1278             'cat.pending_tasks' => {
1279             doc => "cat-pending-tasks",
1280             parts => {},
1281             paths => [ [ {}, "_cat", "pending_tasks" ] ],
1282             qs => {
1283             error_trace => "boolean",
1284             filter_path => "list",
1285             format => "string",
1286             h => "list",
1287             help => "boolean",
1288             human => "boolean",
1289             local => "boolean",
1290             master_timeout => "time",
1291             s => "list",
1292             v => "boolean",
1293             },
1294             },
1295              
1296             'cat.plugins' => {
1297             doc => "cat-plugins",
1298             parts => {},
1299             paths => [ [ {}, "_cat", "plugins" ] ],
1300             qs => {
1301             error_trace => "boolean",
1302             filter_path => "list",
1303             format => "string",
1304             h => "list",
1305             help => "boolean",
1306             human => "boolean",
1307             local => "boolean",
1308             master_timeout => "time",
1309             s => "list",
1310             v => "boolean",
1311             },
1312             },
1313              
1314             'cat.recovery' => {
1315             doc => "cat-recovery",
1316             parts => { index => { multi => 1 } },
1317             paths => [
1318             [ { index => 2 }, "_cat", "recovery", "{index}" ],
1319             [ {}, "_cat", "recovery" ],
1320             ],
1321             qs => {
1322             bytes => "enum",
1323             error_trace => "boolean",
1324             filter_path => "list",
1325             format => "string",
1326             h => "list",
1327             help => "boolean",
1328             human => "boolean",
1329             master_timeout => "time",
1330             s => "list",
1331             v => "boolean",
1332             },
1333             },
1334              
1335             'cat.repositories' => {
1336             doc => "cat-repositories",
1337             parts => {},
1338             paths => [ [ {}, "_cat", "repositories" ] ],
1339             qs => {
1340             error_trace => "boolean",
1341             filter_path => "list",
1342             format => "string",
1343             h => "list",
1344             help => "boolean",
1345             human => "boolean",
1346             local => "boolean",
1347             master_timeout => "time",
1348             s => "list",
1349             v => "boolean",
1350             },
1351             },
1352              
1353             'cat.segments' => {
1354             doc => "cat-segments",
1355             parts => { index => { multi => 1 } },
1356             paths => [
1357             [ { index => 2 }, "_cat", "segments", "{index}" ],
1358             [ {}, "_cat", "segments" ],
1359             ],
1360             qs => {
1361             bytes => "enum",
1362             error_trace => "boolean",
1363             filter_path => "list",
1364             format => "string",
1365             h => "list",
1366             help => "boolean",
1367             human => "boolean",
1368             s => "list",
1369             v => "boolean",
1370             },
1371             },
1372              
1373             'cat.shards' => {
1374             doc => "cat-shards",
1375             parts => { index => { multi => 1 } },
1376             paths => [
1377             [ { index => 2 }, "_cat", "shards", "{index}" ],
1378             [ {}, "_cat", "shards" ],
1379             ],
1380             qs => {
1381             bytes => "enum",
1382             error_trace => "boolean",
1383             filter_path => "list",
1384             format => "string",
1385             h => "list",
1386             help => "boolean",
1387             human => "boolean",
1388             local => "boolean",
1389             master_timeout => "time",
1390             s => "list",
1391             v => "boolean",
1392             },
1393             },
1394              
1395             'cat.snapshots' => {
1396             doc => "cat-snapshots",
1397             parts => { repository => { multi => 1, required => 1 } },
1398             paths => [
1399             [ { repository => 2 }, "_cat", "snapshots", "{repository}" ],
1400             [ {}, "_cat", "snapshots" ],
1401             ],
1402             qs => {
1403             error_trace => "boolean",
1404             filter_path => "list",
1405             format => "string",
1406             h => "list",
1407             help => "boolean",
1408             human => "boolean",
1409             ignore_unavailable => "boolean",
1410             master_timeout => "time",
1411             s => "list",
1412             v => "boolean",
1413             },
1414             },
1415              
1416             'cat.tasks' => {
1417             doc => "tasks",
1418             parts => {},
1419             paths => [ [ {}, "_cat", "tasks" ] ],
1420             qs => {
1421             actions => "list",
1422             detailed => "boolean",
1423             error_trace => "boolean",
1424             filter_path => "list",
1425             format => "string",
1426             h => "list",
1427             help => "boolean",
1428             human => "boolean",
1429             node_id => "list",
1430             parent_node => "string",
1431             parent_task => "number",
1432             s => "list",
1433             v => "boolean",
1434             },
1435             },
1436              
1437             'cat.templates' => {
1438             doc => "cat-templates",
1439             parts => { name => {} },
1440             paths => [
1441             [ { name => 2 }, "_cat", "templates", "{name}" ],
1442             [ {}, "_cat", "templates" ],
1443             ],
1444             qs => {
1445             error_trace => "boolean",
1446             filter_path => "list",
1447             format => "string",
1448             h => "list",
1449             help => "boolean",
1450             human => "boolean",
1451             local => "boolean",
1452             master_timeout => "time",
1453             s => "list",
1454             v => "boolean",
1455             },
1456             },
1457              
1458             'cat.thread_pool' => {
1459             doc => "cat-thread-pool",
1460             parts => { thread_pool_patterns => { multi => 1 } },
1461             paths => [
1462             [ { thread_pool_patterns => 2 }, "_cat",
1463             "thread_pool", "{thread_pool_patterns}",
1464             ],
1465             [ {}, "_cat", "thread_pool" ],
1466             ],
1467             qs => {
1468             error_trace => "boolean",
1469             filter_path => "list",
1470             format => "string",
1471             h => "list",
1472             help => "boolean",
1473             human => "boolean",
1474             local => "boolean",
1475             master_timeout => "time",
1476             s => "list",
1477             size => "enum",
1478             v => "boolean",
1479             },
1480             },
1481              
1482             'cluster.allocation_explain' => {
1483             body => {},
1484             doc => "cluster-allocation-explain",
1485             parts => {},
1486             paths => [ [ {}, "_cluster", "allocation", "explain" ] ],
1487             qs => {
1488             error_trace => "boolean",
1489             filter_path => "list",
1490             human => "boolean",
1491             include_disk_info => "boolean",
1492             include_yes_decisions => "boolean",
1493             },
1494             },
1495              
1496             'cluster.get_settings' => {
1497             doc => "cluster-update-settings",
1498             parts => {},
1499             paths => [ [ {}, "_cluster", "settings" ] ],
1500             qs => {
1501             error_trace => "boolean",
1502             filter_path => "list",
1503             flat_settings => "boolean",
1504             human => "boolean",
1505             include_defaults => "boolean",
1506             master_timeout => "time",
1507             timeout => "time",
1508             },
1509             },
1510              
1511             'cluster.health' => {
1512             doc => "cluster-health",
1513             parts => { index => { multi => 1 } },
1514             paths => [
1515             [ { index => 2 }, "_cluster", "health", "{index}" ],
1516             [ {}, "_cluster", "health" ],
1517             ],
1518             qs => {
1519             error_trace => "boolean",
1520             filter_path => "list",
1521             human => "boolean",
1522             level => "enum",
1523             local => "boolean",
1524             master_timeout => "time",
1525             timeout => "time",
1526             wait_for_active_shards => "string",
1527             wait_for_events => "enum",
1528             wait_for_no_relocating_shards => "boolean",
1529             wait_for_nodes => "string",
1530             wait_for_status => "enum",
1531             },
1532             },
1533              
1534             'cluster.pending_tasks' => {
1535             doc => "cluster-pending",
1536             parts => {},
1537             paths => [ [ {}, "_cluster", "pending_tasks" ] ],
1538             qs => {
1539             error_trace => "boolean",
1540             filter_path => "list",
1541             human => "boolean",
1542             local => "boolean",
1543             master_timeout => "time",
1544             },
1545             },
1546              
1547             'cluster.put_settings' => {
1548             body => {},
1549             doc => "cluster-update-settings",
1550             method => "PUT",
1551             parts => {},
1552             paths => [ [ {}, "_cluster", "settings" ] ],
1553             qs => {
1554             error_trace => "boolean",
1555             filter_path => "list",
1556             flat_settings => "boolean",
1557             human => "boolean",
1558             master_timeout => "time",
1559             timeout => "time",
1560             },
1561             },
1562              
1563             'cluster.reroute' => {
1564             body => {},
1565             doc => "cluster-reroute",
1566             method => "POST",
1567             parts => {},
1568             paths => [ [ {}, "_cluster", "reroute" ] ],
1569             qs => {
1570             dry_run => "boolean",
1571             error_trace => "boolean",
1572             explain => "boolean",
1573             filter_path => "list",
1574             human => "boolean",
1575             master_timeout => "time",
1576             metric => "list",
1577             retry_failed => "boolean",
1578             timeout => "time",
1579             },
1580             },
1581              
1582             'cluster.state' => {
1583             doc => "cluster-state",
1584             parts => { index => { multi => 1 }, metric => { multi => 1 } },
1585             paths => [
1586             [ { index => 3, metric => 2 }, "_cluster",
1587             "state", "{metric}",
1588             "{index}",
1589             ],
1590             [ { metric => 2 }, "_cluster", "state", "{metric}" ],
1591             [ {}, "_cluster", "state" ],
1592             ],
1593             qs => {
1594             allow_no_indices => "boolean",
1595             error_trace => "boolean",
1596             expand_wildcards => "enum",
1597             filter_path => "list",
1598             flat_settings => "boolean",
1599             human => "boolean",
1600             ignore_unavailable => "boolean",
1601             local => "boolean",
1602             master_timeout => "time",
1603             },
1604             },
1605              
1606             'cluster.stats' => {
1607             doc => "cluster-stats",
1608             parts => { node_id => { multi => 1 } },
1609             paths => [
1610             [ { node_id => 3 }, "_cluster", "stats", "nodes", "{node_id}" ],
1611             [ {}, "_cluster", "stats" ],
1612             ],
1613             qs => {
1614             error_trace => "boolean",
1615             filter_path => "list",
1616             flat_settings => "boolean",
1617             human => "boolean",
1618             timeout => "time",
1619             },
1620             },
1621              
1622             'indices.analyze' => {
1623             body => {},
1624             doc => "indices-analyze",
1625             parts => { index => {} },
1626             paths =>
1627             [ [ { index => 0 }, "{index}", "_analyze" ], [ {}, "_analyze" ] ],
1628             qs => {
1629             analyzer => "string",
1630             attributes => "list",
1631             char_filter => "list",
1632             error_trace => "boolean",
1633             explain => "boolean",
1634             field => "string",
1635             filter => "list",
1636             filter_path => "list",
1637             format => "enum",
1638             human => "boolean",
1639             prefer_local => "boolean",
1640             text => "list",
1641             tokenizer => "string",
1642             },
1643             },
1644              
1645             'indices.clear_cache' => {
1646             doc => "indices-clearcache",
1647             method => "POST",
1648             parts => { index => { multi => 1 } },
1649             paths => [
1650             [ { index => 0 }, "{index}", "_cache", "clear" ],
1651             [ {}, "_cache", "clear" ],
1652             ],
1653             qs => {
1654             allow_no_indices => "boolean",
1655             error_trace => "boolean",
1656             expand_wildcards => "enum",
1657             fielddata => "boolean",
1658             fields => "list",
1659             filter_path => "list",
1660             human => "boolean",
1661             ignore_unavailable => "boolean",
1662             query => "boolean",
1663             recycler => "boolean",
1664             request => "boolean",
1665             request_cache => "boolean",
1666             },
1667             },
1668              
1669             'indices.close' => {
1670             doc => "indices-open-close",
1671             method => "POST",
1672             parts => { index => { multi => 1, required => 1 } },
1673             paths => [ [ { index => 0 }, "{index}", "_close" ] ],
1674             qs => {
1675             allow_no_indices => "boolean",
1676             error_trace => "boolean",
1677             expand_wildcards => "enum",
1678             filter_path => "list",
1679             human => "boolean",
1680             ignore_unavailable => "boolean",
1681             master_timeout => "time",
1682             timeout => "time",
1683             },
1684             },
1685              
1686             'indices.create' => {
1687             body => {},
1688             doc => "indices-create-index",
1689             method => "PUT",
1690             parts => { index => { required => 1 } },
1691             paths => [ [ { index => 0 }, "{index}" ] ],
1692             qs => {
1693             error_trace => "boolean",
1694             filter_path => "list",
1695             human => "boolean",
1696             master_timeout => "time",
1697             timeout => "time",
1698             update_all_types => "boolean",
1699             wait_for_active_shards => "string",
1700             },
1701             },
1702              
1703             'indices.delete' => {
1704             doc => "indices-delete-index",
1705             method => "DELETE",
1706             parts => { index => { multi => 1, required => 1 } },
1707             paths => [ [ { index => 0 }, "{index}" ] ],
1708             qs => {
1709             error_trace => "boolean",
1710             filter_path => "list",
1711             human => "boolean",
1712             master_timeout => "time",
1713             timeout => "time",
1714             },
1715             },
1716              
1717             'indices.delete_alias' => {
1718             doc => "indices-aliases",
1719             method => "DELETE",
1720             parts => {
1721             index => { multi => 1, required => 1 },
1722             name => { multi => 1, required => 1 },
1723             },
1724             paths =>
1725             [ [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ] ],
1726             qs => {
1727             error_trace => "boolean",
1728             filter_path => "list",
1729             human => "boolean",
1730             master_timeout => "time",
1731             timeout => "time",
1732             },
1733             },
1734              
1735             'indices.delete_template' => {
1736             doc => "indices-templates",
1737             method => "DELETE",
1738             parts => { name => { required => 1 } },
1739             paths => [ [ { name => 1 }, "_template", "{name}" ] ],
1740             qs => {
1741             error_trace => "boolean",
1742             filter_path => "list",
1743             human => "boolean",
1744             master_timeout => "time",
1745             timeout => "time",
1746             },
1747             },
1748              
1749             'indices.exists' => {
1750             doc => "indices-exists",
1751             method => "HEAD",
1752             parts => { index => { multi => 1, required => 1 } },
1753             paths => [ [ { index => 0 }, "{index}" ] ],
1754             qs => {
1755             allow_no_indices => "boolean",
1756             error_trace => "boolean",
1757             expand_wildcards => "enum",
1758             filter_path => "list",
1759             flat_settings => "boolean",
1760             human => "boolean",
1761             ignore_unavailable => "boolean",
1762             include_defaults => "boolean",
1763             local => "boolean",
1764             },
1765             },
1766              
1767             'indices.exists_alias' => {
1768             doc => "indices-aliases",
1769             method => "HEAD",
1770             parts => { index => { multi => 1 }, name => { multi => 1 } },
1771             paths => [
1772             [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ],
1773             [ { name => 1 }, "_alias", "{name}" ],
1774             ],
1775             qs => {
1776             allow_no_indices => "boolean",
1777             error_trace => "boolean",
1778             expand_wildcards => "enum",
1779             filter_path => "list",
1780             human => "boolean",
1781             ignore_unavailable => "boolean",
1782             local => "boolean",
1783             },
1784             },
1785              
1786             'indices.exists_template' => {
1787             doc => "indices-templates",
1788             method => "HEAD",
1789             parts => { name => { multi => 1, required => 1 } },
1790             paths => [ [ { name => 1 }, "_template", "{name}" ] ],
1791             qs => {
1792             error_trace => "boolean",
1793             filter_path => "list",
1794             flat_settings => "boolean",
1795             human => "boolean",
1796             local => "boolean",
1797             master_timeout => "time",
1798             },
1799             },
1800              
1801             'indices.exists_type' => {
1802             doc => "indices-types-exists",
1803             method => "HEAD",
1804             parts => {
1805             index => { multi => 1, required => 1 },
1806             type => { multi => 1, required => 1 },
1807             },
1808             paths => [
1809             [ { index => 0, type => 2 }, "{index}", "_mapping", "{type}" ]
1810             ],
1811             qs => {
1812             allow_no_indices => "boolean",
1813             error_trace => "boolean",
1814             expand_wildcards => "enum",
1815             filter_path => "list",
1816             human => "boolean",
1817             ignore_unavailable => "boolean",
1818             local => "boolean",
1819             },
1820             },
1821              
1822             'indices.flush' => {
1823             doc => "indices-flush",
1824             method => "POST",
1825             parts => { index => { multi => 1 } },
1826             paths =>
1827             [ [ { index => 0 }, "{index}", "_flush" ], [ {}, "_flush" ] ],
1828             qs => {
1829             allow_no_indices => "boolean",
1830             error_trace => "boolean",
1831             expand_wildcards => "enum",
1832             filter_path => "list",
1833             force => "boolean",
1834             human => "boolean",
1835             ignore_unavailable => "boolean",
1836             wait_if_ongoing => "boolean",
1837             },
1838             },
1839              
1840             'indices.flush_synced' => {
1841             doc => "indices-synced-flush",
1842             method => "POST",
1843             parts => { index => { multi => 1 } },
1844             paths => [
1845             [ { index => 0 }, "{index}", "_flush", "synced" ],
1846             [ {}, "_flush", "synced" ],
1847             ],
1848             qs => {
1849             allow_no_indices => "boolean",
1850             error_trace => "boolean",
1851             expand_wildcards => "enum",
1852             filter_path => "list",
1853             human => "boolean",
1854             ignore_unavailable => "boolean",
1855             },
1856             },
1857              
1858             'indices.forcemerge' => {
1859             doc => "indices-forcemerge",
1860             method => "POST",
1861             parts => { index => { multi => 1 } },
1862             paths => [
1863             [ { index => 0 }, "{index}", "_forcemerge" ],
1864             [ {}, "_forcemerge" ],
1865             ],
1866             qs => {
1867             allow_no_indices => "boolean",
1868             error_trace => "boolean",
1869             expand_wildcards => "enum",
1870             filter_path => "list",
1871             flush => "boolean",
1872             human => "boolean",
1873             ignore_unavailable => "boolean",
1874             max_num_segments => "number",
1875             only_expunge_deletes => "boolean",
1876             wait_for_merge => "boolean",
1877             },
1878             },
1879              
1880             'indices.get' => {
1881             doc => "indices-get-index",
1882             parts => {
1883             feature => { multi => 1 },
1884             index => { multi => 1, required => 1 }
1885             },
1886             paths => [
1887             [ { feature => 1, index => 0 }, "{index}", "{feature}" ],
1888             [ { index => 0 }, "{index}" ],
1889             ],
1890             qs => {
1891             allow_no_indices => "boolean",
1892             error_trace => "boolean",
1893             expand_wildcards => "enum",
1894             filter_path => "list",
1895             flat_settings => "boolean",
1896             human => "boolean",
1897             ignore_unavailable => "boolean",
1898             include_defaults => "boolean",
1899             local => "boolean",
1900             },
1901             },
1902              
1903             'indices.get_alias' => {
1904             doc => "indices-aliases",
1905             parts => { index => { multi => 1 }, name => { multi => 1 } },
1906             paths => [
1907             [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ],
1908             [ { index => 0 }, "{index}", "_alias" ],
1909             [ { name => 1 }, "_alias", "{name}" ],
1910             [ {}, "_alias" ],
1911             ],
1912             qs => {
1913             allow_no_indices => "boolean",
1914             error_trace => "boolean",
1915             expand_wildcards => "enum",
1916             filter_path => "list",
1917             human => "boolean",
1918             ignore_unavailable => "boolean",
1919             local => "boolean",
1920             },
1921             },
1922              
1923             'indices.get_field_mapping' => {
1924             doc => "indices-get-field-mapping",
1925             parts => {
1926             fields => { multi => 1, required => 1 },
1927             index => { multi => 1 },
1928             type => { multi => 1 },
1929             },
1930             paths => [
1931             [ { fields => 4, index => 0, type => 2 }, "{index}",
1932             "_mapping", "{type}",
1933             "field", "{fields}",
1934             ],
1935             [ { fields => 3, index => 0 }, "{index}",
1936             "_mapping", "field",
1937             "{fields}",
1938             ],
1939             [ { fields => 3, type => 1 }, "_mapping",
1940             "{type}", "field",
1941             "{fields}",
1942             ],
1943             [ { fields => 2 }, "_mapping", "field", "{fields}" ],
1944             ],
1945             qs => {
1946             allow_no_indices => "boolean",
1947             error_trace => "boolean",
1948             expand_wildcards => "enum",
1949             filter_path => "list",
1950             human => "boolean",
1951             ignore_unavailable => "boolean",
1952             include_defaults => "boolean",
1953             local => "boolean",
1954             },
1955             },
1956              
1957             'indices.get_mapping' => {
1958             doc => "indices-get-mapping",
1959             parts => { index => { multi => 1 }, type => { multi => 1 } },
1960             paths => [
1961             [ { index => 0, type => 2 }, "{index}", "_mapping", "{type}" ],
1962             [ { index => 0 }, "{index}", "_mapping" ],
1963             [ { type => 1 }, "_mapping", "{type}" ],
1964             [ {}, "_mapping" ],
1965             ],
1966             qs => {
1967             allow_no_indices => "boolean",
1968             error_trace => "boolean",
1969             expand_wildcards => "enum",
1970             filter_path => "list",
1971             human => "boolean",
1972             ignore_unavailable => "boolean",
1973             local => "boolean",
1974             },
1975             },
1976              
1977             'indices.get_settings' => {
1978             doc => "indices-get-settings",
1979             parts => { index => { multi => 1 }, name => { multi => 1 } },
1980             paths => [
1981             [ { index => 0, name => 2 }, "{index}", "_settings", "{name}" ],
1982             [ { index => 0 }, "{index}", "_settings" ],
1983             [ { name => 1 }, "_settings", "{name}" ],
1984             [ {}, "_settings" ],
1985             ],
1986             qs => {
1987             allow_no_indices => "boolean",
1988             error_trace => "boolean",
1989             expand_wildcards => "enum",
1990             filter_path => "list",
1991             flat_settings => "boolean",
1992             human => "boolean",
1993             ignore_unavailable => "boolean",
1994             include_defaults => "boolean",
1995             local => "boolean",
1996             },
1997             },
1998              
1999             'indices.get_template' => {
2000             doc => "indices-templates",
2001             parts => { name => { multi => 1 } },
2002             paths =>
2003             [ [ { name => 1 }, "_template", "{name}" ], [ {}, "_template" ] ],
2004             qs => {
2005             error_trace => "boolean",
2006             filter_path => "list",
2007             flat_settings => "boolean",
2008             human => "boolean",
2009             local => "boolean",
2010             master_timeout => "time",
2011             },
2012             },
2013              
2014             'indices.get_upgrade' => {
2015             doc => "indices-upgrade",
2016             parts => { index => { multi => 1 } },
2017             paths =>
2018             [ [ { index => 0 }, "{index}", "_upgrade" ], [ {}, "_upgrade" ] ],
2019             qs => {
2020             allow_no_indices => "boolean",
2021             error_trace => "boolean",
2022             expand_wildcards => "enum",
2023             filter_path => "list",
2024             human => "boolean",
2025             ignore_unavailable => "boolean",
2026             },
2027             },
2028              
2029             'indices.open' => {
2030             doc => "indices-open-close",
2031             method => "POST",
2032             parts => { index => { multi => 1, required => 1 } },
2033             paths => [ [ { index => 0 }, "{index}", "_open" ] ],
2034             qs => {
2035             allow_no_indices => "boolean",
2036             error_trace => "boolean",
2037             expand_wildcards => "enum",
2038             filter_path => "list",
2039             human => "boolean",
2040             ignore_unavailable => "boolean",
2041             master_timeout => "time",
2042             timeout => "time",
2043             },
2044             },
2045              
2046             'indices.put_alias' => {
2047             body => {},
2048             doc => "indices-aliases",
2049             method => "PUT",
2050             parts => {
2051             index => { multi => 1, required => 1 },
2052             name => { required => 1 }
2053             },
2054             paths =>
2055             [ [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ] ],
2056             qs => {
2057             error_trace => "boolean",
2058             filter_path => "list",
2059             human => "boolean",
2060             master_timeout => "time",
2061             timeout => "time",
2062             },
2063             },
2064              
2065             'indices.put_mapping' => {
2066             body => { required => 1 },
2067             doc => "indices-put-mapping",
2068             method => "PUT",
2069             parts => { index => { multi => 1 }, type => { required => 1 } },
2070             paths => [
2071             [ { index => 0, type => 2 }, "{index}", "_mapping", "{type}" ],
2072             [ { type => 1 }, "_mapping", "{type}" ],
2073             ],
2074             qs => {
2075             allow_no_indices => "boolean",
2076             error_trace => "boolean",
2077             expand_wildcards => "enum",
2078             filter_path => "list",
2079             human => "boolean",
2080             ignore_unavailable => "boolean",
2081             master_timeout => "time",
2082             timeout => "time",
2083             update_all_types => "boolean",
2084             },
2085             },
2086              
2087             'indices.put_settings' => {
2088             body => { required => 1 },
2089             doc => "indices-update-settings",
2090             method => "PUT",
2091             parts => { index => { multi => 1 } },
2092             paths => [
2093             [ { index => 0 }, "{index}", "_settings" ],
2094             [ {}, "_settings" ]
2095             ],
2096             qs => {
2097             allow_no_indices => "boolean",
2098             error_trace => "boolean",
2099             expand_wildcards => "enum",
2100             filter_path => "list",
2101             flat_settings => "boolean",
2102             human => "boolean",
2103             ignore_unavailable => "boolean",
2104             master_timeout => "time",
2105             preserve_existing => "boolean",
2106             },
2107             },
2108              
2109             'indices.put_template' => {
2110             body => { required => 1 },
2111             doc => "indices-templates",
2112             method => "PUT",
2113             parts => { name => { required => 1 } },
2114             paths => [ [ { name => 1 }, "_template", "{name}" ] ],
2115             qs => {
2116             create => "boolean",
2117             error_trace => "boolean",
2118             filter_path => "list",
2119             flat_settings => "boolean",
2120             human => "boolean",
2121             master_timeout => "time",
2122             order => "number",
2123             timeout => "time",
2124             },
2125             },
2126              
2127             'indices.recovery' => {
2128             doc => "indices-recovery",
2129             parts => { index => { multi => 1 } },
2130             paths => [
2131             [ { index => 0 }, "{index}", "_recovery" ],
2132             [ {}, "_recovery" ]
2133             ],
2134             qs => {
2135             active_only => "boolean",
2136             detailed => "boolean",
2137             error_trace => "boolean",
2138             filter_path => "list",
2139             human => "boolean",
2140             },
2141             },
2142              
2143             'indices.refresh' => {
2144             doc => "indices-refresh",
2145             method => "POST",
2146             parts => { index => { multi => 1 } },
2147             paths =>
2148             [ [ { index => 0 }, "{index}", "_refresh" ], [ {}, "_refresh" ] ],
2149             qs => {
2150             allow_no_indices => "boolean",
2151             error_trace => "boolean",
2152             expand_wildcards => "enum",
2153             filter_path => "list",
2154             human => "boolean",
2155             ignore_unavailable => "boolean",
2156             },
2157             },
2158              
2159             'indices.rollover' => {
2160             body => {},
2161             doc => "indices-rollover-index",
2162             method => "POST",
2163             parts => { alias => { required => 1 }, new_index => {} },
2164             paths => [
2165             [ { alias => 0, new_index => 2 }, "{alias}",
2166             "_rollover", "{new_index}",
2167             ],
2168             [ { alias => 0 }, "{alias}", "_rollover" ],
2169             ],
2170             qs => {
2171             dry_run => "boolean",
2172             error_trace => "boolean",
2173             filter_path => "list",
2174             human => "boolean",
2175             master_timeout => "time",
2176             timeout => "time",
2177             wait_for_active_shards => "string",
2178             },
2179             },
2180              
2181             'indices.segments' => {
2182             doc => "indices-segments",
2183             parts => { index => { multi => 1 } },
2184             paths => [
2185             [ { index => 0 }, "{index}", "_segments" ],
2186             [ {}, "_segments" ]
2187             ],
2188             qs => {
2189             allow_no_indices => "boolean",
2190             error_trace => "boolean",
2191             expand_wildcards => "enum",
2192             filter_path => "list",
2193             human => "boolean",
2194             ignore_unavailable => "boolean",
2195             verbose => "boolean",
2196             },
2197             },
2198              
2199             'indices.shard_stores' => {
2200             doc => "indices-shards-stores",
2201             parts => { index => { multi => 1 } },
2202             paths => [
2203             [ { index => 0 }, "{index}", "_shard_stores" ],
2204             [ {}, "_shard_stores" ],
2205             ],
2206             qs => {
2207             allow_no_indices => "boolean",
2208             error_trace => "boolean",
2209             expand_wildcards => "enum",
2210             filter_path => "list",
2211             human => "boolean",
2212             ignore_unavailable => "boolean",
2213             status => "list",
2214             },
2215             },
2216              
2217             'indices.shrink' => {
2218             body => {},
2219             doc => "indices-shrink-index",
2220             method => "PUT",
2221             parts => { index => { required => 1 }, target => { required => 1 } },
2222             paths => [
2223             [ { index => 0, target => 2 }, "{index}", "_shrink", "{target}" ],
2224             ],
2225             qs => {
2226             error_trace => "boolean",
2227             filter_path => "list",
2228             human => "boolean",
2229             master_timeout => "time",
2230             timeout => "time",
2231             wait_for_active_shards => "string",
2232             },
2233             },
2234              
2235             'indices.stats' => {
2236             doc => "indices-stats",
2237             parts => { index => { multi => 1 }, metric => { multi => 1 } },
2238             paths => [
2239             [ { index => 0, metric => 2 }, "{index}", "_stats", "{metric}" ],
2240             [ { index => 0 }, "{index}", "_stats" ],
2241             [ { metric => 1 }, "_stats", "{metric}" ],
2242             [ {}, "_stats" ],
2243             ],
2244             qs => {
2245             completion_fields => "list",
2246             error_trace => "boolean",
2247             fielddata_fields => "list",
2248             fields => "list",
2249             filter_path => "list",
2250             groups => "list",
2251             human => "boolean",
2252             include_segment_file_sizes => "boolean",
2253             level => "enum",
2254             types => "list",
2255             },
2256             },
2257              
2258             'indices.update_aliases' => {
2259             body => { required => 1 },
2260             doc => "indices-aliases",
2261             method => "POST",
2262             parts => {},
2263             paths => [ [ {}, "_aliases" ] ],
2264             qs => {
2265             error_trace => "boolean",
2266             filter_path => "list",
2267             human => "boolean",
2268             master_timeout => "time",
2269             timeout => "time",
2270             },
2271             },
2272              
2273             'indices.upgrade' => {
2274             doc => "indices-upgrade",
2275             method => "POST",
2276             parts => { index => { multi => 1 } },
2277             paths =>
2278             [ [ { index => 0 }, "{index}", "_upgrade" ], [ {}, "_upgrade" ] ],
2279             qs => {
2280             allow_no_indices => "boolean",
2281             error_trace => "boolean",
2282             expand_wildcards => "enum",
2283             filter_path => "list",
2284             human => "boolean",
2285             ignore_unavailable => "boolean",
2286             only_ancient_segments => "boolean",
2287             wait_for_completion => "boolean",
2288             },
2289             },
2290              
2291             'indices.validate_query' => {
2292             body => {},
2293             doc => "search-validate",
2294             parts => { index => { multi => 1 }, type => { multi => 1 } },
2295             paths => [
2296             [ { index => 0, type => 1 }, "{index}",
2297             "{type}", "_validate",
2298             "query",
2299             ],
2300             [ { index => 0 }, "{index}", "_validate", "query" ],
2301             [ {}, "_validate", "query" ],
2302             ],
2303             qs => {
2304             all_shards => "boolean",
2305             allow_no_indices => "boolean",
2306             analyze_wildcard => "boolean",
2307             analyzer => "string",
2308             default_operator => "enum",
2309             df => "string",
2310             error_trace => "boolean",
2311             expand_wildcards => "enum",
2312             explain => "boolean",
2313             filter_path => "list",
2314             human => "boolean",
2315             ignore_unavailable => "boolean",
2316             lenient => "boolean",
2317             q => "string",
2318             rewrite => "boolean",
2319             },
2320             },
2321              
2322             'ingest.delete_pipeline' => {
2323             doc => "ingest",
2324             method => "DELETE",
2325             parts => { id => { required => 1 } },
2326             paths => [ [ { id => 2 }, "_ingest", "pipeline", "{id}" ] ],
2327             qs => {
2328             error_trace => "boolean",
2329             filter_path => "list",
2330             human => "boolean",
2331             master_timeout => "time",
2332             timeout => "time",
2333             },
2334             },
2335              
2336             'ingest.get_pipeline' => {
2337             doc => "ingest",
2338             parts => { id => {} },
2339             paths => [
2340             [ { id => 2 }, "_ingest", "pipeline", "{id}" ],
2341             [ {}, "_ingest", "pipeline" ],
2342             ],
2343             qs => {
2344             error_trace => "boolean",
2345             filter_path => "list",
2346             human => "boolean",
2347             master_timeout => "time",
2348             },
2349             },
2350              
2351             'ingest.processor.grok' => {
2352             doc => "ingest",
2353             parts => {},
2354             paths => [ [ {}, "_ingest", "processor", "grok" ] ],
2355             qs => {
2356             error_trace => "boolean",
2357             filter_path => "list",
2358             human => "boolean"
2359             },
2360             },
2361              
2362             'ingest.put_pipeline' => {
2363             body => { required => 1 },
2364             doc => "ingest",
2365             method => "PUT",
2366             parts => { id => { required => 1 } },
2367             paths => [ [ { id => 2 }, "_ingest", "pipeline", "{id}" ] ],
2368             qs => {
2369             error_trace => "boolean",
2370             filter_path => "list",
2371             human => "boolean",
2372             master_timeout => "time",
2373             timeout => "time",
2374             },
2375             },
2376              
2377             'ingest.simulate' => {
2378             body => { required => 1 },
2379             doc => "ingest",
2380             parts => { id => {} },
2381             paths => [
2382             [ { id => 2 }, "_ingest", "pipeline", "{id}", "_simulate" ],
2383             [ {}, "_ingest", "pipeline", "_simulate" ],
2384             ],
2385             qs => {
2386             error_trace => "boolean",
2387             filter_path => "list",
2388             human => "boolean",
2389             verbose => "boolean",
2390             },
2391             },
2392              
2393             'nodes.hot_threads' => {
2394             doc => "cluster-nodes-hot-threads",
2395             parts => { node_id => { multi => 1 } },
2396             paths => [
2397             [ { node_id => 1 }, "_nodes", "{node_id}", "hot_threads" ],
2398             [ {}, "_nodes", "hot_threads" ],
2399             ],
2400             qs => {
2401             error_trace => "boolean",
2402             filter_path => "list",
2403             human => "boolean",
2404             ignore_idle_threads => "boolean",
2405             interval => "time",
2406             snapshots => "number",
2407             threads => "number",
2408             timeout => "time",
2409             type => "enum",
2410             },
2411             },
2412              
2413             'nodes.info' => {
2414             doc => "cluster-nodes-info",
2415             parts => { metric => { multi => 1 }, node_id => { multi => 1 } },
2416             paths => [
2417             [ { metric => 2, node_id => 1 }, "_nodes",
2418             "{node_id}", "{metric}",
2419             ],
2420             [ { metric => 1 }, "_nodes", "{metric}" ],
2421             [ { node_id => 1 }, "_nodes", "{node_id}" ],
2422             [ {}, "_nodes" ],
2423             ],
2424             qs => {
2425             error_trace => "boolean",
2426             filter_path => "list",
2427             flat_settings => "boolean",
2428             human => "boolean",
2429             timeout => "time",
2430             },
2431             },
2432              
2433             'nodes.stats' => {
2434             doc => "cluster-nodes-stats",
2435             parts => {
2436             index_metric => { multi => 1 },
2437             metric => { multi => 1 },
2438             node_id => { multi => 1 },
2439             },
2440             paths => [
2441             [ { index_metric => 4, metric => 3, node_id => 1 },
2442             "_nodes", "{node_id}", "stats", "{metric}", "{index_metric}",
2443             ],
2444             [ { index_metric => 3, metric => 2 }, "_nodes",
2445             "stats", "{metric}",
2446             "{index_metric}",
2447             ],
2448             [ { metric => 3, node_id => 1 }, "_nodes",
2449             "{node_id}", "stats",
2450             "{metric}",
2451             ],
2452             [ { metric => 2 }, "_nodes", "stats", "{metric}" ],
2453             [ { node_id => 1 }, "_nodes", "{node_id}", "stats" ],
2454             [ {}, "_nodes", "stats" ],
2455             ],
2456             qs => {
2457             completion_fields => "list",
2458             error_trace => "boolean",
2459             fielddata_fields => "list",
2460             fields => "list",
2461             filter_path => "list",
2462             groups => "boolean",
2463             human => "boolean",
2464             include_segment_file_sizes => "boolean",
2465             level => "enum",
2466             timeout => "time",
2467             types => "list",
2468             },
2469             },
2470              
2471             'remote.info' => {
2472             doc => "cluster-remote-info",
2473             parts => {},
2474             paths => [ [ {}, "_remote", "info" ] ],
2475             qs => {
2476             error_trace => "boolean",
2477             filter_path => "list",
2478             human => "boolean"
2479             },
2480             },
2481              
2482             'snapshot.create' => {
2483             body => {},
2484             doc => "modules-snapshots",
2485             method => "PUT",
2486             parts => {
2487             repository => { required => 1 },
2488             snapshot => { required => 1 }
2489             },
2490             paths => [
2491             [ { repository => 1, snapshot => 2 }, "_snapshot",
2492             "{repository}", "{snapshot}",
2493             ],
2494             ],
2495             qs => {
2496             error_trace => "boolean",
2497             filter_path => "list",
2498             human => "boolean",
2499             master_timeout => "time",
2500             wait_for_completion => "boolean",
2501             },
2502             },
2503              
2504             'snapshot.create_repository' => {
2505             body => { required => 1 },
2506             doc => "modules-snapshots",
2507             method => "PUT",
2508             parts => { repository => { required => 1 } },
2509             paths => [ [ { repository => 1 }, "_snapshot", "{repository}" ] ],
2510             qs => {
2511             error_trace => "boolean",
2512             filter_path => "list",
2513             human => "boolean",
2514             master_timeout => "time",
2515             timeout => "time",
2516             verify => "boolean",
2517             },
2518             },
2519              
2520             'snapshot.delete' => {
2521             doc => "modules-snapshots",
2522             method => "DELETE",
2523             parts => {
2524             repository => { required => 1 },
2525             snapshot => { required => 1 }
2526             },
2527             paths => [
2528             [ { repository => 1, snapshot => 2 }, "_snapshot",
2529             "{repository}", "{snapshot}",
2530             ],
2531             ],
2532             qs => {
2533             error_trace => "boolean",
2534             filter_path => "list",
2535             human => "boolean",
2536             master_timeout => "time",
2537             },
2538             },
2539              
2540             'snapshot.delete_repository' => {
2541             doc => "modules-snapshots",
2542             method => "DELETE",
2543             parts => { repository => { multi => 1, required => 1 } },
2544             paths => [ [ { repository => 1 }, "_snapshot", "{repository}" ] ],
2545             qs => {
2546             error_trace => "boolean",
2547             filter_path => "list",
2548             human => "boolean",
2549             master_timeout => "time",
2550             timeout => "time",
2551             },
2552             },
2553              
2554             'snapshot.get' => {
2555             doc => "modules-snapshots",
2556             parts => {
2557             repository => { required => 1 },
2558             snapshot => { multi => 1, required => 1 },
2559             },
2560             paths => [
2561             [ { repository => 1, snapshot => 2 }, "_snapshot",
2562             "{repository}", "{snapshot}",
2563             ],
2564             ],
2565             qs => {
2566             error_trace => "boolean",
2567             filter_path => "list",
2568             human => "boolean",
2569             ignore_unavailable => "boolean",
2570             master_timeout => "time",
2571             verbose => "boolean",
2572             },
2573             },
2574              
2575             'snapshot.get_repository' => {
2576             doc => "modules-snapshots",
2577             parts => { repository => { multi => 1 } },
2578             paths => [
2579             [ { repository => 1 }, "_snapshot", "{repository}" ],
2580             [ {}, "_snapshot" ],
2581             ],
2582             qs => {
2583             error_trace => "boolean",
2584             filter_path => "list",
2585             human => "boolean",
2586             local => "boolean",
2587             master_timeout => "time",
2588             },
2589             },
2590              
2591             'snapshot.restore' => {
2592             body => {},
2593             doc => "modules-snapshots",
2594             method => "POST",
2595             parts => {
2596             repository => { required => 1 },
2597             snapshot => { required => 1 }
2598             },
2599             paths => [
2600             [ { repository => 1, snapshot => 2 }, "_snapshot",
2601             "{repository}", "{snapshot}",
2602             "_restore",
2603             ],
2604             ],
2605             qs => {
2606             error_trace => "boolean",
2607             filter_path => "list",
2608             human => "boolean",
2609             master_timeout => "time",
2610             wait_for_completion => "boolean",
2611             },
2612             },
2613              
2614             'snapshot.status' => {
2615             doc => "modules-snapshots",
2616             parts => { repository => {}, snapshot => { multi => 1 } },
2617             paths => [
2618             [ { repository => 1, snapshot => 2 }, "_snapshot",
2619             "{repository}", "{snapshot}",
2620             "_status",
2621             ],
2622             [ { repository => 1 }, "_snapshot", "{repository}", "_status" ],
2623             [ {}, "_snapshot", "_status" ],
2624             ],
2625             qs => {
2626             error_trace => "boolean",
2627             filter_path => "list",
2628             human => "boolean",
2629             ignore_unavailable => "boolean",
2630             master_timeout => "time",
2631             },
2632             },
2633              
2634             'snapshot.verify_repository' => {
2635             doc => "modules-snapshots",
2636             method => "POST",
2637             parts => { repository => { required => 1 } },
2638             paths => [
2639             [ { repository => 1 }, "_snapshot", "{repository}", "_verify" ],
2640             ],
2641             qs => {
2642             error_trace => "boolean",
2643             filter_path => "list",
2644             human => "boolean",
2645             master_timeout => "time",
2646             timeout => "time",
2647             },
2648             },
2649              
2650             'tasks.cancel' => {
2651             doc => "tasks",
2652             method => "POST",
2653             parts => { task_id => {} },
2654             paths => [
2655             [ { task_id => 1 }, "_tasks", "{task_id}", "_cancel" ],
2656             [ {}, "_tasks", "_cancel" ],
2657             ],
2658             qs => {
2659             actions => "list",
2660             error_trace => "boolean",
2661             filter_path => "list",
2662             human => "boolean",
2663             nodes => "list",
2664             parent_node => "string",
2665             parent_task_id => "string",
2666             },
2667             },
2668              
2669             'tasks.get' => {
2670             doc => "tasks",
2671             parts => { task_id => {} },
2672             paths => [ [ { task_id => 1 }, "_tasks", "{task_id}" ] ],
2673             qs => {
2674             error_trace => "boolean",
2675             filter_path => "list",
2676             human => "boolean",
2677             wait_for_completion => "boolean",
2678             },
2679             },
2680              
2681             'tasks.list' => {
2682             doc => "tasks",
2683             parts => {},
2684             paths => [ [ {}, "_tasks" ] ],
2685             qs => {
2686             actions => "list",
2687             detailed => "boolean",
2688             error_trace => "boolean",
2689             filter_path => "list",
2690             group_by => "enum",
2691             human => "boolean",
2692             nodes => "list",
2693             parent_node => "string",
2694             parent_task_id => "string",
2695             wait_for_completion => "boolean",
2696             },
2697             },
2698              
2699             #=== AUTOGEN - END ===
2700              
2701             );
2702              
2703             __PACKAGE__->_qs_init( \%API );
2704             1;
2705              
2706             =pod
2707              
2708             =encoding UTF-8
2709              
2710             =head1 NAME
2711              
2712             Search::Elasticsearch::Client::5_0::Role::API - This class contains the spec for the Elasticsearch APIs
2713              
2714             =head1 VERSION
2715              
2716             version 6.00
2717              
2718             =head1 DESCRIPTION
2719              
2720             All of the Elasticsearch APIs are defined in this role. The example given below
2721             is the definition for the L method:
2722              
2723             'index' => {
2724             body => { required => 1 },
2725             doc => "docs-index_",
2726             method => "POST",
2727             parts => {
2728             id => {},
2729             index => { required => 1 },
2730             type => { required => 1 }
2731             },
2732             paths => [
2733             [ { id => 2, index => 0, type => 1 }, "{index}",
2734             "{type}", "{id}"
2735             ],
2736             [ { index => 0, type => 1 }, "{index}", "{type}" ],
2737             ],
2738             qs => {
2739             filter_path => "list",
2740             op_type => "enum",
2741             parent => "string",
2742             pipeline => "string",
2743             refresh => "enum",
2744             routing => "string",
2745             timeout => "time",
2746             timestamp => "time",
2747             ttl => "time",
2748             version => "number",
2749             version_type => "enum",
2750             wait_for_active_shards => "string",
2751             },
2752             },
2753              
2754             These definitions can be used by different L
2755             implementations to provide distinct user interfaces.
2756              
2757             =head1 METHODS
2758              
2759             =head2 C
2760              
2761             $defn = $api->api($name);
2762              
2763             The only method in this class is the C method which takes the name
2764             of the I and returns its definition. Actions in the
2765             C or C namespace use the namespace as a prefix, eg:
2766              
2767             $defn = $e->api('indices.create');
2768             $defn = $e->api('cluster.node_stats');
2769              
2770             =head1 SEE ALSO
2771              
2772             =over
2773              
2774             =item *
2775              
2776             L
2777              
2778             =item *
2779              
2780             L
2781              
2782             =back
2783              
2784             =head1 AUTHOR
2785              
2786             Clinton Gormley
2787              
2788             =head1 COPYRIGHT AND LICENSE
2789              
2790             This software is Copyright (c) 2017 by Elasticsearch BV.
2791              
2792             This is free software, licensed under:
2793              
2794             The Apache License, Version 2.0, January 2004
2795              
2796             =cut
2797              
2798             __END__