-
Dirk Klimpel authoredDirk Klimpel authored
media_admin_api.md 6.78 KiB
Querying media
These APIs allow extracting media information from the homeserver.
Details about the format of the media_id
and storage of the media in the file system
are documented under media repository.
To use it, you will need to authenticate by providing an access_token
for a server admin: see Admin API.
List all media in a room
This API gets a list of known media in a room. However, it only shows media from unencrypted events or rooms.
The API is:
GET /_synapse/admin/v1/room/<room_id>/media
The API returns a JSON body like the following:
{
"local": [
"mxc://localhost/xwvutsrqponmlkjihgfedcba",
"mxc://localhost/abcdefghijklmnopqrstuvwx"
],
"remote": [
"mxc://matrix.org/xwvutsrqponmlkjihgfedcba",
"mxc://matrix.org/abcdefghijklmnopqrstuvwx"
]
}