purge_history_api.rst 866 B

123456789101112131415161718192021222324252627
  1. Purge History API
  2. =================
  3. The purge history API allows server admins to purge historic events from their
  4. database, reclaiming disk space.
  5. Depending on the amount of history being purged a call to the API may take
  6. several minutes or longer. During this period users will not be able to
  7. paginate further back in the room from the point being purged from.
  8. The API is simply:
  9. ``POST /_matrix/client/r0/admin/purge_history/<room_id>/<event_id>``
  10. including an ``access_token`` of a server admin.
  11. By default, events sent by local users are not deleted, as they may represent
  12. the only copies of this content in existence. (Events sent by remote users are
  13. deleted, and room state data before the cutoff is always removed).
  14. To delete local events as well, set ``delete_local_events`` in the body:
  15. .. code:: json
  16. {
  17. "delete_local_events": true
  18. }