Skip to content
Snippets Groups Projects
Commit 5cb06129 authored by mattc's avatar mattc
Browse files

Document - Add entry briefly describing admin users' usage statistics endpoint.

parent b57f092d
No related branches found
No related tags found
No related merge requests found
...@@ -230,6 +230,38 @@ The response is how much data the server is using: ...@@ -230,6 +230,38 @@ The response is how much data the server is using:
Use the same endpoint as above, but specifying one or more `?user_id=@alice:example.org` query parameters. Note that encoding the values may be required (not shown here). Users that are unknown to the media repo will not be returned. Use the same endpoint as above, but specifying one or more `?user_id=@alice:example.org` query parameters. Note that encoding the values may be required (not shown here). Users that are unknown to the media repo will not be returned.
#### All known users' usage statistics
Similar to [Per-user usage (all known users)](#per-user-usage-all-known-users), but with a focus on statistics, and with
parameterized querying ability.
This end-point attempts to be a loose equivalent to
[this](https://matrix-org.github.io/synapse/develop/admin_api/statistics.html#users-media-usage-statistics) Synapse
endpoint, with the main difference being the absence of "displayname".
URL: `GET /_matrix/media/unstable/admin/usage/<server name>/users-stats?access_token=your_access_token`
Example response:
```json
{
"next_token" : 100,
"total" : 105,
"users" : [
{
"media_count" : 12,
"media_length" : 39546,
"user_id" : "@alice:example.com"
},
{
"media_count" : 46,
"media_length" : 5935234,
"user_id" : "@bob:example.com"
},
...
]
}
```
#### Per-upload usage (all uploads) #### Per-upload usage (all uploads)
URL: `GET /_matrix/media/unstable/admin/usage/<server name>/uploads?access_token=your_access_token` URL: `GET /_matrix/media/unstable/admin/usage/<server name>/uploads?access_token=your_access_token`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment