summary refs log tree commit diff
path: root/develop/usage
diff options
context:
space:
mode:
authorclokep <clokep@users.noreply.github.com>2021-11-19 19:40:11 +0000
committerclokep <clokep@users.noreply.github.com>2021-11-19 19:40:11 +0000
commit99c7645a6859f605e49a63293718fc1391bc2f43 (patch)
tree3ecc784f1bae1ad437b697b572796d6f1ccd17ff /develop/usage
parentdeploy: 81b18fe5c060a0532ab64b9575d54b84ddbad278 (diff)
downloadsynapse-99c7645a6859f605e49a63293718fc1391bc2f43.tar.xz
deploy: ea20937084903864865f76e22f67d27729f2d6dc
Diffstat (limited to 'develop/usage')
-rw-r--r--develop/usage/administration/admin_api/background_updates.html19
-rw-r--r--develop/usage/configuration/homeserver_sample_config.html4
2 files changed, 21 insertions, 2 deletions
diff --git a/develop/usage/administration/admin_api/background_updates.html b/develop/usage/administration/admin_api/background_updates.html
index afcc6f1b9c..be08324c24 100644
--- a/develop/usage/administration/admin_api/background_updates.html
+++ b/develop/usage/administration/admin_api/background_updates.html
@@ -233,6 +233,25 @@ background updates which won't be cancelled once started.</p>
 }
 </code></pre>
 <p>There is also a <code>GET</code> version which returns the <code>enabled</code> state.</p>
+<h2 id="run"><a class="header" href="#run">Run</a></h2>
+<p>This API schedules a specific background update to run. The job starts immediately after calling the API.</p>
+<p>The API is:</p>
+<pre><code>POST /_synapse/admin/v1/background_updates/start_job
+</code></pre>
+<p>with the following body:</p>
+<pre><code class="language-json">{
+    &quot;job_name&quot;: &quot;populate_stats_process_rooms&quot;
+}
+</code></pre>
+<p>The following JSON body parameters are available:</p>
+<ul>
+<li><code>job_name</code> - A string which job to run. Valid values are:
+<ul>
+<li><code>populate_stats_process_rooms</code> - Recalculate the stats for all rooms.</li>
+<li><code>regenerate_directory</code> - Recalculate the <a href="../../../user_directory.html">user directory</a> if it is stale or out of sync.</li>
+</ul>
+</li>
+</ul>
 
                     </main>
 
diff --git a/develop/usage/configuration/homeserver_sample_config.html b/develop/usage/configuration/homeserver_sample_config.html
index ad77600e0d..8446e272a1 100644
--- a/develop/usage/configuration/homeserver_sample_config.html
+++ b/develop/usage/configuration/homeserver_sample_config.html
@@ -2552,8 +2552,8 @@ user_directory:
     # indexes were (re)built was before Synapse 1.44, you'll have to
     # rebuild the indexes in order to search through all known users.
     # These indexes are built the first time Synapse starts; admins can
-    # manually trigger a rebuild following the instructions at
-    #     https://matrix-org.github.io/synapse/latest/user_directory.html
+    # manually trigger a rebuild via API following the instructions at
+    #     https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/background_updates.html#run
     #
     # Uncomment to return search results containing all known users, even if that
     # user does not share a room with the requester.