start.asciidoc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[ilm-start]]
  4. === Start {ilm} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Start {ilm}</titleabbrev>
  8. ++++
  9. Start the {ilm} ({ilm-init}) plugin.
  10. [[ilm-start-request]]
  11. ==== {api-request-title}
  12. `POST /_ilm/start`
  13. [[ilm-start-prereqs]]
  14. ==== {api-prereq-title}
  15. * If the {es} {security-features} are enabled, you must have the `manage_ilm`
  16. cluster privilege to use this API. For more information, see
  17. <<security-privileges>>.
  18. [[ilm-start-desc]]
  19. ==== {api-description-title}
  20. Starts the {ilm-init} plugin if it is currently stopped. {ilm-init} is started
  21. automatically when the cluster is formed. Restarting {ilm-init} is only
  22. necessary if it has been stopped using the <<ilm-stop, Stop {ilm-init} API>>.
  23. [[ilm-start-query-params]]
  24. ==== {api-query-parms-title}
  25. include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
  26. [[ilm-start-example]]
  27. ==== {api-examples-title}
  28. The following example starts the ILM plugin.
  29. //////////////////////////
  30. [source,console]
  31. --------------------------------------------------
  32. PUT _ilm/policy/my_policy
  33. {
  34. "policy": {
  35. "phases": {
  36. "warm": {
  37. "min_age": "10d",
  38. "actions": {
  39. "forcemerge": {
  40. "max_num_segments": 1
  41. }
  42. }
  43. },
  44. "delete": {
  45. "min_age": "30d",
  46. "actions": {
  47. "delete": {}
  48. }
  49. }
  50. }
  51. }
  52. }
  53. PUT my_index
  54. POST _ilm/stop
  55. --------------------------------------------------
  56. //////////////////////////
  57. [source,console]
  58. --------------------------------------------------
  59. POST _ilm/start
  60. --------------------------------------------------
  61. // TEST[continued]
  62. If the request succeeds, you receive the following result:
  63. [source,console-result]
  64. --------------------------------------------------
  65. {
  66. "acknowledged": true
  67. }
  68. --------------------------------------------------