Purge API - how to delete messages and media content?
See original GitHub issueHi guys,
I am struggling with API. Want to make a cron task that will clean up a specific room (delete ALL messages) say every 24h. I am using the following command:
curl --header "Authorization: Bearer [my token]" -XPOST -H "Content-Type: application/json" -d '{ "purge_up_to_ts": 36000 }' "http://localhost:8003/_synapse/admin/v1/purge_history/[room_id]"
I get the following response - {“errcode”:“M_NOT_FOUND”,“error”:“there is no event to be purged”}
Similar issue happens with media folder. I use the following command:
curl --header "Authorization: Bearer [my token]" -XPOST "http://localhost:8003/_synapse/admin/v1/media/[server_name]/delete?before_ts=36000"
and I get “{“deleted_media”:[],“total”:0}”
Any advice on how to fix it would be highly appreciated.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
I’m going to close this as it doesn’t seem to be a bug in synapse.
This is a curl problem. But without full command line there is no chance for help. Also the is a help romm in matrix: #synapse:matrix.org