deploy: 0da2301b21
This commit is contained in:
@@ -183,13 +183,13 @@
|
||||
</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="../usage/administration/admin_api">Admin API</a>.</p>
|
||||
<h2 id="query-user-account"><a class="header" href="#query-user-account">Query User Account</a></h2>
|
||||
<p>This API returns information about a specific user account.</p>
|
||||
<p>The api is:</p>
|
||||
<pre><code>GET /_synapse/admin/v2/users/<user_id>
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>It returns a JSON body like the following:</p>
|
||||
<pre><code class="language-jsonc">{
|
||||
"name": "@user:example.com",
|
||||
@@ -270,8 +270,6 @@ specific <code>user_id</code>.</p>
|
||||
"user_type": null
|
||||
}
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>Returns HTTP status code:</p>
|
||||
<ul>
|
||||
<li><code>201</code> - When a new user object was created.</li>
|
||||
@@ -322,8 +320,6 @@ users do not login via single-sign-on, a new <code>password</code> must be provi
|
||||
By default, the response is ordered by ascending user ID.</p>
|
||||
<pre><code>GET /_synapse/admin/v2/users?from=0&limit=10&guests=false
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>A response body like the following is returned:</p>
|
||||
<pre><code class="language-json">{
|
||||
"users": [
|
||||
@@ -447,8 +443,6 @@ This allows user type specific behaviour. There are also types <code>support</co
|
||||
</code></pre>
|
||||
<p>See also: <a href="https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-admin-whois-userid">Client Server
|
||||
API Whois</a>.</p>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>It returns a JSON body like the following:</p>
|
||||
<pre><code class="language-json">{
|
||||
"user_id": "<user_id>",
|
||||
@@ -490,8 +484,6 @@ were sent, but hidden from users joining the room afterwards.</p>
|
||||
"erase": true
|
||||
}
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>The erase parameter is optional and defaults to <code>false</code>.
|
||||
An empty body may be passed for backwards compatibility.</p>
|
||||
<p>The following actions are performed when deactivating an user:</p>
|
||||
@@ -542,16 +534,12 @@ is set to <code>true</code>:</p>
|
||||
"logout_devices": true
|
||||
}
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>The parameter <code>new_password</code> is required.
|
||||
The parameter <code>logout_devices</code> is optional and defaults to <code>true</code>.</p>
|
||||
<h2 id="get-whether-a-user-is-a-server-administrator-or-not"><a class="header" href="#get-whether-a-user-is-a-server-administrator-or-not">Get whether a user is a server administrator or not</a></h2>
|
||||
<p>The api is:</p>
|
||||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/admin
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>A response body like the following is returned:</p>
|
||||
<pre><code class="language-json">{
|
||||
"admin": true
|
||||
@@ -567,15 +555,11 @@ server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
"admin": true
|
||||
}
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<h2 id="list-room-memberships-of-a-user"><a class="header" href="#list-room-memberships-of-a-user">List room memberships of a user</a></h2>
|
||||
<p>Gets a list of all <code>room_id</code> that a specific <code>user_id</code> is member.</p>
|
||||
<p>The API is:</p>
|
||||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/joined_rooms
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>A response body like the following is returned:</p>
|
||||
<pre><code class="language-json"> {
|
||||
"joined_rooms": [
|
||||
@@ -677,8 +661,6 @@ The newest media is on top. You can change the order with parameters
|
||||
<p>The API is:</p>
|
||||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/media
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>A response body like the following is returned:</p>
|
||||
<pre><code class="language-json">{
|
||||
"media": [
|
||||
@@ -790,8 +772,6 @@ The newest media is deleted first. You can change the order with parameters
|
||||
<p>The API is:</p>
|
||||
<pre><code>DELETE /_synapse/admin/v1/users/<user_id>/media
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>A response body like the following is returned:</p>
|
||||
<pre><code class="language-json">{
|
||||
"deleted_media": [
|
||||
@@ -840,8 +820,6 @@ same.</p>
|
||||
<p>The API is:</p>
|
||||
<pre><code>GET /_synapse/admin/v2/users/<user_id>/devices
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>A response body like the following is returned:</p>
|
||||
<pre><code class="language-json">{
|
||||
"devices": [
|
||||
@@ -902,8 +880,6 @@ any access token associated with them.</p>
|
||||
],
|
||||
}
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>An empty JSON dict is returned.</p>
|
||||
<p><strong>Parameters</strong></p>
|
||||
<p>The following parameters should be set in the URL:</p>
|
||||
@@ -919,8 +895,6 @@ server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>The API is:</p>
|
||||
<pre><code>GET /_synapse/admin/v2/users/<user_id>/devices/<device_id>
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>A response body like the following is returned:</p>
|
||||
<pre><code class="language-json">{
|
||||
"device_id": "<device_id>",
|
||||
@@ -957,8 +931,6 @@ devices was last seen. (May be a few minutes out of date, for efficiency reasons
|
||||
"display_name": "My other phone"
|
||||
}
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>An empty JSON dict is returned.</p>
|
||||
<p><strong>Parameters</strong></p>
|
||||
<p>The following parameters should be set in the URL:</p>
|
||||
@@ -979,8 +951,6 @@ and invalidates any access token associated with it.</p>
|
||||
|
||||
{}
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>An empty JSON dict is returned.</p>
|
||||
<p><strong>Parameters</strong></p>
|
||||
<p>The following parameters should be set in the URL:</p>
|
||||
@@ -993,8 +963,6 @@ server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>The API is:</p>
|
||||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/pushers
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>A response body like the following is returned:</p>
|
||||
<pre><code class="language-json">{
|
||||
"pushers": [
|
||||
@@ -1093,8 +1061,6 @@ A shadow-banned user will be unable to contact anyone on the server.</p>
|
||||
<p>To un-shadow-ban a user the API is:</p>
|
||||
<pre><code>DELETE /_synapse/admin/v1/users/<user_id>/shadow_ban
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>An empty JSON dict is returned in both cases.</p>
|
||||
<p><strong>Parameters</strong></p>
|
||||
<p>The following parameters should be set in the URL:</p>
|
||||
@@ -1109,8 +1075,6 @@ There are specific APIs to set, get and delete a ratelimit.</p>
|
||||
<p>The API is:</p>
|
||||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/override_ratelimit
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>A response body like the following is returned:</p>
|
||||
<pre><code class="language-json">{
|
||||
"messages_per_second": 0,
|
||||
@@ -1138,8 +1102,6 @@ being limited.</li>
|
||||
<p>The API is:</p>
|
||||
<pre><code>POST /_synapse/admin/v1/users/<user_id>/override_ratelimit
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>A response body like the following is returned:</p>
|
||||
<pre><code class="language-json">{
|
||||
"messages_per_second": 0,
|
||||
@@ -1172,8 +1134,6 @@ being limited.</li>
|
||||
<p>The API is:</p>
|
||||
<pre><code>DELETE /_synapse/admin/v1/users/<user_id>/override_ratelimit
|
||||
</code></pre>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>An empty JSON dict is returned.</p>
|
||||
<pre><code class="language-json">{}
|
||||
</code></pre>
|
||||
@@ -1192,9 +1152,8 @@ for more information.</p>
|
||||
<p>The API is:</p>
|
||||
<pre><code>GET /_synapse/admin/v1/username_available?username=$localpart
|
||||
</code></pre>
|
||||
<p>The request and response format is the same as the <a href="https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-register-available">/_matrix/client/r0/register/available</a> API.</p>
|
||||
<p>To use it, you will need to authenticate by providing an <code>access_token</code> for a
|
||||
server admin: <a href="../usage/administration/admin_api">Admin API</a></p>
|
||||
<p>The request and response format is the same as the
|
||||
<a href="https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-register-available">/_matrix/client/r0/register/available</a> API.</p>
|
||||
|
||||
</main>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user