Purge Remote Media¶
Endpoints¶
PurgeRemoteMedia¶
The purge remote media API allows server admins to purge old cached remote media.
Source code in matrix_admin_sdk/endpoints/v1/purge_remote_media.py
class PurgeRemoteMedia(Endpoint):
"""
The purge remote media API allows server admins to purge old cached remote media.
"""
async def purge_remove_media(self, unix_timestamp_in_ms: int) -> Dict[Any, Any]:
"""
The purge remote media API allows server admins to purge old cached
remote media.
Args:
unix_timestamp_in_ms: Unix timestamp in milliseconds. All cached media that was
last accessed before this timestamp will be removed.
Returns:{"deleted": 10}
"""
url = self.url(f"purge_media_cache?before_ts={unix_timestamp_in_ms}")
result = await self.request(RequestMethods.POST, url)
return result
purge_remove_media(self, unix_timestamp_in_ms)
async
¶
The purge remote media API allows server admins to purge old cached remote media.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unix_timestamp_in_ms |
int |
Unix timestamp in milliseconds. All cached media that was last accessed before this timestamp will be removed. |
required |
Source code in matrix_admin_sdk/endpoints/v1/purge_remote_media.py
async def purge_remove_media(self, unix_timestamp_in_ms: int) -> Dict[Any, Any]:
"""
The purge remote media API allows server admins to purge old cached
remote media.
Args:
unix_timestamp_in_ms: Unix timestamp in milliseconds. All cached media that was
last accessed before this timestamp will be removed.
Returns:{"deleted": 10}
"""
url = self.url(f"purge_media_cache?before_ts={unix_timestamp_in_ms}")
result = await self.request(RequestMethods.POST, url)
return result