@@ -4,7 +4,7 @@ All the API calls here require your user ID to be listed in the configuration as
...
@@ -4,7 +4,7 @@ All the API calls here require your user ID to be listed in the configuration as
## Remote media purge
## Remote media purge
URL: `POST /_matrix/media/r0/admin/purge_remote?before_ts=1234567890&access_token=your_access_token` (`before_ts` is in milliseconds)
URL: `POST /_matrix/media/unstable/admin/purge_remote?before_ts=1234567890&access_token=your_access_token` (`before_ts` is in milliseconds)
This will delete remote media from the file store that was downloaded before the timestamp specified. If the file is referenced by newer remote media or local files to any of the configured homeservers, it will not be deleted. Be aware that removing a homeserver from the config will cause it to be considered a remote server, and therefore the media may be deleted.
This will delete remote media from the file store that was downloaded before the timestamp specified. If the file is referenced by newer remote media or local files to any of the configured homeservers, it will not be deleted. Be aware that removing a homeserver from the config will cause it to be considered a remote server, and therefore the media may be deleted.
...
@@ -12,7 +12,7 @@ Any remote media that is deleted and requested by a user will be downloaded agai
...
@@ -12,7 +12,7 @@ Any remote media that is deleted and requested by a user will be downloaded agai
The `<server>` and `<media id>` can be retrieved from an MXC URI (`mxc://<server>/<media id>`).
The `<server>` and `<media id>` can be retrieved from an MXC URI (`mxc://<server>/<media id>`).
...
@@ -23,3 +23,63 @@ Remote media that has been quarantined will not be purged either. This is so tha
...
@@ -23,3 +23,63 @@ Remote media that has been quarantined will not be purged either. This is so tha
Quarantining media will also quarantine any media with the same file hash.
Quarantining media will also quarantine any media with the same file hash.
This API is unique in that it can allow administrators of configured homeservers to quarantine media on their homeserver only. This will not allow local administrators to quarantine remote media or media on other homeservers though, just on theirs.
This API is unique in that it can allow administrators of configured homeservers to quarantine media on their homeserver only. This will not allow local administrators to quarantine remote media or media on other homeservers though, just on theirs.
## Datastore management
Datastores are used by the media repository to put files. Typically these match what is configured in the config file, such as s3 and directories.