From e6c5b3479ac2933d59e6e6f440ec86002e410907 Mon Sep 17 00:00:00 2001 From: erikjohnston Date: Wed, 26 Apr 2023 16:02:42 +0000 Subject: deploy: 9900f7c231f8af536fce229117b0a406dc629293 --- develop/print.html | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'develop/print.html') diff --git a/develop/print.html b/develop/print.html index ceb5af3661..395a37210c 100644 --- a/develop/print.html +++ b/develop/print.html @@ -13296,6 +13296,40 @@ about the user and their local media. Objects contain the following fields:
  • next_token - integer - Opaque value used for pagination. See above.
  • total - integer - Total number of users after filtering.
  • +

    Get largest rooms by size in database

    +

    Returns the 10 largest rooms and an estimate of how much space in the database +they are taking.

    +

    This does not include the size of any associated media associated with the room.

    +

    Returns an error on SQLite.

    +

    Note: This uses the planner statistics from PostgreSQL to do the estimates, +which means that the returned information can vary widely from reality. However, +it should be enough to get a rough idea of where database disk space is going.

    +

    The API is:

    +
    GET /_synapse/admin/v1/statistics/statistics/database/rooms
    +
    +

    A response body like the following is returned:

    +
    {
    +  "rooms": [
    +    {
    +      "room_id": "!OGEhHVWSdvArJzumhm:matrix.org",
    +      "estimated_size": 47325417353
    +    }
    +  ],
    +}
    +
    +

    Response

    +

    The following fields are returned in the JSON response body:

    + +

    Added in Synapse 1.83.0

    User Admin API

    To use it, you will need to authenticate by providing an access_token for a server admin: see Admin API.

    -- cgit 1.5.1