delete-expired-data.asciidoc 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. ==== Request
  10. `DELETE _xpack/ml/_delete_expired_data`
  11. ==== Description
  12. Deletes all job results, model snapshots and forecast data that have exceeded their
  13. `retention days` period.
  14. Machine Learning state documents that are not associated with any job are also deleted.
  15. ==== Authorization
  16. You must have `manage_ml`, or `manage` cluster privileges to use this API.
  17. For more information, see
  18. {stack-ov}/security-privileges.html[Security Privileges] and
  19. {stack-ov}/built-in-roles.html[Built-in Roles].
  20. ==== Examples
  21. The endpoint takes no arguments:
  22. [source,js]
  23. --------------------------------------------------
  24. DELETE _xpack/ml/_delete_expired_data
  25. --------------------------------------------------
  26. // CONSOLE
  27. // TEST
  28. When the expired data is deleted, you receive the following response:
  29. [source,js]
  30. ----
  31. {
  32. "deleted": true
  33. }
  34. ----
  35. // TESTRESPONSE