delete-expired-data.asciidoc 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-delete-expired-data]]
  4. === Delete expired data API
  5. ++++
  6. <titleabbrev>Delete expired data</titleabbrev>
  7. ++++
  8. Deletes expired and unused machine learning data.
  9. [[ml-delete-expired-data-request]]
  10. ==== {api-request-title}
  11. `DELETE _ml/_delete_expired_data`
  12. [[ml-delete-expired-data-prereqs]]
  13. ==== {api-prereq-title}
  14. * If the {es} {security-features} are enabled, you must have `manage_ml` or
  15. `manage` cluster privileges to use this API. See
  16. <<security-privileges>>.
  17. [[ml-delete-expired-data-desc]]
  18. ==== {api-description-title}
  19. Deletes all job results, model snapshots and forecast data that have exceeded
  20. their `retention days` period. Machine learning state documents that are not
  21. associated with any job are also deleted.
  22. [[ml-delete-expired-data-request-body]]
  23. ==== {api-request-body-title}
  24. `requests_per_second`::
  25. (Optional, float) The desired requests per second for the deletion processes.
  26. The default behavior is no throttling.
  27. `timeout`::
  28. (Optional, string) How long can the underlying delete processes run until they are canceled.
  29. The default value is `8h` (8 hours).
  30. [[ml-delete-expired-data-example]]
  31. ==== {api-examples-title}
  32. The endpoint takes no arguments:
  33. [source,console]
  34. --------------------------------------------------
  35. DELETE _ml/_delete_expired_data
  36. --------------------------------------------------
  37. // TEST
  38. When the expired data is deleted, you receive the following response:
  39. [source,console-result]
  40. ----
  41. {
  42. "deleted": true
  43. }
  44. ----