diff options
author | erikjohnston <erikjohnston@users.noreply.github.com> | 2023-04-26 16:02:42 +0000 |
---|---|---|
committer | erikjohnston <erikjohnston@users.noreply.github.com> | 2023-04-26 16:02:42 +0000 |
commit | e6c5b3479ac2933d59e6e6f440ec86002e410907 (patch) | |
tree | 7540686c6462cbd9a6d74bbddd3b99204a8408b7 /develop/print.html | |
parent | deploy: c34791ef5b612d36c52216a4d9c84ee56ac00c28 (diff) | |
download | synapse-e6c5b3479ac2933d59e6e6f440ec86002e410907.tar.xz |
deploy: 9900f7c231f8af536fce229117b0a406dc629293
Diffstat (limited to 'develop/print.html')
-rw-r--r-- | develop/print.html | 34 |
1 files changed, 34 insertions, 0 deletions
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: <li><code>next_token</code> - integer - Opaque value used for pagination. See above.</li> <li><code>total</code> - integer - Total number of users after filtering.</li> </ul> +<h1 id="get-largest-rooms-by-size-in-database"><a class="header" href="#get-largest-rooms-by-size-in-database">Get largest rooms by size in database</a></h1> +<p>Returns the 10 largest rooms and an estimate of how much space in the database +they are taking.</p> +<p>This does not include the size of any associated media associated with the room.</p> +<p>Returns an error on SQLite.</p> +<p><em>Note:</em> 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.</p> +<p>The API is:</p> +<pre><code>GET /_synapse/admin/v1/statistics/statistics/database/rooms +</code></pre> +<p>A response body like the following is returned:</p> +<pre><code class="language-json">{ + "rooms": [ + { + "room_id": "!OGEhHVWSdvArJzumhm:matrix.org", + "estimated_size": 47325417353 + } + ], +} +</code></pre> +<p><strong>Response</strong></p> +<p>The following fields are returned in the JSON response body:</p> +<ul> +<li><code>rooms</code> - An array of objects, sorted by largest room first. Objects contain +the following fields: +<ul> +<li><code>room_id</code> - string - The room ID.</li> +<li><code>estimated_size</code> - integer - Estimated disk space used in bytes by the room +in the database.</li> +</ul> +</li> +</ul> +<p><em>Added in Synapse 1.83.0</em></p> <div style="break-before: page; page-break-before: always;"></div><h1 id="user-admin-api"><a class="header" href="#user-admin-api">User Admin API</a></h1> <p>To use it, you will need to authenticate by providing an <code>access_token</code> for a server admin: see <a href="admin_api/../usage/administration/admin_api/">Admin API</a>.</p> |