summary refs log tree commit diff
path: root/latest/admin_api
diff options
context:
space:
mode:
Diffstat (limited to 'latest/admin_api')
-rw-r--r--latest/admin_api/register_api.html15
-rw-r--r--latest/admin_api/rooms.html6
-rw-r--r--latest/admin_api/user_admin_api.html10
3 files changed, 29 insertions, 2 deletions
diff --git a/latest/admin_api/register_api.html b/latest/admin_api/register_api.html

index 15a90bef7c..fe939cd554 100644 --- a/latest/admin_api/register_api.html +++ b/latest/admin_api/register_api.html
@@ -184,7 +184,20 @@ set the displayname (optional, <code>username</code> by default).</p> <p>The MAC is the hex digest output of the HMAC-SHA1 algorithm, with the key being the shared secret and the content being the nonce, user, password, either the string &quot;admin&quot; or &quot;notadmin&quot;, and optionally the user_type -each separated by NULs. For an example of generation in Python:</p> +each separated by NULs.</p> +<p>Here is an easy way to generate the HMAC digest if you have Bash and OpenSSL:</p> +<pre><code class="language-bash"># Update these values and then paste this code block into a bash terminal +nonce='thisisanonce' +username='pepper_roni' +password='pizza' +admin='admin' +secret='shared_secret' + +printf '%s\0%s\0%s\0%s' &quot;$nonce&quot; &quot;$username&quot; &quot;$password&quot; &quot;$admin&quot; | + openssl sha1 -hmac &quot;$secret&quot; | + awk '{print $2}' +</code></pre> +<p>For an example of generation in Python:</p> <pre><code class="language-python">import hmac, hashlib def generate_mac(nonce, user, password, admin=False, user_type=None): diff --git a/latest/admin_api/rooms.html b/latest/admin_api/rooms.html
index 63a6cbb491..347dc8eac5 100644 --- a/latest/admin_api/rooms.html +++ b/latest/admin_api/rooms.html
@@ -436,6 +436,8 @@ end of the list.</p> <li><code>state_events</code> - Total number of state_events of a room. Complexity of the room.</li> <li><code>room_type</code> - The type of the room taken from the room's creation event; for example &quot;m.space&quot; if the room is a space. If the room does not define a type, the value will be <code>null</code>.</li> +<li><code>forgotten</code> - Whether all local users have +<a href="https://spec.matrix.org/latest/client-server-api/#leaving-rooms">forgotten</a> the room.</li> </ul> <p>The API is:</p> <pre><code>GET /_synapse/admin/v1/rooms/&lt;room_id&gt; @@ -459,9 +461,11 @@ If the room does not define a type, the value will be <code>null</code>.</li> &quot;guest_access&quot;: null, &quot;history_visibility&quot;: &quot;shared&quot;, &quot;state_events&quot;: 93534, - &quot;room_type&quot;: &quot;m.space&quot; + &quot;room_type&quot;: &quot;m.space&quot;, + &quot;forgotten&quot;: false } </code></pre> +<p><em>Changed in Synapse 1.66:</em> Added the <code>forgotten</code> key to the response body.</p> <h1 id="room-members-api"><a class="header" href="#room-members-api">Room Members API</a></h1> <p>The Room Members admin API allows server admins to get a list of all members of a room.</p> <p>The response includes the following fields:</p> diff --git a/latest/admin_api/user_admin_api.html b/latest/admin_api/user_admin_api.html
index e45ffaed23..9d1fb25231 100644 --- a/latest/admin_api/user_admin_api.html +++ b/latest/admin_api/user_admin_api.html
@@ -799,6 +799,7 @@ same.</p> &quot;device_id&quot;: &quot;QBUAZIFURK&quot;, &quot;display_name&quot;: &quot;android&quot;, &quot;last_seen_ip&quot;: &quot;1.2.3.4&quot;, + &quot;last_seen_user_agent&quot;: &quot;Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0&quot;, &quot;last_seen_ts&quot;: 1474491775024, &quot;user_id&quot;: &quot;&lt;user_id&gt;&quot; }, @@ -806,6 +807,7 @@ same.</p> &quot;device_id&quot;: &quot;AUIECTSRND&quot;, &quot;display_name&quot;: &quot;ios&quot;, &quot;last_seen_ip&quot;: &quot;1.2.3.5&quot;, + &quot;last_seen_user_agent&quot;: &quot;Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0&quot;, &quot;last_seen_ts&quot;: 1474491775025, &quot;user_id&quot;: &quot;&lt;user_id&gt;&quot; } @@ -830,6 +832,8 @@ Device objects contain the following fields:</p> Absent if no name has been set.</li> <li><code>last_seen_ip</code> - The IP address where this device was last seen. (May be a few minutes out of date, for efficiency reasons).</li> +<li><code>last_seen_user_agent</code> - The user agent of the device when it was last seen. +(May be a few minutes out of date, for efficiency reasons).</li> <li><code>last_seen_ts</code> - The timestamp (in milliseconds since the unix epoch) when this devices was last seen. (May be a few minutes out of date, for efficiency reasons).</li> <li><code>user_id</code> - Owner of device.</li> @@ -872,6 +876,7 @@ any access token associated with them.</p> &quot;device_id&quot;: &quot;&lt;device_id&gt;&quot;, &quot;display_name&quot;: &quot;android&quot;, &quot;last_seen_ip&quot;: &quot;1.2.3.4&quot;, + &quot;last_seen_user_agent&quot;: &quot;Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0&quot;, &quot;last_seen_ts&quot;: 1474491775024, &quot;user_id&quot;: &quot;&lt;user_id&gt;&quot; } @@ -889,7 +894,12 @@ any access token associated with them.</p> <li><code>display_name</code> - Display name set by the user for this device. Absent if no name has been set.</li> <li><code>last_seen_ip</code> - The IP address where this device was last seen. +(May be a few minutes out of date, for efficiency reasons). +<ul> +<li><code>last_seen_user_agent</code> - The user agent of the device when it was last seen. (May be a few minutes out of date, for efficiency reasons).</li> +</ul> +</li> <li><code>last_seen_ts</code> - The timestamp (in milliseconds since the unix epoch) when this devices was last seen. (May be a few minutes out of date, for efficiency reasons).</li> <li><code>user_id</code> - Owner of device.</li>