Class: ElastomerClient::Client::RestApiSpec::ApiSpecV5_6
- Defined in:
- lib/elastomer_client/client/rest_api_spec/api_spec_v5_6.rb
Instance Attribute Summary
Attributes inherited from ApiSpec
Instance Method Summary collapse
-
#initialize ⇒ ApiSpecV5_6
constructor
A new instance of ApiSpecV5_6.
Methods inherited from ApiSpec
#get, #select_common_params, #select_params, #select_parts, #valid_common_param?, #valid_param?, #valid_part?, #validate_params!
Constructor Details
#initialize ⇒ ApiSpecV5_6
Returns a new instance of ApiSpecV5_6.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 |
# File 'lib/elastomer_client/client/rest_api_spec/api_spec_v5_6.rb', line 7 def initialize @rest_apis = { "bulk" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-bulk.html", methods: ["POST", "PUT"], body: {"description"=>"The operation definition and data (action-data pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}, url: { path: "/_bulk", paths: ["/_bulk", "/{index}/_bulk", "/{index}/{type}/_bulk"], parts: { "index" => {"type"=>"string", "description"=>"Default index for items which don't provide one"}, "type" => {"type"=>"string", "description"=>"Default document type for items which don't provide one"}, }, params: { "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "type" => {"type"=>"string", "description"=>"Default document type for items which don't provide one"}, "fields" => {"type"=>"list", "description"=>"Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request"}, "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request"}, "_source_exclude" => {"type"=>"list", "description"=>"Default list of fields to exclude from the returned _source field, can be overridden on each sub-request"}, "_source_include" => {"type"=>"list", "description"=>"Default list of fields to extract and return from the _source field, can be overridden on each sub-request"}, "pipeline" => {"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}, } } ), "cat.aliases" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-alias.html", methods: ["GET"], body: nil, url: { path: "/_cat/aliases", paths: ["/_cat/aliases", "/_cat/aliases/{name}"], parts: { "name" => {"type"=>"list", "description"=>"A comma-separated list of alias names to return"}, }, params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.allocation" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-allocation.html", methods: ["GET"], body: nil, url: { path: "/_cat/allocation", paths: ["/_cat/allocation", "/_cat/allocation/{node_id}"], parts: { "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information"}, }, params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.count" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-count.html", methods: ["GET"], body: nil, url: { path: "/_cat/count", paths: ["/_cat/count", "/_cat/count/{index}"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, }, params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.fielddata" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-fielddata.html", methods: ["GET"], body: nil, url: { path: "/_cat/fielddata", paths: ["/_cat/fielddata", "/_cat/fielddata/{fields}"], parts: { "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return the fielddata size"}, }, params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return in the output"}, } } ), "cat.health" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-health.html", methods: ["GET"], body: nil, url: { path: "/_cat/health", paths: ["/_cat/health"], params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "ts" => {"type"=>"boolean", "description"=>"Set to false to disable timestamping", "default"=>true}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.help" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat.html", methods: ["GET"], body: nil, url: { path: "/_cat", paths: ["/_cat"], params: { "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, } } ), "cat.indices" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-indices.html", methods: ["GET"], body: nil, url: { path: "/_cat/indices", paths: ["/_cat/indices", "/_cat/indices/{index}"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, }, params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "m", "g"]}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "health" => {"type"=>"enum", "options"=>["green", "yellow", "red"], "default"=>nil, "description"=>"A health status (\"green\", \"yellow\", or \"red\" to filter only indices matching the specified health status"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "pri" => {"type"=>"boolean", "description"=>"Set to true to return stats only for primary shards", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.master" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-master.html", methods: ["GET"], body: nil, url: { path: "/_cat/master", paths: ["/_cat/master"], params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.nodeattrs" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-nodeattrs.html", methods: ["GET"], body: nil, url: { path: "/_cat/nodeattrs", paths: ["/_cat/nodeattrs"], params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.nodes" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-nodes.html", methods: ["GET"], body: nil, url: { path: "/_cat/nodes", paths: ["/_cat/nodes"], params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "full_id" => {"type"=>"boolean", "description"=>"Return the full node ID instead of the shortened version (default: false)"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.pending_tasks" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-pending-tasks.html", methods: ["GET"], body: nil, url: { path: "/_cat/pending_tasks", paths: ["/_cat/pending_tasks"], params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.plugins" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-plugins.html", methods: ["GET"], body: nil, url: { path: "/_cat/plugins", paths: ["/_cat/plugins"], params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.recovery" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-recovery.html", methods: ["GET"], body: nil, url: { path: "/_cat/recovery", paths: ["/_cat/recovery", "/_cat/recovery/{index}"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, }, params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.repositories" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-repositories.html", methods: ["GET"], body: nil, url: { path: "/_cat/repositories", paths: ["/_cat/repositories"], params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node", "default"=>false}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.segments" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-segments.html", methods: ["GET"], body: nil, url: { path: "/_cat/segments", paths: ["/_cat/segments", "/_cat/segments/{index}"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, }, params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.shards" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-shards.html", methods: ["GET"], body: nil, url: { path: "/_cat/shards", paths: ["/_cat/shards", "/_cat/shards/{index}"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to limit the returned information"}, }, params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "bytes" => {"type"=>"enum", "description"=>"The unit in which to display byte values", "options"=>["b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb"]}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.snapshots" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-snapshots.html", methods: ["GET"], body: nil, url: { path: "/_cat/snapshots", paths: ["/_cat/snapshots", "/_cat/snapshots/{repository}"], parts: { "repository" => {"type"=>"list", "required"=>true, "description"=>"Name of repository from which to fetch the snapshot information"}, }, params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Set to true to ignore unavailable snapshots", "default"=>false}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.tasks" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html", methods: ["GET"], body: nil, url: { path: "/_cat/tasks", paths: ["/_cat/tasks"], params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, "actions" => {"type"=>"list", "description"=>"A comma-separated list of actions that should be returned. Leave empty to return all."}, "detailed" => {"type"=>"boolean", "description"=>"Return detailed task information (default: false)"}, "parent_node" => {"type"=>"string", "description"=>"Return tasks with specified parent node."}, "parent_task" => {"type"=>"number", "description"=>"Return tasks with specified parent task id. Set to -1 to return all."}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.templates" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-templates.html", methods: ["GET"], body: nil, url: { path: "/_cat/templates", paths: ["/_cat/templates", "/_cat/templates/{name}"], parts: { "name" => {"type"=>"string", "description"=>"A pattern that returned template names must match"}, }, params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "cat.thread_pool" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-thread-pool.html", methods: ["GET"], body: nil, url: { path: "/_cat/thread_pool", paths: ["/_cat/thread_pool", "/_cat/thread_pool/{thread_pool_patterns}"], parts: { "thread_pool_patterns" => {"type"=>"list", "description"=>"A comma-separated list of regular-expressions to filter the thread pools in the output"}, }, params: { "format" => {"type"=>"string", "description"=>"a short version of the Accept header, e.g. json, yaml"}, "size" => {"type"=>"enum", "description"=>"The multiplier in which to display values", "options"=>["", "k", "m", "g", "t", "p"]}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "h" => {"type"=>"list", "description"=>"Comma-separated list of column names to display"}, "help" => {"type"=>"boolean", "description"=>"Return help information", "default"=>false}, "s" => {"type"=>"list", "description"=>"Comma-separated list of column names or column aliases to sort by"}, "v" => {"type"=>"boolean", "description"=>"Verbose mode. Display column headers", "default"=>false}, } } ), "clear_scroll" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-request-scroll.html", methods: ["DELETE"], body: {"description"=>"A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter"}, url: { path: "/_search/scroll/{scroll_id}", paths: ["/_search/scroll/{scroll_id}", "/_search/scroll"], parts: { "scroll_id" => {"type"=>"list", "description"=>"A comma-separated list of scroll IDs to clear"}, }, } ), "cluster.allocation_explain" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-allocation-explain.html", methods: ["GET", "POST"], body: {"description"=>"The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'"}, url: { path: "/_cluster/allocation/explain", paths: ["/_cluster/allocation/explain"], params: { "include_yes_decisions" => {"type"=>"boolean", "description"=>"Return 'YES' decisions in explanation (default: false)"}, "include_disk_info" => {"type"=>"boolean", "description"=>"Return information about disk usage and shard sizes (default: false)"}, } } ), "cluster.get_settings" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-update-settings.html", methods: ["GET"], body: nil, url: { path: "/_cluster/settings", paths: ["/_cluster/settings"], params: { "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "include_defaults" => {"type"=>"boolean", "description"=>"Whether to return all default clusters setting.", "default"=>false}, } } ), "cluster.health" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-health.html", methods: ["GET"], body: nil, url: { path: "/_cluster/health", paths: ["/_cluster/health", "/_cluster/health/{index}"], parts: { "index" => {"type"=>"list", "description"=>"Limit the information returned to a specific index"}, }, params: { "level" => {"type"=>"enum", "options"=>["cluster", "indices", "shards"], "default"=>"cluster", "description"=>"Specify the level of detail for returned information"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "wait_for_active_shards" => {"type"=>"string", "description"=>"Wait until the specified number of shards is active"}, "wait_for_nodes" => {"type"=>"string", "description"=>"Wait until the specified number of nodes is available"}, "wait_for_events" => {"type"=>"enum", "options"=>["immediate", "urgent", "high", "normal", "low", "languid"], "description"=>"Wait until all currently queued events with the given priority are processed"}, "wait_for_no_relocating_shards" => {"type"=>"boolean", "description"=>"Whether to wait until there are no relocating shards in the cluster"}, "wait_for_status" => {"type"=>"enum", "options"=>["green", "yellow", "red"], "default"=>nil, "description"=>"Wait until cluster is in a specific state"}, } } ), "cluster.pending_tasks" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-pending.html", methods: ["GET"], body: nil, url: { path: "/_cluster/pending_tasks", paths: ["/_cluster/pending_tasks"], params: { "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, } } ), "cluster.put_settings" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-update-settings.html", methods: ["PUT"], body: {"description"=>"The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart)."}, url: { path: "/_cluster/settings", paths: ["/_cluster/settings"], params: { "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, } } ), "cluster.remote_info" => RestApi.new( documentation: "http://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-remote-info.html", methods: ["GET"], body: nil, url: { path: "/_remote/info", paths: ["/_remote/info"], } ), "cluster.reroute" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-reroute.html", methods: ["POST"], body: {"description"=>"The definition of `commands` to perform (`move`, `cancel`, `allocate`)"}, url: { path: "/_cluster/reroute", paths: ["/_cluster/reroute"], params: { "dry_run" => {"type"=>"boolean", "description"=>"Simulate the operation only and return the resulting state"}, "explain" => {"type"=>"boolean", "description"=>"Return an explanation of why the commands can or cannot be executed"}, "retry_failed" => {"type"=>"boolean", "description"=>"Retries allocation of shards that are blocked due to too many subsequent allocation failures"}, "metric" => {"type"=>"list", "options"=>["_all", "blocks", "metadata", "nodes", "routing_table", "master_node", "version"], "description"=>"Limit the information returned to the specified metrics. Defaults to all but metadata"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, } } ), "cluster.state" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-state.html", methods: ["GET"], body: nil, url: { path: "/_cluster/state", paths: ["/_cluster/state", "/_cluster/state/{metric}", "/_cluster/state/{metric}/{index}"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, "metric" => {"type"=>"list", "options"=>["_all", "blocks", "metadata", "nodes", "routing_table", "routing_nodes", "master_node", "version"], "description"=>"Limit the information returned to the specified metrics"}, }, params: { "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, } } ), "cluster.stats" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-stats.html", methods: ["GET"], body: nil, url: { path: "/_cluster/stats", paths: ["/_cluster/stats", "/_cluster/stats/nodes/{node_id}"], parts: { "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, }, params: { "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, } } ), "count" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-count.html", methods: ["POST", "GET"], body: {"description"=>"A query to restrict the results specified with the Query DSL (optional)"}, url: { path: "/_count", paths: ["/_count", "/{index}/_count", "/{index}/{type}/_count"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of indices to restrict the results"}, "type" => {"type"=>"list", "description"=>"A comma-separated list of types to restrict the results"}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "min_score" => {"type"=>"number", "description"=>"Include only documents with a specific `_score` value in the result"}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "terminate_after" => {"type"=>"number", "description"=>"The maximum count for each shard, upon reaching which the query execution will terminate early"}, } } ), "count_percolate" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html", methods: ["GET", "POST"], body: {"description"=>"The count percolator request definition using the percolate DSL", "required"=>false}, url: { path: "/{index}/{type}/_percolate/count", paths: ["/{index}/{type}/_percolate/count", "/{index}/{type}/{id}/_percolate/count"], parts: { "index" => {"type"=>"string", "required"=>true, "description"=>"The index of the document being count percolated."}, "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document being count percolated."}, "id" => {"type"=>"string", "required"=>false, "description"=>"Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster."}, }, params: { "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "percolate_index" => {"type"=>"string", "description"=>"The index to count percolate the document into. Defaults to index."}, "percolate_type" => {"type"=>"string", "description"=>"The type to count percolate document into. Defaults to type."}, "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, } } ), "create" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-index_.html", methods: ["PUT", "POST"], body: {"description"=>"The document", "required"=>true}, url: { path: "/{index}/{type}/{id}/_create", paths: ["/{index}/{type}/{id}/_create"], parts: { "id" => {"type"=>"string", "required"=>true, "description"=>"Document ID"}, "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document"}, }, params: { "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "parent" => {"type"=>"string", "description"=>"ID of the parent document"}, "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "timestamp" => {"type"=>"time", "description"=>"Explicit timestamp for the document"}, "ttl" => {"type"=>"time", "description"=>"Expiration time for the document"}, "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, "pipeline" => {"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}, } } ), "delete" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-delete.html", methods: ["DELETE"], body: nil, url: { path: "/{index}/{type}/{id}", paths: ["/{index}/{type}/{id}"], parts: { "id" => {"type"=>"string", "required"=>true, "description"=>"The document ID"}, "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document"}, }, params: { "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "parent" => {"type"=>"string", "description"=>"ID of parent document"}, "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, } } ), "delete_by_query" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-delete-by-query.html", methods: ["POST"], body: {"description"=>"The search definition using the Query DSL", "required"=>true}, url: { path: "/{index}/_delete_by_query", paths: ["/{index}/_delete_by_query", "/{index}/{type}/_delete_by_query"], parts: { "index" => {"required"=>true, "type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}, }, params: { "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "from" => {"type"=>"number", "description"=>"Starting offset (default: 0)"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "conflicts" => {"note"=>"This is not copied from search", "type"=>"enum", "options"=>["abort", "proceed"], "default"=>"abort", "description"=>"What to do when the delete-by-query hits version conflicts?"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, "search_timeout" => {"type"=>"time", "description"=>"Explicit timeout for each search request. Defaults to no timeout."}, "size" => {"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, "sort" => {"type"=>"list", "description"=>"A comma-separated list of <field>:<direction> pairs"}, "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after" => {"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats" => {"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "version" => {"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "request_cache" => {"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh" => {"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, "timeout" => {"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size" => {"type"=>"number", "defaut_value"=>100, "description"=>"Size on the scroll request powering the update_by_query"}, "wait_for_completion" => {"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the delete-by-query is complete."}, "requests_per_second" => {"type"=>"number", "default"=>0, "description"=>"The throttle for this request in sub-requests per second. -1 means no throttle."}, "slices" => {"type"=>"number", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."}, } } ), "delete_script" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html", methods: ["DELETE"], body: nil, url: { path: "/_scripts/{lang}", paths: ["/_scripts/{lang}", "/_scripts/{lang}/{id}"], parts: { "id" => {"type"=>"string", "description"=>"Script ID", "required"=>true}, "lang" => {"type"=>"string", "description"=>"Script language", "required"=>true}, }, params: { "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, } } ), "delete_template" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html", methods: ["DELETE"], body: nil, url: { path: "/_search/template/{id}", paths: ["/_search/template/{id}"], parts: { "id" => {"type"=>"string", "description"=>"Template ID", "required"=>true}, }, } ), "exists" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html", methods: ["HEAD"], body: nil, url: { path: "/{index}/{type}/{id}", paths: ["/{index}/{type}/{id}"], parts: { "id" => {"type"=>"string", "required"=>true, "description"=>"The document ID"}, "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document (use `_all` to fetch the first document matching the ID across all types)"}, }, params: { "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, "parent" => {"type"=>"string", "description"=>"The ID of the parent document"}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, } } ), "exists_source" => RestApi.new( documentation: "http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html", methods: ["HEAD"], body: nil, url: { path: "/{index}/{type}/{id}/_source", paths: ["/{index}/{type}/{id}/_source"], parts: { "id" => {"type"=>"string", "required"=>true, "description"=>"The document ID"}, "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document; use `_all` to fetch the first document matching the ID across all types"}, }, params: { "parent" => {"type"=>"string", "description"=>"The ID of the parent document"}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, } } ), "explain" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-explain.html", methods: ["GET", "POST"], body: {"description"=>"The query definition using the Query DSL"}, url: { path: "/{index}/{type}/{id}/_explain", paths: ["/{index}/{type}/{id}/_explain"], parts: { "id" => {"type"=>"string", "required"=>true, "description"=>"The document ID"}, "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document"}, }, params: { "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)"}, "analyzer" => {"type"=>"string", "description"=>"The analyzer for the query string query"}, "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df" => {"type"=>"string", "description"=>"The default field for query string query (default: _all)"}, "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "parent" => {"type"=>"string", "description"=>"The ID of the parent document"}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, } } ), "field_caps" => RestApi.new( documentation: "http://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-field-caps.html", methods: ["GET", "POST"], body: {"description"=>"Field json objects containing an array of field names", "required"=>false}, url: { path: "/_field_caps", paths: ["/_field_caps", "/{index}/_field_caps"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, }, params: { "fields" => {"type"=>"list", "description"=>"A comma-separated list of field names"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, } } ), "field_stats" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-field-stats.html", methods: ["GET", "POST"], body: {"description"=>"Field json objects containing the name and optionally a range to filter out indices result, that have results outside the defined bounds", "required"=>false}, url: { path: "/_field_stats", paths: ["/_field_stats", "/{index}/_field_stats"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, }, params: { "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for to get field statistics for (min value, max value, and more)"}, "level" => {"type"=>"enum", "options"=>["indices", "cluster"], "default"=>"cluster", "description"=>"Defines if field stats should be returned on a per index level or on a cluster wide level"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, } } ), "get" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html", methods: ["GET"], body: nil, url: { path: "/{index}/{type}/{id}", paths: ["/{index}/{type}/{id}"], parts: { "id" => {"type"=>"string", "required"=>true, "description"=>"The document ID"}, "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document (use `_all` to fetch the first document matching the ID across all types)"}, }, params: { "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, "parent" => {"type"=>"string", "description"=>"The ID of the parent document"}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, } } ), "get_script" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html", methods: ["GET"], body: nil, url: { path: "/_scripts/{lang}", paths: ["/_scripts/{lang}", "/_scripts/{lang}/{id}"], parts: { "id" => {"type"=>"string", "description"=>"Script ID", "required"=>true}, "lang" => {"type"=>"string", "description"=>"Script language", "required"=>true}, }, } ), "get_source" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html", methods: ["GET"], body: nil, url: { path: "/{index}/{type}/{id}/_source", paths: ["/{index}/{type}/{id}/_source"], parts: { "id" => {"type"=>"string", "required"=>true, "description"=>"The document ID"}, "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document; use `_all` to fetch the first document matching the ID across all types"}, }, params: { "parent" => {"type"=>"string", "description"=>"The ID of the parent document"}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, } } ), "get_template" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html", methods: ["GET"], body: nil, url: { path: "/_search/template/{id}", paths: ["/_search/template/{id}"], parts: { "id" => {"type"=>"string", "description"=>"Template ID", "required"=>true}, }, } ), "index" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-index_.html", methods: ["POST", "PUT"], body: {"description"=>"The document", "required"=>true}, url: { path: "/{index}/{type}", paths: ["/{index}/{type}", "/{index}/{type}/{id}"], parts: { "id" => {"type"=>"string", "description"=>"Document ID"}, "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document"}, }, params: { "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "op_type" => {"type"=>"enum", "options"=>["index", "create"], "default"=>"index", "description"=>"Explicit operation type"}, "parent" => {"type"=>"string", "description"=>"ID of the parent document"}, "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "timestamp" => {"type"=>"time", "description"=>"Explicit timestamp for the document"}, "ttl" => {"type"=>"time", "description"=>"Expiration time for the document"}, "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, "pipeline" => {"type"=>"string", "description"=>"The pipeline id to preprocess incoming documents with"}, } } ), "indices.analyze" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-analyze.html", methods: ["GET", "POST"], body: {"description"=>"The text on which the analysis should be performed"}, url: { path: "/_analyze", paths: ["/_analyze", "/{index}/_analyze"], parts: { "index" => {"type"=>"string", "description"=>"The name of the index to scope the operation"}, }, params: { "analyzer" => {"type"=>"string", "description"=>"The name of the analyzer to use"}, "char_filter" => {"type"=>"list", "description"=>"A comma-separated list of character filters to use for the analysis"}, "field" => {"type"=>"string", "description"=>"Use the analyzer configured for this field (instead of passing the analyzer name)"}, "filter" => {"type"=>"list", "description"=>"A comma-separated list of filters to use for the analysis"}, "index" => {"type"=>"string", "description"=>"The name of the index to scope the operation"}, "prefer_local" => {"type"=>"boolean", "description"=>"With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)"}, "text" => {"type"=>"list", "description"=>"The text on which the analysis should be performed (when request body is not used)"}, "tokenizer" => {"type"=>"string", "description"=>"The name of the tokenizer to use for the analysis"}, "explain" => {"type"=>"boolean", "description"=>"With `true`, outputs more advanced details. (default: false)"}, "attributes" => {"type"=>"list", "description"=>"A comma-separated list of token attributes to output, this parameter works only with `explain=true`"}, "format" => {"type"=>"enum", "options"=>["detailed", "text"], "default"=>"detailed", "description"=>"Format of the output"}, } } ), "indices.clear_cache" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-clearcache.html", methods: ["POST", "GET"], body: nil, url: { path: "/_cache/clear", paths: ["/_cache/clear", "/{index}/_cache/clear"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}, }, params: { "field_data" => {"type"=>"boolean", "description"=>"Clear field data"}, "fielddata" => {"type"=>"boolean", "description"=>"Clear field data"}, "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to clear when using the `field_data` parameter (default: all)"}, "query" => {"type"=>"boolean", "description"=>"Clear query caches"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "index" => {"type"=>"list", "description"=>"A comma-separated list of index name to limit the operation"}, "recycler" => {"type"=>"boolean", "description"=>"Clear the recycler cache"}, "request_cache" => {"type"=>"boolean", "description"=>"Clear request cache"}, "request" => {"type"=>"boolean", "description"=>"Clear request cache"}, } } ), "indices.close" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-open-close.html", methods: ["POST"], body: nil, url: { path: "/{index}/_close", paths: ["/{index}/_close"], parts: { "index" => {"type"=>"list", "required"=>true, "description"=>"A comma separated list of indices to close"}, }, params: { "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, } } ), "indices.create" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-create-index.html", methods: ["PUT"], body: {"description"=>"The configuration for the index (`settings` and `mappings`)"}, url: { path: "/{index}", paths: ["/{index}"], parts: { "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, }, params: { "wait_for_active_shards" => {"type"=>"string", "description"=>"Set the number of active shards to wait for before the operation returns."}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, "update_all_types" => {"type"=>"boolean", "description"=>"Whether to update the mapping for all fields with the same name across all types or not"}, } } ), "indices.delete" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-delete-index.html", methods: ["DELETE"], body: nil, url: { path: "/{index}", paths: ["/{index}"], parts: { "index" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices"}, }, params: { "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, } } ), "indices.delete_alias" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html", methods: ["DELETE"], body: nil, url: { path: "/{index}/_alias/{name}", paths: ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], parts: { "index" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names (supports wildcards); use `_all` for all indices"}, "name" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices."}, }, params: { "timeout" => {"type"=>"time", "description"=>"Explicit timestamp for the document"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, } } ), "indices.delete_template" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html", methods: ["DELETE"], body: nil, url: { path: "/_template/{name}", paths: ["/_template/{name}"], parts: { "name" => {"type"=>"string", "required"=>true, "description"=>"The name of the template"}, }, params: { "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, } } ), "indices.exists" => RestApi.new( documentation: "http://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-exists.html", methods: ["HEAD"], body: nil, url: { path: "/{index}", paths: ["/{index}"], parts: { "index" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names"}, }, params: { "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "include_defaults" => {"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}, } } ), "indices.exists_alias" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html", methods: ["HEAD"], body: nil, url: { path: "/_alias/{name}", paths: ["/_alias/{name}", "/{index}/_alias/{name}"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to filter aliases"}, "name" => {"type"=>"list", "description"=>"A comma-separated list of alias names to return"}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, } } ), "indices.exists_template" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html", methods: ["HEAD"], body: nil, url: { path: "/_template/{name}", paths: ["/_template/{name}"], parts: { "name" => {"type"=>"list", "required"=>true, "description"=>"The comma separated names of the index templates"}, }, params: { "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, } } ), "indices.exists_type" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-types-exists.html", methods: ["HEAD"], body: nil, url: { path: "/{index}/_mapping/{type}", paths: ["/{index}/_mapping/{type}"], parts: { "index" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names; use `_all` to check the types across all indices"}, "type" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of document types to check"}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, } } ), "indices.flush" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-flush.html", methods: ["POST", "GET"], body: nil, url: { path: "/_flush", paths: ["/_flush", "/{index}/_flush"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string for all indices"}, }, params: { "force" => {"type"=>"boolean", "description"=>"Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)"}, "wait_if_ongoing" => {"type"=>"boolean", "description"=>"If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running."}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, } } ), "indices.flush_synced" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-synced-flush.html", methods: ["POST", "GET"], body: nil, url: { path: "/_flush/synced", paths: ["/_flush/synced", "/{index}/_flush/synced"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string for all indices"}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, } } ), "indices.forcemerge" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-forcemerge.html", methods: ["POST"], body: nil, url: { path: "/_forcemerge", paths: ["/_forcemerge", "/{index}/_forcemerge"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, }, params: { "flush" => {"type"=>"boolean", "description"=>"Specify whether the index should be flushed after performing the operation (default: true)"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "max_num_segments" => {"type"=>"number", "description"=>"The number of segments the index should be merged into (default: dynamic)"}, "only_expunge_deletes" => {"type"=>"boolean", "description"=>"Specify whether the operation should only expunge deleted documents"}, "operation_threading" => {"description"=>"TODO: ?"}, "wait_for_merge" => {"type"=>"boolean", "description"=>"Specify whether the request should block until the merge process is finished (default: true)"}, } } ), "indices.get" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-index.html", methods: ["GET"], body: nil, url: { path: "/{index}", paths: ["/{index}", "/{index}/{feature}"], parts: { "index" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names"}, "feature" => {"type"=>"list", "description"=>"A comma-separated list of features", "options"=>["_settings", "_mappings", "_aliases"]}, }, params: { "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Ignore unavailable indexes (default: false)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Ignore if a wildcard expression resolves to no concrete indices (default: false)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether wildcard expressions should get expanded to open or closed indices (default: open)"}, "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "include_defaults" => {"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}, } } ), "indices.get_alias" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html", methods: ["GET"], body: nil, url: { path: "/_alias/", paths: ["/_alias", "/_alias/{name}", "/{index}/_alias/{name}", "/{index}/_alias"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to filter aliases"}, "name" => {"type"=>"list", "description"=>"A comma-separated list of alias names to return"}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"all", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, } } ), "indices.get_field_mapping" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-field-mapping.html", methods: ["GET"], body: nil, url: { path: "/_mapping/field/{fields}", paths: ["/_mapping/field/{fields}", "/{index}/_mapping/field/{fields}", "/_mapping/{type}/field/{fields}", "/{index}/_mapping/{type}/field/{fields}"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names"}, "type" => {"type"=>"list", "description"=>"A comma-separated list of document types"}, "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields", "required"=>true}, }, params: { "include_defaults" => {"type"=>"boolean", "description"=>"Whether the default mapping values should be returned as well"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, } } ), "indices.get_mapping" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-mapping.html", methods: ["GET"], body: nil, url: { path: "/_mapping", paths: ["/_mapping", "/{index}/_mapping", "/_mapping/{type}", "/{index}/_mapping/{type}"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names"}, "type" => {"type"=>"list", "description"=>"A comma-separated list of document types"}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, } } ), "indices.get_settings" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-settings.html", methods: ["GET"], body: nil, url: { path: "/_settings", paths: ["/_settings", "/{index}/_settings", "/{index}/_settings/{name}", "/_settings/{name}"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, "name" => {"type"=>"list", "description"=>"The name of the settings that should be included"}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>["open", "closed"], "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "include_defaults" => {"type"=>"boolean", "description"=>"Whether to return all default setting for each of the indices.", "default"=>false}, } } ), "indices.get_template" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html", methods: ["GET"], body: nil, url: { path: "/_template/{name}", paths: ["/_template", "/_template/{name}"], parts: { "name" => {"type"=>"list", "required"=>false, "description"=>"The comma separated names of the index templates"}, }, params: { "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, } } ), "indices.get_upgrade" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-upgrade.html", methods: ["GET"], body: nil, url: { path: "/_upgrade", paths: ["/_upgrade", "/{index}/_upgrade"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, } } ), "indices.open" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-open-close.html", methods: ["POST"], body: nil, url: { path: "/{index}/_open", paths: ["/{index}/_open"], parts: { "index" => {"type"=>"list", "required"=>true, "description"=>"A comma separated list of indices to open"}, }, params: { "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"closed", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, } } ), "indices.put_alias" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html", methods: ["PUT", "POST"], body: {"description"=>"The settings for the alias, such as `routing` or `filter`", "required"=>false}, url: { path: "/{index}/_alias/{name}", paths: ["/{index}/_alias/{name}", "/{index}/_aliases/{name}"], parts: { "index" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices."}, "name" => {"type"=>"string", "required"=>true, "description"=>"The name of the alias to be created or updated"}, }, params: { "timeout" => {"type"=>"time", "description"=>"Explicit timestamp for the document"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, } } ), "indices.put_mapping" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-put-mapping.html", methods: ["PUT", "POST"], body: {"description"=>"The mapping definition", "required"=>true}, url: { path: "/{index}/{type}/_mapping", paths: ["/{index}/{type}/_mapping", "/{index}/_mapping/{type}", "/_mapping/{type}", "/{index}/{type}/_mappings", "/{index}/_mappings/{type}", "/_mappings/{type}"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices."}, "type" => {"type"=>"string", "required"=>true, "description"=>"The name of the document type"}, }, params: { "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "update_all_types" => {"type"=>"boolean", "description"=>"Whether to update the mapping for all fields with the same name across all types or not"}, } } ), "indices.put_settings" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-update-settings.html", methods: ["PUT"], body: {"description"=>"The index settings to be updated", "required"=>true}, url: { path: "/_settings", paths: ["/_settings", "/{index}/_settings"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, "preserve_existing" => {"type"=>"boolean", "description"=>"Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, } } ), "indices.put_template" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html", methods: ["PUT", "POST"], body: {"description"=>"The template definition", "required"=>true}, url: { path: "/_template/{name}", paths: ["/_template/{name}"], parts: { "name" => {"type"=>"string", "required"=>true, "description"=>"The name of the template"}, }, params: { "order" => {"type"=>"number", "description"=>"The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)"}, "create" => {"type"=>"boolean", "description"=>"Whether the index template should only be added if new or can also replace an existing one", "default"=>false}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, } } ), "indices.recovery" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-recovery.html", methods: ["GET"], body: nil, url: { path: "/_recovery", paths: ["/_recovery", "/{index}/_recovery"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, }, params: { "detailed" => {"type"=>"boolean", "description"=>"Whether to display detailed information about shard recovery", "default"=>false}, "active_only" => {"type"=>"boolean", "description"=>"Display only those recoveries that are currently on-going", "default"=>false}, } } ), "indices.refresh" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-refresh.html", methods: ["POST", "GET"], body: nil, url: { path: "/_refresh", paths: ["/_refresh", "/{index}/_refresh"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, } } ), "indices.rollover" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-rollover-index.html", methods: ["POST"], body: {"description"=>"The conditions that needs to be met for executing rollover"}, url: { path: "/{alias}/_rollover", paths: ["/{alias}/_rollover", "/{alias}/_rollover/{new_index}"], parts: { "alias" => {"type"=>"string", "required"=>true, "description"=>"The name of the alias to rollover"}, "new_index" => {"type"=>"string", "required"=>false, "description"=>"The name of the rollover index"}, }, params: { "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "dry_run" => {"type"=>"boolean", "description"=>"If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, "wait_for_active_shards" => {"type"=>"string", "description"=>"Set the number of active shards to wait for on the newly created rollover index before the operation returns."}, } } ), "indices.segments" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-segments.html", methods: ["GET"], body: nil, url: { path: "/_segments", paths: ["/_segments", "/{index}/_segments"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "operation_threading" => {"description"=>"TODO: ?"}, "verbose" => {"type"=>"boolean", "description"=>"Includes detailed memory usage by Lucene.", "default"=>false}, } } ), "indices.shard_stores" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-shards-stores.html", methods: ["GET"], body: nil, url: { path: "/_shard_stores", paths: ["/_shard_stores", "/{index}/_shard_stores"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, }, params: { "status" => {"type"=>"list", "options"=>["green", "yellow", "red", "all"], "description"=>"A comma-separated list of statuses used to filter on shards to get store information for"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "operation_threading" => {"description"=>"TODO: ?"}, } } ), "indices.shrink" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-shrink-index.html", methods: ["PUT", "POST"], body: {"description"=>"The configuration for the target index (`settings` and `aliases`)"}, url: { path: "/{index}/_shrink/{target}", paths: ["/{index}/_shrink/{target}"], parts: { "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the source index to shrink"}, "target" => {"type"=>"string", "required"=>true, "description"=>"The name of the target index to shrink into"}, }, params: { "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, "wait_for_active_shards" => {"type"=>"string", "description"=>"Set the number of active shards to wait for on the shrunken index before the operation returns."}, } } ), "indices.stats" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-stats.html", methods: ["GET"], body: nil, url: { path: "/_stats", paths: ["/_stats", "/_stats/{metric}", "/{index}/_stats", "/{index}/_stats/{metric}"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, "metric" => {"type"=>"list", "options"=>["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "percolate", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description"=>"Limit the information returned the specific metrics."}, }, params: { "completion_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"}, "fielddata_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` index metric (supports wildcards)"}, "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"}, "groups" => {"type"=>"list", "description"=>"A comma-separated list of search groups for `search` index metric"}, "level" => {"type"=>"enum", "description"=>"Return stats aggregated at cluster, index or shard level", "options"=>["cluster", "indices", "shards"], "default"=>"indices"}, "types" => {"type"=>"list", "description"=>"A comma-separated list of document types for the `indexing` index metric"}, "include_segment_file_sizes" => {"type"=>"boolean", "description"=>"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)", "default"=>false}, } } ), "indices.update_aliases" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html", methods: ["POST"], body: {"description"=>"The definition of `actions` to perform", "required"=>true}, url: { path: "/_aliases", paths: ["/_aliases"], params: { "timeout" => {"type"=>"time", "description"=>"Request timeout"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, } } ), "indices.upgrade" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-upgrade.html", methods: ["POST"], body: nil, url: { path: "/_upgrade", paths: ["/_upgrade", "/{index}/_upgrade"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"}, }, params: { "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "wait_for_completion" => {"type"=>"boolean", "description"=>"Specify whether the request should block until the all segments are upgraded (default: false)"}, "only_ancient_segments" => {"type"=>"boolean", "description"=>"If true, only ancient (an older Lucene major release) segments will be upgraded"}, } } ), "indices.validate_query" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-validate.html", methods: ["GET", "POST"], body: {"description"=>"The query definition specified with the Query DSL"}, url: { path: "/_validate/query", paths: ["/_validate/query", "/{index}/_validate/query", "/{index}/{type}/_validate/query"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices"}, "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types"}, }, params: { "explain" => {"type"=>"boolean", "description"=>"Return detailed information about the error"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "operation_threading" => {"description"=>"TODO: ?"}, "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "rewrite" => {"type"=>"boolean", "description"=>"Provide a more detailed explanation showing the actual Lucene query that will be executed."}, "all_shards" => {"type"=>"boolean", "description"=>"Execute validation on all shards instead of one random shard per index"}, } } ), "info" => RestApi.new( documentation: "https://www.elastic.co/guide/", methods: ["GET"], body: nil, url: { path: "/", paths: ["/"], } ), "ingest.delete_pipeline" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html", methods: ["DELETE"], body: nil, url: { path: "/_ingest/pipeline/{id}", paths: ["/_ingest/pipeline/{id}"], parts: { "id" => {"type"=>"string", "description"=>"Pipeline ID", "required"=>true}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, } } ), "ingest.get_pipeline" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html", methods: ["GET"], body: nil, url: { path: "/_ingest/pipeline/{id}", paths: ["/_ingest/pipeline", "/_ingest/pipeline/{id}"], parts: { "id" => {"type"=>"string", "description"=>"Comma separated list of pipeline ids. Wildcards supported"}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, } } ), "ingest.processor_grok" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html", methods: ["GET"], body: nil, url: { path: "/_ingest/processor/grok", paths: ["/_ingest/processor/grok"], } ), "ingest.put_pipeline" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html", methods: ["PUT"], body: {"description"=>"The ingest definition", "required"=>true}, url: { path: "/_ingest/pipeline/{id}", paths: ["/_ingest/pipeline/{id}"], parts: { "id" => {"type"=>"string", "description"=>"Pipeline ID", "required"=>true}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, } } ), "ingest.simulate" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html", methods: ["GET", "POST"], body: {"description"=>"The simulate definition", "required"=>true}, url: { path: "/_ingest/pipeline/_simulate", paths: ["/_ingest/pipeline/_simulate", "/_ingest/pipeline/{id}/_simulate"], parts: { "id" => {"type"=>"string", "description"=>"Pipeline ID", "required"=>false}, }, params: { "verbose" => {"type"=>"boolean", "description"=>"Verbose mode. Display data output for each processor in executed pipeline", "default"=>false}, } } ), "mget" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-multi-get.html", methods: ["GET", "POST"], body: {"description"=>"Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL.", "required"=>true}, url: { path: "/_mget", paths: ["/_mget", "/{index}/_mget", "/{index}/{type}/_mget"], parts: { "index" => {"type"=>"string", "description"=>"The name of the index"}, "type" => {"type"=>"string", "description"=>"The type of the document"}, }, params: { "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return in the response"}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "realtime" => {"type"=>"boolean", "description"=>"Specify whether to perform the operation in realtime or search mode"}, "refresh" => {"type"=>"boolean", "description"=>"Refresh the shard containing the document before performing the operation"}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, } } ), "mpercolate" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html", methods: ["GET", "POST"], body: {"description"=>"The percolate request definitions (header & body pair), separated by newlines", "required"=>true, "serialize"=>"bulk"}, url: { path: "/_mpercolate", paths: ["/_mpercolate", "/{index}/_mpercolate", "/{index}/{type}/_mpercolate"], parts: { "index" => {"type"=>"string", "description"=>"The index of the document being count percolated to use as default"}, "type" => {"type"=>"string", "description"=>"The type of the document being percolated to use as default."}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, } } ), "msearch" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-multi-search.html", methods: ["GET", "POST"], body: {"description"=>"The request definitions (metadata-search request definition pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}, url: { path: "/_msearch", paths: ["/_msearch", "/{index}/_msearch", "/{index}/{type}/_msearch"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to use as default"}, "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to use as default"}, }, params: { "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description"=>"Search operation type"}, "max_concurrent_searches" => {"type"=>"number", "description"=>"Controls the maximum number of concurrent searches the multi search api will execute"}, "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "pre_filter_shard_size" => {"type"=>"number", "description"=>"A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.", "default"=>128}, } } ), "msearch_template" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html", methods: ["GET", "POST"], body: {"description"=>"The request definitions (metadata-search request definition pairs), separated by newlines", "required"=>true, "serialize"=>"bulk"}, url: { path: "/_msearch/template", paths: ["/_msearch/template", "/{index}/_msearch/template", "/{index}/{type}/_msearch/template"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to use as default"}, "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to use as default"}, }, params: { "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description"=>"Search operation type"}, "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "max_concurrent_searches" => {"type"=>"number", "description"=>"Controls the maximum number of concurrent searches the multi search api will execute"}, } } ), "mtermvectors" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-multi-termvectors.html", methods: ["GET", "POST"], body: {"description"=>"Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.", "required"=>false}, url: { path: "/_mtermvectors", paths: ["/_mtermvectors", "/{index}/_mtermvectors", "/{index}/{type}/_mtermvectors"], parts: { "index" => {"type"=>"string", "description"=>"The index in which the document resides."}, "type" => {"type"=>"string", "description"=>"The type of the document."}, }, params: { "ids" => {"type"=>"list", "description"=>"A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body", "required"=>false}, "term_statistics" => {"type"=>"boolean", "description"=>"Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>false, "required"=>false}, "field_statistics" => {"type"=>"boolean", "description"=>"Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true, "required"=>false}, "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "required"=>false}, "offsets" => {"type"=>"boolean", "description"=>"Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true, "required"=>false}, "positions" => {"type"=>"boolean", "description"=>"Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true, "required"=>false}, "payloads" => {"type"=>"boolean", "description"=>"Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "default"=>true, "required"=>false}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "required"=>false}, "routing" => {"type"=>"string", "description"=>"Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "required"=>false}, "parent" => {"type"=>"string", "description"=>"Parent id of documents. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".", "required"=>false}, "realtime" => {"type"=>"boolean", "description"=>"Specifies if requests are real-time as opposed to near-real-time (default: true).", "required"=>false}, "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, } } ), "nodes.hot_threads" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-hot-threads.html", methods: ["GET"], body: nil, url: { path: "/_nodes/hot_threads", paths: ["/_cluster/nodes/hotthreads", "/_cluster/nodes/hot_threads", "/_cluster/nodes/{node_id}/hotthreads", "/_cluster/nodes/{node_id}/hot_threads", "/_nodes/hotthreads", "/_nodes/hot_threads", "/_nodes/{node_id}/hotthreads", "/_nodes/{node_id}/hot_threads"], parts: { "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, }, params: { "interval" => {"type"=>"time", "description"=>"The interval for the second sampling of threads"}, "snapshots" => {"type"=>"number", "description"=>"Number of samples of thread stacktrace (default: 10)"}, "threads" => {"type"=>"number", "description"=>"Specify the number of threads to provide information for (default: 3)"}, "ignore_idle_threads" => {"type"=>"boolean", "description"=>"Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)"}, "type" => {"type"=>"enum", "options"=>["cpu", "wait", "block"], "description"=>"The type to sample (default: cpu)"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, } } ), "nodes.info" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-info.html", methods: ["GET"], body: nil, url: { path: "/_nodes", paths: ["/_nodes", "/_nodes/{node_id}", "/_nodes/{metric}", "/_nodes/{node_id}/{metric}"], parts: { "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, "metric" => {"type"=>"list", "options"=>["settings", "os", "process", "jvm", "thread_pool", "transport", "http", "plugins", "ingest"], "description"=>"A comma-separated list of metrics you wish returned. Leave empty to return all."}, }, params: { "flat_settings" => {"type"=>"boolean", "description"=>"Return settings in flat format (default: false)"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, } } ), "nodes.stats" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-stats.html", methods: ["GET"], body: nil, url: { path: "/_nodes/stats", paths: ["/_nodes/stats", "/_nodes/{node_id}/stats", "/_nodes/stats/{metric}", "/_nodes/{node_id}/stats/{metric}", "/_nodes/stats/{metric}/{index_metric}", "/_nodes/{node_id}/stats/{metric}/{index_metric}"], parts: { "metric" => {"type"=>"list", "options"=>["_all", "breaker", "fs", "http", "indices", "jvm", "os", "process", "thread_pool", "transport", "discovery"], "description"=>"Limit the information returned to the specified metrics"}, "index_metric" => {"type"=>"list", "options"=>["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "percolate", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"], "description"=>"Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."}, "node_id" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, }, params: { "completion_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)"}, "fielddata_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` index metric (supports wildcards)"}, "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)"}, "groups" => {"type"=>"boolean", "description"=>"A comma-separated list of search groups for `search` index metric"}, "level" => {"type"=>"enum", "description"=>"Return indices stats aggregated at index, node or shard level", "options"=>["indices", "node", "shards"], "default"=>"node"}, "types" => {"type"=>"list", "description"=>"A comma-separated list of document types for the `indexing` index metric"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "include_segment_file_sizes" => {"type"=>"boolean", "description"=>"Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)", "default"=>false}, } } ), "percolate" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html", methods: ["GET", "POST"], body: {"description"=>"The percolator request definition using the percolate DSL", "required"=>false}, url: { path: "/{index}/{type}/_percolate", paths: ["/{index}/{type}/_percolate", "/{index}/{type}/{id}/_percolate"], parts: { "index" => {"type"=>"string", "required"=>true, "description"=>"The index of the document being percolated."}, "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document being percolated."}, "id" => {"type"=>"string", "required"=>false, "description"=>"Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster."}, }, params: { "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "percolate_index" => {"type"=>"string", "description"=>"The index to percolate the document into. Defaults to index."}, "percolate_type" => {"type"=>"string", "description"=>"The type to percolate document into. Defaults to type."}, "percolate_routing" => {"type"=>"string", "description"=>"The routing value to use when percolating the existing document."}, "percolate_preference" => {"type"=>"string", "description"=>"Which shard to prefer when executing the percolate request."}, "percolate_format" => {"type"=>"enum", "options"=>["ids"], "description"=>"Return an array of matching query IDs instead of objects"}, "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, } } ), "ping" => RestApi.new( documentation: "https://www.elastic.co/guide/", methods: ["HEAD"], body: nil, url: { path: "/", paths: ["/"], } ), "put_script" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html", methods: ["PUT", "POST"], body: {"description"=>"The document", "required"=>true}, url: { path: "/_scripts/{lang}", paths: ["/_scripts/{lang}", "/_scripts/{lang}/{id}"], parts: { "id" => {"type"=>"string", "description"=>"Script ID", "required"=>true}, "lang" => {"type"=>"string", "description"=>"Script language", "required"=>true}, }, params: { "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "master_timeout" => {"type"=>"time", "description"=>"Specify timeout for connection to master"}, } } ), "put_template" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html", methods: ["PUT", "POST"], body: {"description"=>"The document", "required"=>true}, url: { path: "/_search/template/{id}", paths: ["/_search/template/{id}"], parts: { "id" => {"type"=>"string", "description"=>"Template ID", "required"=>true}, }, } ), "reindex" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-reindex.html", methods: ["POST"], body: {"description"=>"The search definition using the Query DSL and the prototype for the index request.", "required"=>true}, url: { path: "/_reindex", paths: ["/_reindex"], params: { "refresh" => {"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, "timeout" => {"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "wait_for_completion" => {"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the reindex is complete."}, "requests_per_second" => {"type"=>"number", "default"=>0, "description"=>"The throttle to set on this request in sub-requests per second. -1 means no throttle."}, "slices" => {"type"=>"number", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."}, } } ), "reindex_rethrottle" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-reindex.html", methods: ["POST"], body: nil, url: { path: "/_reindex/{task_id}/_rethrottle", paths: ["/_reindex/{task_id}/_rethrottle", "/_update_by_query/{task_id}/_rethrottle", "/_delete_by_query/{task_id}/_rethrottle"], parts: { "task_id" => {"type"=>"string", "description"=>"The task id to rethrottle"}, }, params: { "requests_per_second" => {"type"=>"number", "required"=>true, "description"=>"The throttle to set on this request in floating sub-requests per second. -1 means set no throttle."}, } } ), "render_search_template" => RestApi.new( documentation: "http://www.elasticsearch.org/guide/en/elasticsearch/reference/5.x/search-template.html", methods: ["GET", "POST"], body: {"description"=>"The search definition template and its params"}, url: { path: "/_render/template", paths: ["/_render/template", "/_render/template/{id}"], parts: { "id" => {"type"=>"string", "description"=>"The id of the stored search template"}, }, } ), "scroll" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-request-scroll.html", methods: ["GET", "POST"], body: {"description"=>"The scroll ID if not passed by URL or query parameter."}, url: { path: "/_search/scroll", paths: ["/_search/scroll", "/_search/scroll/{scroll_id}"], parts: { "scroll_id" => {"type"=>"string", "description"=>"The scroll ID"}, }, params: { "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "scroll_id" => {"type"=>"string", "description"=>"The scroll ID for scrolled search"}, } } ), "search" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-search.html", methods: ["GET", "POST"], body: {"description"=>"The search definition using the Query DSL"}, url: { path: "/_search", paths: ["/_search", "/{index}/_search", "/{index}/{type}/_search"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}, }, params: { "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "explain" => {"type"=>"boolean", "description"=>"Specify whether to return detailed information about score computation as part of a hit"}, "stored_fields" => {"type"=>"list", "description"=>"A comma-separated list of stored fields to return as part of a hit"}, "docvalue_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return as the docvalue representation of a field for each hit"}, "fielddata_fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return as the docvalue representation of a field for each hit"}, "from" => {"type"=>"number", "description"=>"Starting offset (default: 0)"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, "size" => {"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, "sort" => {"type"=>"list", "description"=>"A comma-separated list of <field>:<direction> pairs"}, "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after" => {"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats" => {"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "suggest_field" => {"type"=>"string", "description"=>"Specify which field to use for suggestions"}, "suggest_mode" => {"type"=>"enum", "options"=>["missing", "popular", "always"], "default"=>"missing", "description"=>"Specify suggest mode"}, "suggest_size" => {"type"=>"number", "description"=>"How many suggestions to return in response"}, "suggest_text" => {"type"=>"string", "description"=>"The source text for which the suggestions should be returned"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "track_scores" => {"type"=>"boolean", "description"=>"Whether to calculate and return scores even if they are not used for sorting"}, "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, "version" => {"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "request_cache" => {"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "batched_reduce_size" => {"type"=>"number", "description"=>"The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.", "default"=>512}, "max_concurrent_shard_requests" => {"type"=>"number", "description"=>"The number of concurrent shard requests this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests", "default"=>"The default grows with the number of nodes in the cluster but is at most 256."}, "pre_filter_shard_size" => {"type"=>"number", "description"=>"A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.", "default"=>128}, } } ), "search_shards" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-shards.html", methods: ["GET", "POST"], body: nil, url: { path: "/{index}/{type}/_search_shards", paths: ["/_search_shards", "/{index}/_search_shards", "/{index}/{type}/_search_shards"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}, }, params: { "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, } } ), "search_template" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html", methods: ["GET", "POST"], body: {"description"=>"The search definition template and its params"}, url: { path: "/_search/template", paths: ["/_search/template", "/{index}/_search/template", "/{index}/{type}/_search/template"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch"], "description"=>"Search operation type"}, "explain" => {"type"=>"boolean", "description"=>"Specify whether to return detailed information about score computation as part of a hit"}, "profile" => {"type"=>"boolean", "description"=>"Specify whether to profile the query execution"}, "typed_keys" => {"type"=>"boolean", "description"=>"Specify whether aggregation and suggester names should be prefixed by their respective types in the response"}, } } ), "snapshot.create" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", methods: ["PUT", "POST"], body: {"description"=>"The snapshot definition", "required"=>false}, url: { path: "/_snapshot/{repository}/{snapshot}", paths: ["/_snapshot/{repository}/{snapshot}"], parts: { "repository" => {"type"=>"string", "required"=>true, "description"=>"A repository name"}, "snapshot" => {"type"=>"string", "required"=>true, "description"=>"A snapshot name"}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "wait_for_completion" => {"type"=>"boolean", "description"=>"Should this request wait until the operation has completed before returning", "default"=>false}, } } ), "snapshot.create_repository" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", methods: ["PUT", "POST"], body: {"description"=>"The repository definition", "required"=>true}, url: { path: "/_snapshot/{repository}", paths: ["/_snapshot/{repository}"], parts: { "repository" => {"type"=>"string", "required"=>true, "description"=>"A repository name"}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "verify" => {"type"=>"boolean", "description"=>"Whether to verify the repository after creation"}, } } ), "snapshot.delete" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", methods: ["DELETE"], body: nil, url: { path: "/_snapshot/{repository}/{snapshot}", paths: ["/_snapshot/{repository}/{snapshot}"], parts: { "repository" => {"type"=>"string", "required"=>true, "description"=>"A repository name"}, "snapshot" => {"type"=>"string", "required"=>true, "description"=>"A snapshot name"}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, } } ), "snapshot.delete_repository" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", methods: ["DELETE"], body: nil, url: { path: "/_snapshot/{repository}", paths: ["/_snapshot/{repository}"], parts: { "repository" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of repository names"}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, } } ), "snapshot.get" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", methods: ["GET"], body: nil, url: { path: "/_snapshot/{repository}/{snapshot}", paths: ["/_snapshot/{repository}/{snapshot}"], parts: { "repository" => {"type"=>"string", "required"=>true, "description"=>"A repository name"}, "snapshot" => {"type"=>"list", "required"=>true, "description"=>"A comma-separated list of snapshot names"}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown"}, "verbose" => {"type"=>"boolean", "description"=>"Whether to show verbose snapshot info or only show the basic info found in the repository index blob"}, } } ), "snapshot.get_repository" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", methods: ["GET"], body: nil, url: { path: "/_snapshot", paths: ["/_snapshot", "/_snapshot/{repository}"], parts: { "repository" => {"type"=>"list", "description"=>"A comma-separated list of repository names"}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "local" => {"type"=>"boolean", "description"=>"Return local information, do not retrieve the state from master node (default: false)"}, } } ), "snapshot.restore" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", methods: ["POST"], body: {"description"=>"Details of what to restore", "required"=>false}, url: { path: "/_snapshot/{repository}/{snapshot}/_restore", paths: ["/_snapshot/{repository}/{snapshot}/_restore"], parts: { "repository" => {"type"=>"string", "required"=>true, "description"=>"A repository name"}, "snapshot" => {"type"=>"string", "required"=>true, "description"=>"A snapshot name"}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "wait_for_completion" => {"type"=>"boolean", "description"=>"Should this request wait until the operation has completed before returning", "default"=>false}, } } ), "snapshot.status" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", methods: ["GET"], body: nil, url: { path: "/_snapshot/_status", paths: ["/_snapshot/_status", "/_snapshot/{repository}/_status", "/_snapshot/{repository}/{snapshot}/_status"], parts: { "repository" => {"type"=>"string", "description"=>"A repository name"}, "snapshot" => {"type"=>"list", "description"=>"A comma-separated list of snapshot names"}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown"}, } } ), "snapshot.verify_repository" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html", methods: ["POST"], body: nil, url: { path: "/_snapshot/{repository}/_verify", paths: ["/_snapshot/{repository}/_verify"], parts: { "repository" => {"type"=>"string", "required"=>true, "description"=>"A repository name"}, }, params: { "master_timeout" => {"type"=>"time", "description"=>"Explicit operation timeout for connection to master node"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, } } ), "suggest" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-suggesters.html", methods: ["POST"], body: {"description"=>"The request definition", "required"=>true}, url: { path: "/_suggest", paths: ["/_suggest", "/{index}/_suggest"], parts: { "index" => {"type"=>"list", "description"=>"A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices"}, }, params: { "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, } } ), "tasks.cancel" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html", methods: ["POST"], body: nil, url: { path: "/_tasks", paths: ["/_tasks/_cancel", "/_tasks/{task_id}/_cancel"], parts: { "task_id" => {"type"=>"string", "description"=>"Cancel the task with specified task id (node_id:task_number)"}, }, params: { "nodes" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, "actions" => {"type"=>"list", "description"=>"A comma-separated list of actions that should be cancelled. Leave empty to cancel all."}, "parent_node" => {"type"=>"string", "description"=>"Cancel tasks with specified parent node."}, "parent_task_id" => {"type"=>"string", "description"=>"Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all."}, } } ), "tasks.get" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html", methods: ["GET"], body: nil, url: { path: "/_tasks/{task_id}", paths: ["/_tasks/{task_id}"], parts: { "task_id" => {"type"=>"string", "description"=>"Return the task with specified id (node_id:task_number)"}, }, params: { "wait_for_completion" => {"type"=>"boolean", "description"=>"Wait for the matching tasks to complete (default: false)"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, } } ), "tasks.list" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html", methods: ["GET"], body: nil, url: { path: "/_tasks", paths: ["/_tasks"], params: { "nodes" => {"type"=>"list", "description"=>"A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"}, "actions" => {"type"=>"list", "description"=>"A comma-separated list of actions that should be returned. Leave empty to return all."}, "detailed" => {"type"=>"boolean", "description"=>"Return detailed task information (default: false)"}, "parent_node" => {"type"=>"string", "description"=>"Return tasks with specified parent node."}, "parent_task_id" => {"type"=>"string", "description"=>"Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all."}, "wait_for_completion" => {"type"=>"boolean", "description"=>"Wait for the matching tasks to complete (default: false)"}, "group_by" => {"type"=>"enum", "description"=>"Group tasks by nodes or parent/child relationships", "options"=>["nodes", "parents"], "default"=>"nodes"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, } } ), "termvectors" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-termvectors.html", methods: ["GET", "POST"], body: {"description"=>"Define parameters and or supply a document to get termvectors for. See documentation.", "required"=>false}, url: { path: "/{index}/{type}/_termvectors", paths: ["/{index}/{type}/_termvectors", "/{index}/{type}/{id}/_termvectors"], parts: { "index" => {"type"=>"string", "description"=>"The index in which the document resides.", "required"=>true}, "type" => {"type"=>"string", "description"=>"The type of the document.", "required"=>true}, "id" => {"type"=>"string", "description"=>"The id of the document, when not specified a doc param should be supplied."}, }, params: { "term_statistics" => {"type"=>"boolean", "description"=>"Specifies if total term frequency and document frequency should be returned.", "default"=>false, "required"=>false}, "field_statistics" => {"type"=>"boolean", "description"=>"Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.", "default"=>true, "required"=>false}, "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return.", "required"=>false}, "offsets" => {"type"=>"boolean", "description"=>"Specifies if term offsets should be returned.", "default"=>true, "required"=>false}, "positions" => {"type"=>"boolean", "description"=>"Specifies if term positions should be returned.", "default"=>true, "required"=>false}, "payloads" => {"type"=>"boolean", "description"=>"Specifies if term payloads should be returned.", "default"=>true, "required"=>false}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random).", "required"=>false}, "routing" => {"type"=>"string", "description"=>"Specific routing value.", "required"=>false}, "parent" => {"type"=>"string", "description"=>"Parent id of documents.", "required"=>false}, "realtime" => {"type"=>"boolean", "description"=>"Specifies if request is real-time as opposed to near-real-time (default: true).", "required"=>false}, "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type" => {"type"=>"enum", "options"=>["internal", "external", "external_gte", "force"], "description"=>"Specific version type"}, } } ), "update" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-update.html", methods: ["POST"], body: {"description"=>"The request definition using either `script` or partial `doc`"}, url: { path: "/{index}/{type}/{id}/_update", paths: ["/{index}/{type}/{id}/_update"], parts: { "id" => {"type"=>"string", "required"=>true, "description"=>"Document ID"}, "index" => {"type"=>"string", "required"=>true, "description"=>"The name of the index"}, "type" => {"type"=>"string", "required"=>true, "description"=>"The type of the document"}, }, params: { "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "fields" => {"type"=>"list", "description"=>"A comma-separated list of fields to return in the response"}, "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "lang" => {"type"=>"string", "description"=>"The script language (default: painless)"}, "parent" => {"type"=>"string", "description"=>"ID of the parent document. Is is only used for routing and when for the upsert request"}, "refresh" => {"type"=>"enum", "options"=>["true", "false", "wait_for"], "description"=>"If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."}, "retry_on_conflict" => {"type"=>"number", "description"=>"Specify how many times should the operation be retried when a conflict occurs (default: 0)"}, "routing" => {"type"=>"string", "description"=>"Specific routing value"}, "timeout" => {"type"=>"time", "description"=>"Explicit operation timeout"}, "timestamp" => {"type"=>"time", "description"=>"Explicit timestamp for the document"}, "ttl" => {"type"=>"time", "description"=>"Expiration time for the document"}, "version" => {"type"=>"number", "description"=>"Explicit version number for concurrency control"}, "version_type" => {"type"=>"enum", "options"=>["internal", "force"], "description"=>"Specific version type"}, } } ), "update_by_query" => RestApi.new( documentation: "https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-update-by-query.html", methods: ["POST"], body: {"description"=>"The search definition using the Query DSL"}, url: { path: "/{index}/_update_by_query", paths: ["/{index}/_update_by_query", "/{index}/{type}/_update_by_query"], parts: { "index" => {"required"=>true, "type"=>"list", "description"=>"A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"}, "type" => {"type"=>"list", "description"=>"A comma-separated list of document types to search; leave empty to perform the operation on all types"}, }, params: { "analyzer" => {"type"=>"string", "description"=>"The analyzer to use for the query string"}, "analyze_wildcard" => {"type"=>"boolean", "description"=>"Specify whether wildcard and prefix queries should be analyzed (default: false)"}, "default_operator" => {"type"=>"enum", "options"=>["AND", "OR"], "default"=>"OR", "description"=>"The default operator for query string query (AND or OR)"}, "df" => {"type"=>"string", "description"=>"The field to use as default where no field prefix is given in the query string"}, "from" => {"type"=>"number", "description"=>"Starting offset (default: 0)"}, "ignore_unavailable" => {"type"=>"boolean", "description"=>"Whether specified concrete indices should be ignored when unavailable (missing or closed)"}, "allow_no_indices" => {"type"=>"boolean", "description"=>"Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"}, "conflicts" => {"note"=>"This is not copied from search", "type"=>"enum", "options"=>["abort", "proceed"], "default"=>"abort", "description"=>"What to do when the update by query hits version conflicts?"}, "expand_wildcards" => {"type"=>"enum", "options"=>["open", "closed", "none", "all"], "default"=>"open", "description"=>"Whether to expand wildcard expression to concrete indices that are open, closed or both."}, "lenient" => {"type"=>"boolean", "description"=>"Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"}, "pipeline" => {"type"=>"string", "description"=>"Ingest pipeline to set on index requests made by this action. (default: none)"}, "preference" => {"type"=>"string", "description"=>"Specify the node or shard the operation should be performed on (default: random)"}, "q" => {"type"=>"string", "description"=>"Query in the Lucene query string syntax"}, "routing" => {"type"=>"list", "description"=>"A comma-separated list of specific routing values"}, "scroll" => {"type"=>"time", "description"=>"Specify how long a consistent view of the index should be maintained for scrolled search"}, "search_type" => {"type"=>"enum", "options"=>["query_then_fetch", "dfs_query_then_fetch"], "description"=>"Search operation type"}, "search_timeout" => {"type"=>"time", "description"=>"Explicit timeout for each search request. Defaults to no timeout."}, "size" => {"type"=>"number", "description"=>"Number of hits to return (default: 10)"}, "sort" => {"type"=>"list", "description"=>"A comma-separated list of <field>:<direction> pairs"}, "_source" => {"type"=>"list", "description"=>"True or false to return the _source field or not, or a list of fields to return"}, "_source_exclude" => {"type"=>"list", "description"=>"A list of fields to exclude from the returned _source field"}, "_source_include" => {"type"=>"list", "description"=>"A list of fields to extract and return from the _source field"}, "terminate_after" => {"type"=>"number", "description"=>"The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early."}, "stats" => {"type"=>"list", "description"=>"Specific 'tag' of the request for logging and statistical purposes"}, "version" => {"type"=>"boolean", "description"=>"Specify whether to return document version as part of a hit"}, "version_type" => {"type"=>"boolean", "description"=>"Should the document increment the version number (internal) on hit or not (reindex)"}, "request_cache" => {"type"=>"boolean", "description"=>"Specify if request cache should be used for this request or not, defaults to index level setting"}, "refresh" => {"type"=>"boolean", "description"=>"Should the effected indexes be refreshed?"}, "timeout" => {"type"=>"time", "default"=>"1m", "description"=>"Time each individual bulk request should wait for shards that are unavailable."}, "wait_for_active_shards" => {"type"=>"string", "description"=>"Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)"}, "scroll_size" => {"type"=>"number", "defaut_value"=>100, "description"=>"Size on the scroll request powering the update_by_query"}, "wait_for_completion" => {"type"=>"boolean", "default"=>true, "description"=>"Should the request should block until the update by query operation is complete."}, "requests_per_second" => {"type"=>"number", "default"=>0, "description"=>"The throttle to set on this request in sub-requests per second. -1 means no throttle."}, "slices" => {"type"=>"number", "default"=>1, "description"=>"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."}, } } ), } @common_params = { "pretty" => {"type"=>"boolean", "description"=>"Pretty format the returned JSON response.", "default"=>false}, "human" => {"type"=>"boolean", "description"=>"Return human readable values for statistics.", "default"=>true}, "error_trace" => {"type"=>"boolean", "description"=>"Include the stack trace of returned errors.", "default"=>false}, "source" => {"type"=>"string", "description"=>"The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests."}, "filter_path" => {"type"=>"list", "description"=>"A comma-separated list of filters used to reduce the respone."}, } super end |