1Search::Elasticsearch::UCsleirenCto:n:tS7re_ia0br:uc:thRe:od:lEePl:ea:rsAltPiIDc(os3ce)uamrecnht:a:tCiloinent::7_0::Role::API(3)
2
3
4
6 Search::Elasticsearch::Client::7_0::Role::API - This class contains the
7 spec for the Elasticsearch APIs
8
10 version 7.715
11
13 All of the Elasticsearch APIs are defined in this role. The example
14 given below is the definition for the "index()" in
15 Search::Elasticsearch::Client::7_0::Direct method:
16
17 'index' => {
18 body => { required => 1 },
19 doc => "docs-index_",
20 method => "POST",
21 parts => { id => {}, index => {}, type => {} },
22 paths => [
23 [ { id => 2, index => 0, type => 1 }, "{index}",
24 "{type}", "{id}"
25 ],
26 [ { id => 2, index => 0 }, "{index}", "_doc", "{id}" ],
27 [ { index => 0, type => 1 }, "{index}", "{type}" ],
28 [ { index => 0 }, "{index}", "_doc" ],
29 ],
30 qs => {
31 error_trace => "boolean",
32 filter_path => "list",
33 human => "boolean",
34 if_primary_term => "number",
35 if_seq_no => "number",
36 op_type => "enum",
37 pipeline => "string",
38 refresh => "enum",
39 require_alias => "boolean",
40 routing => "string",
41 timeout => "time",
42 version => "number",
43 version_type => "enum",
44 wait_for_active_shards => "string",
45 },
46 }
47
48 These definitions can be used by different
49 Search::Elasticsearch::Role::Client implementations to provide distinct
50 user interfaces.
51
53 "api()"
54 $defn = $api->api($name);
55
56 The only method in this class is the "api()" method which takes the
57 name of the action and returns its definition. Actions in the
58 "indices" or "cluster" namespace use the namespace as a prefix, eg:
59
60 $defn = $e->api('indices.create');
61 $defn = $e->api('cluster.node_stats');
62
64 • Search::Elasticsearch::Role::API
65
66 • Search::Elasticsearch::Client::7_0::Direct
67
69 Enrico Zimuel <enrico.zimuel@elastic.co>
70
72 This software is Copyright (c) 2021 by Elasticsearch BV.
73
74 This is free software, licensed under:
75
76 The Apache License, Version 2.0, January 2004
77
78
79
80perl v5.34.0 Sear2c0h2:2:-E0l1a-s2t1icsearch::Client::7_0::Role::API(3)