mirror of
https://github.com/element-hq/synapse.git
synced 2026-03-31 10:35:42 +00:00
1606 lines
86 KiB
HTML
1606 lines
86 KiB
HTML
<!DOCTYPE HTML>
|
||
<html lang="en" class="light sidebar-visible" dir="ltr">
|
||
<head>
|
||
<!-- Book generated using mdBook -->
|
||
<meta charset="UTF-8">
|
||
<title>Users - Synapse</title>
|
||
|
||
|
||
<!-- Custom HTML head -->
|
||
|
||
<meta name="description" content="">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<meta name="theme-color" content="#ffffff">
|
||
|
||
<link rel="icon" href="../favicon-de23e50b.svg">
|
||
<link rel="shortcut icon" href="../favicon-8114d1fc.png">
|
||
<link rel="stylesheet" href="../css/variables-8adf115d.css">
|
||
<link rel="stylesheet" href="../css/general-2459343d.css">
|
||
<link rel="stylesheet" href="../css/chrome-ae938929.css">
|
||
<link rel="stylesheet" href="../css/print-9e4910d8.css" media="print">
|
||
|
||
<!-- Fonts -->
|
||
<link rel="stylesheet" href="../fonts/fonts-9644e21d.css">
|
||
|
||
<!-- Highlight.js Stylesheets -->
|
||
<link rel="stylesheet" id="mdbook-highlight-css" href="../highlight-493f70e1.css">
|
||
<link rel="stylesheet" id="mdbook-tomorrow-night-css" href="../tomorrow-night-4c0ae647.css">
|
||
<link rel="stylesheet" id="mdbook-ayu-highlight-css" href="../ayu-highlight-3fdfc3ac.css">
|
||
|
||
<!-- Custom theme stylesheets -->
|
||
<link rel="stylesheet" href="../docs/website_files/indent-section-headers-3390f960.css">
|
||
<link rel="stylesheet" href="../docs/website_files/version-picker-ddc5216e.css">
|
||
|
||
|
||
<!-- Provide site root and default themes to javascript -->
|
||
<script>
|
||
const path_to_root = "../";
|
||
const default_light_theme = "light";
|
||
const default_dark_theme = "navy";
|
||
window.path_to_searchindex_js = "../searchindex-b5af432e.js";
|
||
</script>
|
||
<!-- Start loading toc.js asap -->
|
||
<script src="../toc-4dc10a98.js"></script>
|
||
</head>
|
||
<body>
|
||
<div id="mdbook-help-container">
|
||
<div id="mdbook-help-popup">
|
||
<h2 class="mdbook-help-title">Keyboard shortcuts</h2>
|
||
<div>
|
||
<p>Press <kbd>←</kbd> or <kbd>→</kbd> to navigate between chapters</p>
|
||
<p>Press <kbd>S</kbd> or <kbd>/</kbd> to search in the book</p>
|
||
<p>Press <kbd>?</kbd> to show this help</p>
|
||
<p>Press <kbd>Esc</kbd> to hide this help</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="mdbook-body-container">
|
||
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
||
<script>
|
||
try {
|
||
let theme = localStorage.getItem('mdbook-theme');
|
||
let sidebar = localStorage.getItem('mdbook-sidebar');
|
||
|
||
if (theme.startsWith('"') && theme.endsWith('"')) {
|
||
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
|
||
}
|
||
|
||
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
|
||
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
|
||
}
|
||
} catch (e) { }
|
||
</script>
|
||
|
||
<!-- Set the theme before any content is loaded, prevents flash -->
|
||
<script>
|
||
const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
|
||
let theme;
|
||
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
||
if (theme === null || theme === undefined) { theme = default_theme; }
|
||
const html = document.documentElement;
|
||
html.classList.remove('light')
|
||
html.classList.add(theme);
|
||
html.classList.add("js");
|
||
</script>
|
||
|
||
<input type="checkbox" id="mdbook-sidebar-toggle-anchor" class="hidden">
|
||
|
||
<!-- Hide / unhide sidebar before it is displayed -->
|
||
<script>
|
||
let sidebar = null;
|
||
const sidebar_toggle = document.getElementById("mdbook-sidebar-toggle-anchor");
|
||
if (document.body.clientWidth >= 1080) {
|
||
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
||
sidebar = sidebar || 'visible';
|
||
} else {
|
||
sidebar = 'hidden';
|
||
sidebar_toggle.checked = false;
|
||
}
|
||
if (sidebar === 'visible') {
|
||
sidebar_toggle.checked = true;
|
||
} else {
|
||
html.classList.remove('sidebar-visible');
|
||
}
|
||
</script>
|
||
|
||
<nav id="mdbook-sidebar" class="sidebar" aria-label="Table of contents">
|
||
<!-- populated by js -->
|
||
<mdbook-sidebar-scrollbox class="sidebar-scrollbox"></mdbook-sidebar-scrollbox>
|
||
<noscript>
|
||
<iframe class="sidebar-iframe-outer" src="../toc.html"></iframe>
|
||
</noscript>
|
||
<div id="mdbook-sidebar-resize-handle" class="sidebar-resize-handle">
|
||
<div class="sidebar-resize-indicator"></div>
|
||
</div>
|
||
</nav>
|
||
|
||
<div id="mdbook-page-wrapper" class="page-wrapper">
|
||
|
||
<div class="page">
|
||
<div id="mdbook-menu-bar-hover-placeholder"></div>
|
||
<div id="mdbook-menu-bar" class="menu-bar sticky">
|
||
<div class="left-buttons">
|
||
<label id="mdbook-sidebar-toggle" class="icon-button" for="mdbook-sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="mdbook-sidebar">
|
||
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg></span>
|
||
</label>
|
||
<button id="mdbook-theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="mdbook-theme-list">
|
||
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M371.3 367.1c27.3-3.9 51.9-19.4 67.2-42.9L600.2 74.1c12.6-19.5 9.4-45.3-7.6-61.2S549.7-4.4 531.1 9.6L294.4 187.2c-24 18-38.2 46.1-38.4 76.1L371.3 367.1zm-19.6 25.4l-116-104.4C175.9 290.3 128 339.6 128 400c0 3.9 .2 7.8 .6 11.6c1.8 17.5-10.2 36.4-27.8 36.4H96c-17.7 0-32 14.3-32 32s14.3 32 32 32H240c61.9 0 112-50.1 112-112c0-2.5-.1-5-.2-7.5z"/></svg></span>
|
||
</button>
|
||
<ul id="mdbook-theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
||
<li role="none"><button role="menuitem" class="theme" id="mdbook-theme-default_theme">Auto</button></li>
|
||
<li role="none"><button role="menuitem" class="theme" id="mdbook-theme-light">Light</button></li>
|
||
<li role="none"><button role="menuitem" class="theme" id="mdbook-theme-rust">Rust</button></li>
|
||
<li role="none"><button role="menuitem" class="theme" id="mdbook-theme-coal">Coal</button></li>
|
||
<li role="none"><button role="menuitem" class="theme" id="mdbook-theme-navy">Navy</button></li>
|
||
<li role="none"><button role="menuitem" class="theme" id="mdbook-theme-ayu">Ayu</button></li>
|
||
</ul>
|
||
<button id="mdbook-search-toggle" class="icon-button" type="button" title="Search (`/`)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="/ s" aria-controls="mdbook-searchbar">
|
||
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352c79.5 0 144-64.5 144-144s-64.5-144-144-144S64 128.5 64 208s64.5 144 144 144z"/></svg></span>
|
||
</button>
|
||
</div>
|
||
|
||
<!-- BEGIN CUSTOM SYNAPSE MODIFICATIONS -->
|
||
<div class="version-picker">
|
||
<div class="dropdown">
|
||
<div class="select">
|
||
<span></span>
|
||
<i class="fa fa-chevron-down"></i>
|
||
</div>
|
||
<input type="hidden" name="version">
|
||
<ul class="dropdown-menu">
|
||
<!-- Versions will be added dynamically in version-picker.js -->
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<!-- END CUSTOM SYNAPSE MODIFICATIONS -->
|
||
|
||
<h1 class="menu-title">Synapse</h1>
|
||
|
||
<div class="right-buttons">
|
||
<a href="../print.html" title="Print this book" aria-label="Print this book">
|
||
<span class=fa-svg id="print-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M128 0C92.7 0 64 28.7 64 64v96h64V64H354.7L384 93.3V160h64V93.3c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0H128zM384 352v32 64H128V384 368 352H384zm64 32h32c17.7 0 32-14.3 32-32V256c0-35.3-28.7-64-64-64H64c-35.3 0-64 28.7-64 64v96c0 17.7 14.3 32 32 32H64v64c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V384zm-16-88c-13.3 0-24-10.7-24-24s10.7-24 24-24s24 10.7 24 24s-10.7 24-24 24z"/></svg></span>
|
||
</a>
|
||
<a href="https://github.com/element-hq/synapse" title="Git repository" aria-label="Git repository">
|
||
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg></span>
|
||
</a>
|
||
<a href="https://github.com/element-hq/synapse/edit/develop/docs/admin_api/user_admin_api.md" title="Suggest an edit" aria-label="Suggest an edit" rel="edit">
|
||
<span class=fa-svg id="git-edit-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M421.7 220.3l-11.3 11.3-22.6 22.6-205 205c-6.6 6.6-14.8 11.5-23.8 14.1L30.8 511c-8.4 2.5-17.5 .2-23.7-6.1S-1.5 489.7 1 481.2L38.7 353.1c2.6-9 7.5-17.2 14.1-23.8l205-205 22.6-22.6 11.3-11.3 33.9 33.9 62.1 62.1 33.9 33.9zM96 353.9l-9.3 9.3c-.9 .9-1.6 2.1-2 3.4l-25.3 86 86-25.3c1.3-.4 2.5-1.1 3.4-2l9.3-9.3H112c-8.8 0-16-7.2-16-16V353.9zM453.3 19.3l39.4 39.4c25 25 25 65.5 0 90.5l-14.5 14.5-22.6 22.6-11.3 11.3-33.9-33.9-62.1-62.1L314.3 67.7l11.3-11.3 22.6-22.6 14.5-14.5c25-25 65.5-25 90.5 0z"/></svg></span>
|
||
</a>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div id="mdbook-search-wrapper" class="hidden">
|
||
<form id="mdbook-searchbar-outer" class="searchbar-outer">
|
||
<div class="search-wrapper">
|
||
<input type="search" id="mdbook-searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="mdbook-searchresults-outer" aria-describedby="searchresults-header">
|
||
<div class="spinner-wrapper">
|
||
<span class=fa-svg id="fa-spin"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M304 48c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zm0 416c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zM48 304c26.5 0 48-21.5 48-48s-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48zm464-48c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zM142.9 437c18.7-18.7 18.7-49.1 0-67.9s-49.1-18.7-67.9 0s-18.7 49.1 0 67.9s49.1 18.7 67.9 0zm0-294.2c18.7-18.7 18.7-49.1 0-67.9S93.7 56.2 75 75s-18.7 49.1 0 67.9s49.1 18.7 67.9 0zM369.1 437c18.7 18.7 49.1 18.7 67.9 0s18.7-49.1 0-67.9s-49.1-18.7-67.9 0s-18.7 49.1 0 67.9z"/></svg></span>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<div id="mdbook-searchresults-outer" class="searchresults-outer hidden">
|
||
<div id="mdbook-searchresults-header" class="searchresults-header"></div>
|
||
<ul id="mdbook-searchresults">
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
||
<script>
|
||
document.getElementById('mdbook-sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
||
document.getElementById('mdbook-sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
||
Array.from(document.querySelectorAll('#mdbook-sidebar a')).forEach(function(link) {
|
||
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
|
||
});
|
||
</script>
|
||
|
||
<div id="mdbook-content" class="content">
|
||
<main>
|
||
<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>It returns a JSON body like the following:</p>
|
||
<pre><code class="language-jsonc">{
|
||
"name": "@user:example.com",
|
||
"displayname": "User", // can be null if not set
|
||
"threepids": [
|
||
{
|
||
"medium": "email",
|
||
"address": "<user_mail_1>",
|
||
"added_at": 1586458409743,
|
||
"validated_at": 1586458409743
|
||
},
|
||
{
|
||
"medium": "email",
|
||
"address": "<user_mail_2>",
|
||
"added_at": 1586458409743,
|
||
"validated_at": 1586458409743
|
||
}
|
||
],
|
||
"avatar_url": "<avatar_url>", // can be null if not set
|
||
"is_guest": 0,
|
||
"admin": 0,
|
||
"deactivated": 0,
|
||
"erased": false,
|
||
"shadow_banned": 0,
|
||
"creation_ts": 1560432506,
|
||
"last_seen_ts": 1732919539393,
|
||
"appservice_id": null,
|
||
"consent_server_notice_sent": null,
|
||
"consent_version": null,
|
||
"consent_ts": null,
|
||
"external_ids": [
|
||
{
|
||
"auth_provider": "<provider1>",
|
||
"external_id": "<user_id_provider_1>"
|
||
},
|
||
{
|
||
"auth_provider": "<provider2>",
|
||
"external_id": "<user_id_provider_2>"
|
||
}
|
||
],
|
||
"user_type": null,
|
||
"locked": false,
|
||
"suspended": false
|
||
}
|
||
</code></pre>
|
||
<p>URL parameters:</p>
|
||
<ul>
|
||
<li><code>user_id</code>: fully-qualified user id: for example, <code>@user:server.com</code>.</li>
|
||
</ul>
|
||
<h2 id="create-or-modify-account"><a class="header" href="#create-or-modify-account">Create or modify account</a></h2>
|
||
<p>This API allows an administrator to create or modify a user account with a
|
||
specific <code>user_id</code>.</p>
|
||
<p>This api is:</p>
|
||
<pre><code>PUT /_synapse/admin/v2/users/<user_id>
|
||
</code></pre>
|
||
<p>with a body of:</p>
|
||
<pre><code class="language-json">{
|
||
"password": "user_password",
|
||
"logout_devices": false,
|
||
"displayname": "Alice Marigold",
|
||
"avatar_url": "mxc://example.com/abcde12345",
|
||
"threepids": [
|
||
{
|
||
"medium": "email",
|
||
"address": "alice@example.com"
|
||
},
|
||
{
|
||
"medium": "email",
|
||
"address": "alice@domain.org"
|
||
}
|
||
],
|
||
"external_ids": [
|
||
{
|
||
"auth_provider": "example",
|
||
"external_id": "12345"
|
||
},
|
||
{
|
||
"auth_provider": "example2",
|
||
"external_id": "abc54321"
|
||
}
|
||
],
|
||
"admin": false,
|
||
"deactivated": false,
|
||
"user_type": null,
|
||
"locked": false
|
||
}
|
||
</code></pre>
|
||
<p>Returns HTTP status code:</p>
|
||
<ul>
|
||
<li><code>201</code> - When a new user object was created.</li>
|
||
<li><code>200</code> - When a user was modified.</li>
|
||
</ul>
|
||
<p>URL parameters:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - A fully-qualified user id. For example, <code>@user:server.com</code>.</li>
|
||
</ul>
|
||
<p>Body parameters:</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>password</code> - <strong>string</strong>, optional. If provided, the user’s password is updated and all
|
||
devices are logged out, unless <code>logout_devices</code> is set to <code>false</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>logout_devices</code> - <strong>bool</strong>, optional, defaults to <code>true</code>. If set to <code>false</code>, devices aren’t
|
||
logged out even when <code>password</code> is provided.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>displayname</code> - <strong>string</strong>, optional. If set to an empty string (<code>""</code>), the user’s display name
|
||
will be removed.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>avatar_url</code> - <strong>string</strong>, optional. Must be a
|
||
<a href="https://matrix.org/docs/spec/client_server/r0.6.0#matrix-content-mxc-uris">MXC URI</a>.
|
||
If set to an empty string (<code>""</code>), the user’s avatar is removed.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>threepids</code> - <strong>array</strong>, optional. If provided, the user’s third-party IDs (email, msisdn) are
|
||
entirely replaced with the given list. Each item in the array is an object with the following
|
||
fields:</p>
|
||
<ul>
|
||
<li><code>medium</code> - <strong>string</strong>, required. The type of third-party ID, either <code>email</code> or <code>msisdn</code> (phone number).</li>
|
||
<li><code>address</code> - <strong>string</strong>, required. The third-party ID itself, e.g. <code>alice@example.com</code> for <code>email</code> or
|
||
<code>447470274584</code> (for a phone number with country code “44”) and <code>19254857364</code> (for a phone number
|
||
with country code “1”) for <code>msisdn</code>.
|
||
Note: If a threepid is removed from a user via this option, Synapse will also attempt to remove
|
||
that threepid from any identity servers it is aware has a binding for it.</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p><code>external_ids</code> - <strong>array</strong>, optional. Allow setting the identifier of the external identity
|
||
provider for SSO (Single sign-on). More details are in the configuration manual under the
|
||
sections <a href="../usage/configuration/config_documentation.html#sso">sso</a> and <a href="../usage/configuration/config_documentation.html#oidc_providers">oidc_providers</a>.</p>
|
||
<ul>
|
||
<li><code>auth_provider</code> - <strong>string</strong>, required. The unique, internal ID of the external identity provider.
|
||
The same as <code>idp_id</code> from the homeserver configuration. If using OIDC, this value should be prefixed
|
||
with <code>oidc-</code>. Note that no error is raised if the provided value is not in the homeserver configuration.</li>
|
||
<li><code>external_id</code> - <strong>string</strong>, required. An identifier for the user in the external identity provider.
|
||
When the user logs in to the identity provider, this must be the unique ID that they map to.</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p><code>admin</code> - <strong>bool</strong>, optional, defaults to <code>false</code>. Whether the user is a homeserver administrator,
|
||
granting them access to the Admin API, among other things.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>deactivated</code> - <strong>bool</strong>, optional. If unspecified, deactivation state will be left unchanged.</p>
|
||
<p>Note:</p>
|
||
<ul>
|
||
<li>For the password field there is no strict check of the necessity for its presence.
|
||
It is possible to have active users without a password, e.g. when authenticating with OIDC is configured.
|
||
You must check yourself whether a password is required when reactivating a user or not.</li>
|
||
<li>It is not possible to set a password if the config option <code>password_config.localdb_enabled</code> is set <code>false</code>.
|
||
Users’ passwords are wiped upon account deactivation, hence the need to set a new one here.</li>
|
||
</ul>
|
||
<p>Note: a user cannot be erased with this API. For more details on
|
||
deactivating and erasing users see <a href="#deactivate-account">Deactivate Account</a>.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>locked</code> - <strong>bool</strong>, optional. If unspecified, locked state will be left unchanged.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>user_type</code> - <strong>string</strong> or null, optional. If not provided, the user type will be
|
||
not be changed. If <code>null</code> is given, the user type will be cleared.
|
||
Other allowed options are: <code>bot</code> and <code>support</code> and any extra values defined in the homserver
|
||
<a href="../usage/configuration/config_documentation.html#user_types">configuration</a>.</p>
|
||
</li>
|
||
</ul>
|
||
<h2 id="list-accounts"><a class="header" href="#list-accounts">List Accounts</a></h2>
|
||
<h3 id="list-accounts-v2"><a class="header" href="#list-accounts-v2">List Accounts (V2)</a></h3>
|
||
<p>This API returns all local user accounts.
|
||
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>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"users": [
|
||
{
|
||
"name": "<user_id1>",
|
||
"is_guest": 0,
|
||
"admin": 0,
|
||
"user_type": null,
|
||
"deactivated": 0,
|
||
"erased": false,
|
||
"shadow_banned": 0,
|
||
"displayname": "<User One>",
|
||
"avatar_url": null,
|
||
"creation_ts": 1560432668000,
|
||
"locked": false
|
||
}, {
|
||
"name": "<user_id2>",
|
||
"is_guest": 0,
|
||
"admin": 1,
|
||
"user_type": null,
|
||
"deactivated": 0,
|
||
"erased": false,
|
||
"shadow_banned": 0,
|
||
"displayname": "<User Two>",
|
||
"avatar_url": "<avatar_url>",
|
||
"creation_ts": 1561550621000,
|
||
"locked": false
|
||
}
|
||
],
|
||
"next_token": "100",
|
||
"total": 200
|
||
}
|
||
</code></pre>
|
||
<p>To paginate, check for <code>next_token</code> and if present, call the endpoint again
|
||
with <code>from</code> set to the value of <code>next_token</code>. This will return a new page.</p>
|
||
<p>If the endpoint does not return a <code>next_token</code> then there are no more users
|
||
to paginate through.</p>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>user_id</code> - Is optional and filters to only return users with user IDs
|
||
that contain this value. This parameter is ignored when using the <code>name</code> parameter.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>name</code> - Is optional and filters to only return users with user ID localparts
|
||
<strong>or</strong> displaynames that contain this value.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>guests</code> - string representing a bool - Is optional and if <code>false</code> will <strong>exclude</strong> guest users.
|
||
Defaults to <code>true</code> to include guest users. This parameter is not supported when MSC3861 is enabled. <a href="https://github.com/matrix-org/synapse/pull/15582">See #15582</a></p>
|
||
</li>
|
||
<li>
|
||
<p><code>admins</code> - Optional flag to filter admins. If <code>true</code>, only admins are queried. If <code>false</code>, admins are excluded from
|
||
the query. When the flag is absent (the default), <strong>both</strong> admins and non-admins are included in the search results.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>deactivated</code> - string representing a bool - Is optional and if <code>true</code> will <strong>include</strong> deactivated users.
|
||
Defaults to <code>false</code> to exclude deactivated users.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>limit</code> - string representing a positive integer - Is optional but is used for pagination,
|
||
denoting the maximum number of items to return in this call. Defaults to <code>100</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>from</code> - string representing a positive integer - Is optional but used for pagination,
|
||
denoting the offset in the returned results. This should be treated as an opaque value and
|
||
not explicitly set to anything other than the return value of <code>next_token</code> from a previous call.
|
||
Defaults to <code>0</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>order_by</code> - The method by which to sort the returned list of users.
|
||
If the ordered field has duplicates, the second order is always by ascending <code>name</code>,
|
||
which guarantees a stable ordering. Valid values are:</p>
|
||
<ul>
|
||
<li><code>name</code> - Users are ordered alphabetically by <code>name</code>. This is the default.</li>
|
||
<li><code>is_guest</code> - Users are ordered by <code>is_guest</code> status.</li>
|
||
<li><code>admin</code> - Users are ordered by <code>admin</code> status.</li>
|
||
<li><code>user_type</code> - Users are ordered alphabetically by <code>user_type</code>.</li>
|
||
<li><code>deactivated</code> - Users are ordered by <code>deactivated</code> status.</li>
|
||
<li><code>shadow_banned</code> - Users are ordered by <code>shadow_banned</code> status.</li>
|
||
<li><code>displayname</code> - Users are ordered alphabetically by <code>displayname</code>.</li>
|
||
<li><code>avatar_url</code> - Users are ordered alphabetically by avatar URL.</li>
|
||
<li><code>creation_ts</code> - Users are ordered by when the users was created in ms.</li>
|
||
<li><code>last_seen_ts</code> - Users are ordered by when the user was lastly seen in ms.</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p><code>dir</code> - Direction of media order. Either <code>f</code> for forwards or <code>b</code> for backwards.
|
||
Setting this value to <code>b</code> will reverse the above sort order. Defaults to <code>f</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>not_user_type</code> - Exclude certain user types, such as bot users, from the request.
|
||
Can be provided multiple times. Possible values are <code>bot</code>, <code>support</code> or “empty string”.
|
||
“empty string” here means to exclude users without a type.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>locked</code> - string representing a bool - Is optional and if <code>true</code> will <strong>include</strong> locked users.
|
||
Defaults to <code>false</code> to exclude locked users. Note: Introduced in v1.93.</p>
|
||
</li>
|
||
</ul>
|
||
<p>Caution. The database only has indexes on the columns <code>name</code> and <code>creation_ts</code>.
|
||
This means that if a different sort order is used (<code>is_guest</code>, <code>admin</code>,
|
||
<code>user_type</code>, <code>deactivated</code>, <code>shadow_banned</code>, <code>avatar_url</code> or <code>displayname</code>),
|
||
this can cause a large load on the database, especially for large environments.</p>
|
||
<p><strong>Response</strong></p>
|
||
<p>The following fields are returned in the JSON response body:</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>users</code> - An array of objects, each containing information about an user.
|
||
User objects contain the following fields:</p>
|
||
<ul>
|
||
<li><code>name</code> - string - Fully-qualified user ID (ex. <code>@user:server.com</code>).</li>
|
||
<li><code>is_guest</code> - bool - Status if that user is a guest account.</li>
|
||
<li><code>admin</code> - bool - Status if that user is a server administrator.</li>
|
||
<li><code>user_type</code> - string - Type of the user. Normal users are type <code>None</code>.
|
||
This allows user type specific behaviour. There are also types <code>support</code> and <code>bot</code>.</li>
|
||
<li><code>deactivated</code> - bool - Status if that user has been marked as deactivated.</li>
|
||
<li><code>erased</code> - bool - Status if that user has been marked as erased.</li>
|
||
<li><code>shadow_banned</code> - bool - Status if that user has been marked as shadow banned.</li>
|
||
<li><code>displayname</code> - string - The user’s display name if they have set one.</li>
|
||
<li><code>avatar_url</code> - string - The user’s avatar URL if they have set one.</li>
|
||
<li><code>creation_ts</code> - integer - The user’s creation timestamp in ms.</li>
|
||
<li><code>last_seen_ts</code> - integer - The user’s last activity timestamp in ms.</li>
|
||
<li><code>locked</code> - bool - Status if that user has been marked as locked. Note: Introduced in v1.93.</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p><code>next_token</code>: string representing a positive integer - Indication for pagination. See above.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>total</code> - integer - Total number of media.</p>
|
||
</li>
|
||
</ul>
|
||
<p><em>Added in Synapse 1.93:</em> the <code>locked</code> query parameter and response field.</p>
|
||
<h3 id="list-accounts-v3"><a class="header" href="#list-accounts-v3">List Accounts (V3)</a></h3>
|
||
<p>This API returns all local user accounts (see v2). In contrast to v2, the query parameter <code>deactivated</code> is handled differently.</p>
|
||
<pre><code>GET /_synapse/admin/v3/users
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<ul>
|
||
<li><code>deactivated</code> - Optional flag to filter deactivated users. If <code>true</code>, only deactivated users are returned.
|
||
If <code>false</code>, deactivated users are excluded from the query. When the flag is absent (the default),
|
||
users are not filtered by deactivation status.</li>
|
||
</ul>
|
||
<h2 id="query-current-sessions-for-a-user"><a class="header" href="#query-current-sessions-for-a-user">Query current sessions for a user</a></h2>
|
||
<p>This API returns information about the active sessions for a specific user.</p>
|
||
<p>The endpoints are:</p>
|
||
<pre><code>GET /_synapse/admin/v1/whois/<user_id>
|
||
</code></pre>
|
||
<p>and:</p>
|
||
<pre><code>GET /_matrix/client/r0/admin/whois/<userId>
|
||
</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>It returns a JSON body like the following:</p>
|
||
<pre><code class="language-json">{
|
||
"user_id": "<user_id>",
|
||
"devices": {
|
||
"": {
|
||
"sessions": [
|
||
{
|
||
"connections": [
|
||
{
|
||
"ip": "1.2.3.4",
|
||
"last_seen": 1417222374433,
|
||
"user_agent": "Mozilla/5.0 ..."
|
||
},
|
||
{
|
||
"ip": "1.2.3.10",
|
||
"last_seen": 1417222374500,
|
||
"user_agent": "Dalvik/2.1.0 ..."
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
</code></pre>
|
||
<p><code>last_seen</code> is measured in milliseconds since the Unix epoch.</p>
|
||
<h2 id="deactivate-account"><a class="header" href="#deactivate-account">Deactivate Account</a></h2>
|
||
<p>This API deactivates an account. It removes active access tokens, resets the
|
||
password, and deletes third-party IDs (to prevent the user requesting a
|
||
password reset).</p>
|
||
<p>It can also mark the user as GDPR-erased. This means messages sent by the
|
||
user will still be visible by anyone that was in the room when these messages
|
||
were sent, but hidden from users joining the room afterwards.</p>
|
||
<p>The api is:</p>
|
||
<pre><code>POST /_synapse/admin/v1/deactivate/<user_id>
|
||
</code></pre>
|
||
<p>with a body of:</p>
|
||
<pre><code class="language-json">{
|
||
"erase": true
|
||
}
|
||
</code></pre>
|
||
<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>
|
||
<ul>
|
||
<li>Try to unbind 3PIDs from the identity server</li>
|
||
<li>Remove all 3PIDs from the homeserver</li>
|
||
<li>Delete all devices and E2EE keys</li>
|
||
<li>Delete all access tokens</li>
|
||
<li>Delete all pushers</li>
|
||
<li>Delete the password hash</li>
|
||
<li>Removal from all rooms the user is a member of</li>
|
||
<li>Remove the user from the user directory</li>
|
||
<li>Reject all pending invites</li>
|
||
<li>Remove all account validity information related to the user</li>
|
||
<li>Remove the arbitrary data store known as <em>account data</em>. For example, this includes:
|
||
<ul>
|
||
<li>list of ignored users;</li>
|
||
<li>push rules;</li>
|
||
<li>secret storage keys; and</li>
|
||
<li>cross-signing keys.</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p>The following additional actions are performed during deactivation if <code>erase</code>
|
||
is set to <code>true</code>:</p>
|
||
<ul>
|
||
<li>Remove the user’s display name</li>
|
||
<li>Remove the user’s avatar URL</li>
|
||
<li>Remove the user’s custom profile fields</li>
|
||
<li>Mark the user as erased</li>
|
||
</ul>
|
||
<p>The following actions are <strong>NOT</strong> performed. The list may be incomplete.</p>
|
||
<ul>
|
||
<li>Remove mappings of SSO IDs</li>
|
||
<li><a href="#delete-media-uploaded-by-a-user">Delete media uploaded</a> by user (included avatar images)</li>
|
||
<li>Delete sent and received messages</li>
|
||
<li>Remove the user’s creation (registration) timestamp</li>
|
||
<li><a href="#override-ratelimiting-for-users">Remove rate limit overrides</a></li>
|
||
<li>Remove from monthly active users</li>
|
||
<li>Remove user’s consent information (consent version and timestamp)</li>
|
||
</ul>
|
||
<h2 id="suspendunsuspend-account"><a class="header" href="#suspendunsuspend-account">Suspend/Unsuspend Account</a></h2>
|
||
<p>This API allows an admin to suspend/unsuspend an account. While an account is suspended, the user is
|
||
prohibited from sending invites, joining or knocking on rooms, sending messages, changing profile data, and redacting messages other than their own.</p>
|
||
<p>The api is:</p>
|
||
<pre><code>PUT /_synapse/admin/v1/suspend/<user_id>
|
||
</code></pre>
|
||
<p>with a body of:</p>
|
||
<pre><code class="language-json">{
|
||
"suspend": true
|
||
}
|
||
</code></pre>
|
||
<p>To unsuspend a user, use the same endpoint with a body of:</p>
|
||
<pre><code class="language-json">{
|
||
"suspend": false
|
||
}
|
||
</code></pre>
|
||
<h2 id="reset-password"><a class="header" href="#reset-password">Reset password</a></h2>
|
||
<p><strong>Note:</strong> This API is disabled when MSC3861 is enabled. <a href="https://github.com/matrix-org/synapse/pull/15582">See #15582</a></p>
|
||
<p>Changes the password of another user. This will automatically log the user out of all their devices.</p>
|
||
<p>The api is:</p>
|
||
<pre><code>POST /_synapse/admin/v1/reset_password/<user_id>
|
||
</code></pre>
|
||
<p>with a body of:</p>
|
||
<pre><code class="language-json">{
|
||
"new_password": "<secret>",
|
||
"logout_devices": true
|
||
}
|
||
</code></pre>
|
||
<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><strong>Note:</strong> This API is disabled when MSC3861 is enabled. <a href="https://github.com/matrix-org/synapse/pull/15582">See #15582</a></p>
|
||
<p>The api is:</p>
|
||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/admin
|
||
</code></pre>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"admin": true
|
||
}
|
||
</code></pre>
|
||
<h2 id="change-whether-a-user-is-a-server-administrator-or-not"><a class="header" href="#change-whether-a-user-is-a-server-administrator-or-not">Change whether a user is a server administrator or not</a></h2>
|
||
<p><strong>Note:</strong> This API is disabled when MSC3861 is enabled. <a href="https://github.com/matrix-org/synapse/pull/15582">See #15582</a></p>
|
||
<p>Note that you cannot demote yourself.</p>
|
||
<p>The api is:</p>
|
||
<pre><code>PUT /_synapse/admin/v1/users/<user_id>/admin
|
||
</code></pre>
|
||
<p>with a body of:</p>
|
||
<pre><code class="language-json">{
|
||
"admin": true
|
||
}
|
||
</code></pre>
|
||
<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 room memberships for a specific <code>user_id</code>. This
|
||
endpoint differs from
|
||
<a href="#list-joined-rooms-of-a-user"><code>GET /_synapse/admin/v1/users/<user_id>/joined_rooms</code></a>
|
||
in that it returns rooms with memberships other than “join”.</p>
|
||
<p>The API is:</p>
|
||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/memberships
|
||
</code></pre>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json"> {
|
||
"memberships": {
|
||
"!DuGcnbhHGaSZQoNQR:matrix.org": "join",
|
||
"!ZtSaPCawyWtxfWiIy:matrix.org": "leave",
|
||
}
|
||
}
|
||
</code></pre>
|
||
<p>which is a list of room membership states for the given user. This endpoint can
|
||
be used with both local and remote users, with the caveat that the homeserver will
|
||
only be aware of the memberships for rooms that one of its local users has joined.</p>
|
||
<p>Remote user memberships may also be out of date if all local users have since left
|
||
a room. The homeserver will thus no longer receive membership updates about it.</p>
|
||
<p>The list includes rooms that the user has since left; other membership states (knock,
|
||
invite, etc.) are also possible.</p>
|
||
<p>Note that rooms will only disappear from this list if they are
|
||
<a href="./rooms.html#delete-room-api">purged</a> from the homeserver.</p>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - fully qualified: for example, <code>@user:server.com</code>.</li>
|
||
</ul>
|
||
<p><strong>Response</strong></p>
|
||
<p>The following fields are returned in the JSON response body:</p>
|
||
<ul>
|
||
<li><code>memberships</code> - A map of <code>room_id</code> (string) to <code>membership</code> state (string).</li>
|
||
</ul>
|
||
<h2 id="list-joined-rooms-of-a-user"><a class="header" href="#list-joined-rooms-of-a-user">List joined rooms of a user</a></h2>
|
||
<p>Gets a list of all <code>room_id</code> that a specific <code>user_id</code> is joined to and is a member of (participating in).</p>
|
||
<p>The API is:</p>
|
||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/joined_rooms
|
||
</code></pre>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json"> {
|
||
"joined_rooms": [
|
||
"!DuGcnbhHGaSZQoNQR:matrix.org",
|
||
"!ZtSaPCawyWtxfWiIy:matrix.org"
|
||
],
|
||
"total": 2
|
||
}
|
||
</code></pre>
|
||
<p>The server returns the list of rooms of which the user and the server
|
||
are member. If the user is local, all the rooms of which the user is
|
||
member are returned.</p>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - fully qualified: for example, <code>@user:server.com</code>.</li>
|
||
</ul>
|
||
<p><strong>Response</strong></p>
|
||
<p>The following fields are returned in the JSON response body:</p>
|
||
<ul>
|
||
<li><code>joined_rooms</code> - An array of <code>room_id</code>.</li>
|
||
<li><code>total</code> - Number of rooms.</li>
|
||
</ul>
|
||
<h2 id="get-the-number-of-invites-sent-by-the-user"><a class="header" href="#get-the-number-of-invites-sent-by-the-user">Get the number of invites sent by the user</a></h2>
|
||
<p>Fetches the number of invites sent by the provided user ID across all rooms
|
||
after the given timestamp.</p>
|
||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/sent_invite_count
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code>: fully qualified: for example, <code>@user:server.com</code></li>
|
||
</ul>
|
||
<p>The following should be set as query parameters in the URL:</p>
|
||
<ul>
|
||
<li><code>from_ts</code>: int, required. A timestamp in ms from the unix epoch. Only
|
||
invites sent at or after the provided timestamp will be returned.
|
||
This works by comparing the provided timestamp to the <code>received_ts</code>
|
||
column in the <code>events</code> table.
|
||
Note: https://currentmillis.com/ is a useful tool for converting dates
|
||
into timestamps and vice versa.</li>
|
||
</ul>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"invite_count": 30
|
||
}
|
||
</code></pre>
|
||
<p><em>Added in Synapse 1.122.0</em></p>
|
||
<h2 id="get-the-cumulative-number-of-rooms-a-user-has-joined-after-a-given-timestamp"><a class="header" href="#get-the-cumulative-number-of-rooms-a-user-has-joined-after-a-given-timestamp">Get the cumulative number of rooms a user has joined after a given timestamp</a></h2>
|
||
<p>Fetches the number of rooms that the user joined after the given timestamp, even
|
||
if they have subsequently left/been banned from those rooms.</p>
|
||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/cumulative_joined_room_count
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code>: fully qualified: for example, <code>@user:server.com</code></li>
|
||
</ul>
|
||
<p>The following should be set as query parameters in the URL:</p>
|
||
<ul>
|
||
<li><code>from_ts</code>: int, required. A timestamp in ms from the unix epoch. Only
|
||
invites sent at or after the provided timestamp will be returned.
|
||
This works by comparing the provided timestamp to the <code>received_ts</code>
|
||
column in the <code>events</code> table.
|
||
Note: https://currentmillis.com/ is a useful tool for converting dates
|
||
into timestamps and vice versa.</li>
|
||
</ul>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"cumulative_joined_room_count": 30
|
||
}
|
||
</code></pre>
|
||
<p><em>Added in Synapse 1.122.0</em></p>
|
||
<h2 id="account-data"><a class="header" href="#account-data">Account Data</a></h2>
|
||
<p>Gets information about account data for a specific <code>user_id</code>.</p>
|
||
<p>The API is:</p>
|
||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/accountdata
|
||
</code></pre>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"account_data": {
|
||
"global": {
|
||
"m.secret_storage.key.LmIGHTg5W": {
|
||
"algorithm": "m.secret_storage.v1.aes-hmac-sha2",
|
||
"iv": "fwjNZatxg==",
|
||
"mac": "eWh9kNnLWZUNOgnc="
|
||
},
|
||
"im.vector.hide_profile": {
|
||
"hide_profile": true
|
||
},
|
||
"org.matrix.preview_urls": {
|
||
"disable": false
|
||
},
|
||
"im.vector.riot.breadcrumb_rooms": {
|
||
"rooms": [
|
||
"!LxcBDAsDUVAfJDEo:matrix.org",
|
||
"!MAhRxqasbItjOqxu:matrix.org"
|
||
]
|
||
},
|
||
"m.accepted_terms": {
|
||
"accepted": [
|
||
"https://example.org/somewhere/privacy-1.2-en.html",
|
||
"https://example.org/somewhere/terms-2.0-en.html"
|
||
]
|
||
},
|
||
"im.vector.setting.breadcrumbs": {
|
||
"recent_rooms": [
|
||
"!MAhRxqasbItqxuEt:matrix.org",
|
||
"!ZtSaPCawyWtxiImy:matrix.org"
|
||
]
|
||
}
|
||
},
|
||
"rooms": {
|
||
"!GUdfZSHUJibpiVqHYd:matrix.org": {
|
||
"m.fully_read": {
|
||
"event_id": "$156334540fYIhZ:matrix.org"
|
||
}
|
||
},
|
||
"!tOZwOOiqwCYQkLhV:matrix.org": {
|
||
"m.fully_read": {
|
||
"event_id": "$xjsIyp4_NaVl2yPvIZs_k1Jl8tsC_Sp23wjqXPno"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - fully qualified: for example, <code>@user:server.com</code>.</li>
|
||
</ul>
|
||
<p><strong>Response</strong></p>
|
||
<p>The following fields are returned in the JSON response body:</p>
|
||
<ul>
|
||
<li><code>account_data</code> - A map containing the account data for the user
|
||
<ul>
|
||
<li><code>global</code> - A map containing the global account data for the user</li>
|
||
<li><code>rooms</code> - A map containing the account data per room for the user</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<h2 id="user-media"><a class="header" href="#user-media">User media</a></h2>
|
||
<h3 id="list-media-uploaded-by-a-user"><a class="header" href="#list-media-uploaded-by-a-user">List media uploaded by a user</a></h3>
|
||
<p>Gets a list of all local media that a specific <code>user_id</code> has created.
|
||
These are media that the user has uploaded themselves
|
||
(<a href="../media_repository.html#local-media">local media</a>), as well as
|
||
<a href="../media_repository.html#url-previews">URL preview images</a> requested by the user if the
|
||
<a href="../usage/configuration/config_documentation.html#url_preview_enabled">feature is enabled</a>.</p>
|
||
<p>By default, the response is ordered by descending creation date and ascending media ID.
|
||
The newest media is on top. You can change the order with parameters
|
||
<code>order_by</code> and <code>dir</code>.</p>
|
||
<p>The API is:</p>
|
||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/media
|
||
</code></pre>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"media": [
|
||
{
|
||
"created_ts": 100400,
|
||
"last_access_ts": null,
|
||
"media_id": "qXhyRzulkwLsNHTbpHreuEgo",
|
||
"media_length": 67,
|
||
"media_type": "image/png",
|
||
"quarantined_by": null,
|
||
"safe_from_quarantine": false,
|
||
"upload_name": "test1.png"
|
||
},
|
||
{
|
||
"created_ts": 200400,
|
||
"last_access_ts": null,
|
||
"media_id": "FHfiSnzoINDatrXHQIXBtahw",
|
||
"media_length": 67,
|
||
"media_type": "image/png",
|
||
"quarantined_by": null,
|
||
"safe_from_quarantine": false,
|
||
"upload_name": "test2.png"
|
||
},
|
||
{
|
||
"created_ts": 300400,
|
||
"last_access_ts": 300700,
|
||
"media_id": "BzYNLRUgGHphBkdKGbzXwbjX",
|
||
"media_length": 1337,
|
||
"media_type": "application/octet-stream",
|
||
"quarantined_by": null,
|
||
"safe_from_quarantine": false,
|
||
"upload_name": null
|
||
}
|
||
],
|
||
"next_token": 3,
|
||
"total": 2
|
||
}
|
||
</code></pre>
|
||
<p>To paginate, check for <code>next_token</code> and if present, call the endpoint again
|
||
with <code>from</code> set to the value of <code>next_token</code>. This will return a new page.</p>
|
||
<p>If the endpoint does not return a <code>next_token</code> then there are no more
|
||
reports to paginate through.</p>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>user_id</code> - string - fully qualified: for example, <code>@user:server.com</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>limit</code>: string representing a positive integer - Is optional but is used for pagination,
|
||
denoting the maximum number of items to return in this call. Defaults to <code>100</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>from</code>: string representing a positive integer - Is optional but used for pagination,
|
||
denoting the offset in the returned results. This should be treated as an opaque value and
|
||
not explicitly set to anything other than the return value of <code>next_token</code> from a previous call.
|
||
Defaults to <code>0</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>order_by</code> - The method by which to sort the returned list of media.
|
||
If the ordered field has duplicates, the second order is always by ascending <code>media_id</code>,
|
||
which guarantees a stable ordering. Valid values are:</p>
|
||
<ul>
|
||
<li><code>media_id</code> - Media are ordered alphabetically by <code>media_id</code>.</li>
|
||
<li><code>upload_name</code> - Media are ordered alphabetically by name the media was uploaded with.</li>
|
||
<li><code>created_ts</code> - Media are ordered by when the content was uploaded in ms.
|
||
Smallest to largest. This is the default.</li>
|
||
<li><code>last_access_ts</code> - Media are ordered by when the content was last accessed in ms.
|
||
Smallest to largest.</li>
|
||
<li><code>media_length</code> - Media are ordered by length of the media in bytes.
|
||
Smallest to largest.</li>
|
||
<li><code>media_type</code> - Media are ordered alphabetically by MIME-type.</li>
|
||
<li><code>quarantined_by</code> - Media are ordered alphabetically by the user ID that
|
||
initiated the quarantine request for this media.</li>
|
||
<li><code>safe_from_quarantine</code> - Media are ordered by the status if this media is safe
|
||
from quarantining.</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p><code>dir</code> - Direction of media order. Either <code>f</code> for forwards or <code>b</code> for backwards.
|
||
Setting this value to <code>b</code> will reverse the above sort order. Defaults to <code>f</code>.</p>
|
||
</li>
|
||
</ul>
|
||
<p>If neither <code>order_by</code> nor <code>dir</code> is set, the default order is newest media on top
|
||
(corresponds to <code>order_by</code> = <code>created_ts</code> and <code>dir</code> = <code>b</code>).</p>
|
||
<p>Caution. The database only has indexes on the columns <code>media_id</code>,
|
||
<code>user_id</code> and <code>created_ts</code>. This means that if a different sort order is used
|
||
(<code>upload_name</code>, <code>last_access_ts</code>, <code>media_length</code>, <code>media_type</code>,
|
||
<code>quarantined_by</code> or <code>safe_from_quarantine</code>), this can cause a large load on the
|
||
database, especially for large environments.</p>
|
||
<p><strong>Response</strong></p>
|
||
<p>The following fields are returned in the JSON response body:</p>
|
||
<ul>
|
||
<li><code>media</code> - An array of objects, each containing information about a media.
|
||
Media objects contain the following fields:
|
||
<ul>
|
||
<li><code>created_ts</code> - integer - Timestamp when the content was uploaded in ms.</li>
|
||
<li><code>last_access_ts</code> - integer or null - Timestamp when the content was last accessed in ms.
|
||
Null if there was no access, yet.</li>
|
||
<li><code>media_id</code> - string - The id used to refer to the media. Details about the format
|
||
are documented under
|
||
<a href="../media_repository.html">media repository</a>.</li>
|
||
<li><code>media_length</code> - integer - Length of the media in bytes.</li>
|
||
<li><code>media_type</code> - string - The MIME-type of the media.</li>
|
||
<li><code>quarantined_by</code> - string or null - The user ID that initiated the quarantine request
|
||
for this media. Null if not quarantined.</li>
|
||
<li><code>safe_from_quarantine</code> - bool - Status if this media is safe from quarantining.</li>
|
||
<li><code>upload_name</code> - string or null - The name the media was uploaded with. Null if not provided during upload.</li>
|
||
</ul>
|
||
</li>
|
||
<li><code>next_token</code>: integer - Indication for pagination. See above.</li>
|
||
<li><code>total</code> - integer - Total number of media.</li>
|
||
</ul>
|
||
<h3 id="delete-media-uploaded-by-a-user"><a class="header" href="#delete-media-uploaded-by-a-user">Delete media uploaded by a user</a></h3>
|
||
<p>This API deletes the <em>local</em> media from the disk of your own server
|
||
that a specific <code>user_id</code> has created. This includes any local thumbnails.</p>
|
||
<p>This API will not affect media that has been uploaded to external
|
||
media repositories (e.g https://github.com/turt2live/matrix-media-repo/).</p>
|
||
<p>By default, the API deletes media ordered by descending creation date and ascending media ID.
|
||
The newest media is deleted first. You can change the order with parameters
|
||
<code>order_by</code> and <code>dir</code>. If no <code>limit</code> is set the API deletes <code>100</code> files per request.</p>
|
||
<p>The API is:</p>
|
||
<pre><code>DELETE /_synapse/admin/v1/users/<user_id>/media
|
||
</code></pre>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"deleted_media": [
|
||
"abcdefghijklmnopqrstuvwx"
|
||
],
|
||
"total": 1
|
||
}
|
||
</code></pre>
|
||
<p>The following fields are returned in the JSON response body:</p>
|
||
<ul>
|
||
<li><code>deleted_media</code>: an array of strings - List of deleted <code>media_id</code></li>
|
||
<li><code>total</code>: integer - Total number of deleted <code>media_id</code></li>
|
||
</ul>
|
||
<p><strong>Note</strong>: There is no <code>next_token</code>. This is not useful for deleting media, because
|
||
after deleting media the remaining media have a new order.</p>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>This API has the same parameters as
|
||
<a href="#list-media-uploaded-by-a-user">List media uploaded by a user</a>.
|
||
With the parameters you can for example limit the number of files to delete at once or
|
||
delete largest/smallest or newest/oldest files first.</p>
|
||
<h2 id="login-as-a-user"><a class="header" href="#login-as-a-user">Login as a user</a></h2>
|
||
<p><strong>Note:</strong> This API is disabled when MSC3861 is enabled. <a href="https://github.com/matrix-org/synapse/pull/15582">See #15582</a></p>
|
||
<p>Get an access token that can be used to authenticate as that user. Useful for
|
||
when admins wish to do actions on behalf of a user.</p>
|
||
<p>The API is:</p>
|
||
<pre><code>POST /_synapse/admin/v1/users/<user_id>/login
|
||
{}
|
||
</code></pre>
|
||
<p>An optional <code>valid_until_ms</code> field can be specified in the request body as an
|
||
integer timestamp that specifies when the token should expire. By default tokens
|
||
do not expire. Note that this API does not allow a user to login as themselves
|
||
(to create more tokens).</p>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"access_token": "<opaque_access_token_string>"
|
||
}
|
||
</code></pre>
|
||
<p>This API does <em>not</em> generate a new device for the user, and so will not appear
|
||
their <code>/devices</code> list, and in general the target user should not be able to
|
||
tell they have been logged in as.</p>
|
||
<p>To expire the token call the standard <code>/logout</code> API with the token.</p>
|
||
<p>Note: The token will expire if the <em>admin</em> user calls <code>/logout/all</code> from any
|
||
of their devices, but the token will <em>not</em> expire if the target user does the
|
||
same.</p>
|
||
<h2 id="allow-replacing-master-cross-signing-key-without-user-interactive-auth"><a class="header" href="#allow-replacing-master-cross-signing-key-without-user-interactive-auth">Allow replacing master cross-signing key without User-Interactive Auth</a></h2>
|
||
<p>This endpoint is not intended for server administrator usage;
|
||
we describe it here for completeness.</p>
|
||
<p>This API temporarily permits a user to replace their master cross-signing key
|
||
without going through
|
||
<a href="https://spec.matrix.org/v1.8/client-server-api/#user-interactive-authentication-api">user-interactive authentication</a> (UIA).
|
||
This is useful when Synapse has delegated its authentication to the
|
||
<a href="https://github.com/matrix-org/matrix-authentication-service/">Matrix Authentication Service</a>;
|
||
as Synapse cannot perform UIA is not possible in these circumstances.</p>
|
||
<p>The API is</p>
|
||
<pre><code class="language-http request">POST /_synapse/admin/v1/users/<user_id>/_allow_cross_signing_replacement_without_uia
|
||
{}
|
||
</code></pre>
|
||
<p>If the user does not exist, or does exist but has no master cross-signing key,
|
||
this will return with status code <code>404 Not Found</code>.</p>
|
||
<p>Otherwise, a response body like the following is returned, with status <code>200 OK</code>:</p>
|
||
<pre><code class="language-json">{
|
||
"updatable_without_uia_before_ms": 1234567890
|
||
}
|
||
</code></pre>
|
||
<p>The response body is a JSON object with a single field:</p>
|
||
<ul>
|
||
<li><code>updatable_without_uia_before_ms</code>: integer. The timestamp in milliseconds
|
||
before which the user is permitted to replace their cross-signing key without
|
||
going through UIA.</li>
|
||
</ul>
|
||
<p><em>Added in Synapse 1.97.0.</em></p>
|
||
<h2 id="user-devices"><a class="header" href="#user-devices">User devices</a></h2>
|
||
<h3 id="list-all-devices"><a class="header" href="#list-all-devices">List all devices</a></h3>
|
||
<p>Gets information about all devices for a specific <code>user_id</code>.</p>
|
||
<p>The API is:</p>
|
||
<pre><code>GET /_synapse/admin/v2/users/<user_id>/devices
|
||
</code></pre>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"devices": [
|
||
{
|
||
"device_id": "QBUAZIFURK",
|
||
"display_name": "android",
|
||
"last_seen_ip": "1.2.3.4",
|
||
"last_seen_user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0",
|
||
"last_seen_ts": 1474491775024,
|
||
"user_id": "<user_id>",
|
||
"dehydrated": false
|
||
},
|
||
{
|
||
"device_id": "AUIECTSRND",
|
||
"display_name": "ios",
|
||
"last_seen_ip": "1.2.3.5",
|
||
"last_seen_user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0",
|
||
"last_seen_ts": 1474491775025,
|
||
"user_id": "<user_id>",
|
||
"dehydrated": false
|
||
}
|
||
],
|
||
"total": 2
|
||
}
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - fully qualified: for example, <code>@user:server.com</code>.</li>
|
||
</ul>
|
||
<p><strong>Response</strong></p>
|
||
<p>The following fields are returned in the JSON response body:</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>devices</code> - An array of objects, each containing information about a device.
|
||
Device objects contain the following fields:</p>
|
||
<ul>
|
||
<li><code>device_id</code> - Identifier of device.</li>
|
||
<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).</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>
|
||
<li><code>dehydrated</code> - Whether the device is a dehydrated device.</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p><code>total</code> - Total number of user’s devices.</p>
|
||
</li>
|
||
</ul>
|
||
<h3 id="create-a-device"><a class="header" href="#create-a-device">Create a device</a></h3>
|
||
<p>Creates a new device for a specific <code>user_id</code> and <code>device_id</code>. Does nothing if the <code>device_id</code>
|
||
exists already.</p>
|
||
<p>The API is:</p>
|
||
<pre><code>POST /_synapse/admin/v2/users/<user_id>/devices
|
||
|
||
{
|
||
"device_id": "QBUAZIFURK"
|
||
}
|
||
</code></pre>
|
||
<p>An empty JSON dict is returned.</p>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - fully qualified: for example, <code>@user:server.com</code>.</li>
|
||
</ul>
|
||
<p>The following fields are required in the JSON request body:</p>
|
||
<ul>
|
||
<li><code>device_id</code> - The device ID to create.</li>
|
||
</ul>
|
||
<h3 id="delete-multiple-devices"><a class="header" href="#delete-multiple-devices">Delete multiple devices</a></h3>
|
||
<p>Deletes the given devices for a specific <code>user_id</code>, and invalidates
|
||
any access token associated with them.</p>
|
||
<p>The API is:</p>
|
||
<pre><code>POST /_synapse/admin/v2/users/<user_id>/delete_devices
|
||
|
||
{
|
||
"devices": [
|
||
"QBUAZIFURK",
|
||
"AUIECTSRND"
|
||
]
|
||
}
|
||
</code></pre>
|
||
<p>An empty JSON dict is returned.</p>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - fully qualified: for example, <code>@user:server.com</code>.</li>
|
||
</ul>
|
||
<p>The following fields are required in the JSON request body:</p>
|
||
<ul>
|
||
<li><code>devices</code> - The list of device IDs to delete.</li>
|
||
</ul>
|
||
<h3 id="show-a-device"><a class="header" href="#show-a-device">Show a device</a></h3>
|
||
<p>Gets information on a single device, by <code>device_id</code> for a specific <code>user_id</code>.</p>
|
||
<p>The API is:</p>
|
||
<pre><code>GET /_synapse/admin/v2/users/<user_id>/devices/<device_id>
|
||
</code></pre>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"device_id": "<device_id>",
|
||
"display_name": "android",
|
||
"last_seen_ip": "1.2.3.4",
|
||
"last_seen_user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0",
|
||
"last_seen_ts": 1474491775024,
|
||
"user_id": "<user_id>"
|
||
}
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - fully qualified: for example, <code>@user:server.com</code>.</li>
|
||
<li><code>device_id</code> - The device to retrieve.</li>
|
||
</ul>
|
||
<p><strong>Response</strong></p>
|
||
<p>The following fields are returned in the JSON response body:</p>
|
||
<ul>
|
||
<li><code>device_id</code> - Identifier of device.</li>
|
||
<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>
|
||
</ul>
|
||
<h3 id="update-a-device"><a class="header" href="#update-a-device">Update a device</a></h3>
|
||
<p>Updates the metadata on the given <code>device_id</code> for a specific <code>user_id</code>.</p>
|
||
<p>The API is:</p>
|
||
<pre><code>PUT /_synapse/admin/v2/users/<user_id>/devices/<device_id>
|
||
|
||
{
|
||
"display_name": "My other phone"
|
||
}
|
||
</code></pre>
|
||
<p>An empty JSON dict is returned.</p>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - fully qualified: for example, <code>@user:server.com</code>.</li>
|
||
<li><code>device_id</code> - The device to update.</li>
|
||
</ul>
|
||
<p>The following fields are required in the JSON request body:</p>
|
||
<ul>
|
||
<li><code>display_name</code> - The new display name for this device. If not given,
|
||
the display name is unchanged.</li>
|
||
</ul>
|
||
<h3 id="delete-a-device"><a class="header" href="#delete-a-device">Delete a device</a></h3>
|
||
<p>Deletes the given <code>device_id</code> for a specific <code>user_id</code>,
|
||
and invalidates any access token associated with it.</p>
|
||
<p>The API is:</p>
|
||
<pre><code>DELETE /_synapse/admin/v2/users/<user_id>/devices/<device_id>
|
||
|
||
{}
|
||
</code></pre>
|
||
<p>An empty JSON dict is returned.</p>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - fully qualified: for example, <code>@user:server.com</code>.</li>
|
||
<li><code>device_id</code> - The device to delete.</li>
|
||
</ul>
|
||
<h2 id="list-all-pushers"><a class="header" href="#list-all-pushers">List all pushers</a></h2>
|
||
<p>Gets information about all pushers for a specific <code>user_id</code>.</p>
|
||
<p>The API is:</p>
|
||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/pushers
|
||
</code></pre>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"pushers": [
|
||
{
|
||
"app_display_name":"HTTP Push Notifications",
|
||
"app_id":"m.http",
|
||
"data": {
|
||
"url":"example.com"
|
||
},
|
||
"device_display_name":"pushy push",
|
||
"kind":"http",
|
||
"lang":"None",
|
||
"profile_tag":"",
|
||
"pushkey":"a@example.com"
|
||
}
|
||
],
|
||
"total": 1
|
||
}
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - fully qualified: for example, <code>@user:server.com</code>.</li>
|
||
</ul>
|
||
<p><strong>Response</strong></p>
|
||
<p>The following fields are returned in the JSON response body:</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>pushers</code> - An array containing the current pushers for the user</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>app_display_name</code> - string - A string that will allow the user to identify
|
||
what application owns this pusher.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>app_id</code> - string - This is a reverse-DNS style identifier for the application.
|
||
Max length, 64 chars.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>data</code> - A dictionary of information for the pusher implementation itself.</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>url</code> - string - Required if <code>kind</code> is <code>http</code>. The URL to use to send
|
||
notifications to.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>format</code> - string - The format to use when sending notifications to the
|
||
Push Gateway.</p>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p><code>device_display_name</code> - string - A string that will allow the user to identify
|
||
what device owns this pusher.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>profile_tag</code> - string - This string determines which set of device specific rules
|
||
this pusher executes.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>kind</code> - string - The kind of pusher. “http” is a pusher that sends HTTP pokes.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>lang</code> - string - The preferred language for receiving notifications
|
||
(e.g. ‘en’ or ‘en-US’)</p>
|
||
</li>
|
||
<li>
|
||
<p><code>profile_tag</code> - string - This string determines which set of device specific rules
|
||
this pusher executes.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>pushkey</code> - string - This is a unique identifier for this pusher.
|
||
Max length, 512 bytes.</p>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p><code>total</code> - integer - Number of pushers.</p>
|
||
</li>
|
||
</ul>
|
||
<p>See also the
|
||
<a href="https://matrix.org/docs/spec/client_server/latest#get-matrix-client-r0-pushers">Client-Server API Spec on pushers</a>.</p>
|
||
<h2 id="controlling-whether-a-user-is-shadow-banned"><a class="header" href="#controlling-whether-a-user-is-shadow-banned">Controlling whether a user is shadow-banned</a></h2>
|
||
<p>Shadow-banning is a useful tool for moderating malicious or egregiously abusive users.
|
||
A shadow-banned users receives successful responses to their client-server API requests,
|
||
but the events are not propagated into rooms. This can be an effective tool as it
|
||
(hopefully) takes longer for the user to realise they are being moderated before
|
||
pivoting to another account.</p>
|
||
<p>Shadow-banning a user should be used as a tool of last resort and may lead to confusing
|
||
or broken behaviour for the client. A shadow-banned user will not receive any
|
||
notification and it is generally more appropriate to ban or kick abusive users.
|
||
A shadow-banned user will be unable to contact anyone on the server.</p>
|
||
<p>To shadow-ban a user the API is:</p>
|
||
<pre><code>POST /_synapse/admin/v1/users/<user_id>/shadow_ban
|
||
</code></pre>
|
||
<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>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>
|
||
<ul>
|
||
<li><code>user_id</code> - The fully qualified MXID: for example, <code>@user:server.com</code>. The user must
|
||
be local.</li>
|
||
</ul>
|
||
<h2 id="override-ratelimiting-for-users"><a class="header" href="#override-ratelimiting-for-users">Override ratelimiting for users</a></h2>
|
||
<p>This API allows to override or disable ratelimiting for a specific user.
|
||
There are specific APIs to set, get and delete a ratelimit.</p>
|
||
<h3 id="get-status-of-ratelimit"><a class="header" href="#get-status-of-ratelimit">Get status of ratelimit</a></h3>
|
||
<p>The API is:</p>
|
||
<pre><code>GET /_synapse/admin/v1/users/<user_id>/override_ratelimit
|
||
</code></pre>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"messages_per_second": 0,
|
||
"burst_count": 0
|
||
}
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - The fully qualified MXID: for example, <code>@user:server.com</code>. The user must
|
||
be local.</li>
|
||
</ul>
|
||
<p><strong>Response</strong></p>
|
||
<p>The following fields are returned in the JSON response body:</p>
|
||
<ul>
|
||
<li><code>messages_per_second</code> - integer - The number of actions that can
|
||
be performed in a second. <code>0</code> mean that ratelimiting is disabled for this user.</li>
|
||
<li><code>burst_count</code> - integer - How many actions that can be performed before
|
||
being limited.</li>
|
||
</ul>
|
||
<p>If <strong>no</strong> custom ratelimit is set, an empty JSON dict is returned.</p>
|
||
<pre><code class="language-json">{}
|
||
</code></pre>
|
||
<h3 id="set-ratelimit"><a class="header" href="#set-ratelimit">Set ratelimit</a></h3>
|
||
<p>The API is:</p>
|
||
<pre><code>POST /_synapse/admin/v1/users/<user_id>/override_ratelimit
|
||
</code></pre>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"messages_per_second": 0,
|
||
"burst_count": 0
|
||
}
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - The fully qualified MXID: for example, <code>@user:server.com</code>. The user must
|
||
be local.</li>
|
||
</ul>
|
||
<p>Body parameters:</p>
|
||
<ul>
|
||
<li><code>messages_per_second</code> - positive integer, optional. The number of actions that can
|
||
be performed in a second. Defaults to <code>0</code>.</li>
|
||
<li><code>burst_count</code> - positive integer, optional. How many actions that can be performed
|
||
before being limited. Defaults to <code>0</code>.</li>
|
||
</ul>
|
||
<p>To disable users’ ratelimit set both values to <code>0</code>.</p>
|
||
<p><strong>Response</strong></p>
|
||
<p>The following fields are returned in the JSON response body:</p>
|
||
<ul>
|
||
<li><code>messages_per_second</code> - integer - The number of actions that can
|
||
be performed in a second.</li>
|
||
<li><code>burst_count</code> - integer - How many actions that can be performed before
|
||
being limited.</li>
|
||
</ul>
|
||
<h3 id="delete-ratelimit"><a class="header" href="#delete-ratelimit">Delete ratelimit</a></h3>
|
||
<p>The API is:</p>
|
||
<pre><code>DELETE /_synapse/admin/v1/users/<user_id>/override_ratelimit
|
||
</code></pre>
|
||
<p>An empty JSON dict is returned.</p>
|
||
<pre><code class="language-json">{}
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - The fully qualified MXID: for example, <code>@user:server.com</code>. The user must
|
||
be local.</li>
|
||
</ul>
|
||
<h2 id="check-username-availability"><a class="header" href="#check-username-availability">Check username availability</a></h2>
|
||
<p>Checks to see if a username is available, and valid, for the server. See <a href="https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-register-available">the client-server
|
||
API</a>
|
||
for more information.</p>
|
||
<p>This endpoint will work even if registration is disabled on the server, unlike
|
||
<code>/_matrix/client/r0/register/available</code>.</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>
|
||
<h2 id="find-a-user-based-on-their-id-in-an-auth-provider"><a class="header" href="#find-a-user-based-on-their-id-in-an-auth-provider">Find a user based on their ID in an auth provider</a></h2>
|
||
<p>The API is:</p>
|
||
<pre><code>GET /_synapse/admin/v1/auth_providers/<provider>/users/<external_id>
|
||
</code></pre>
|
||
<p>When a user matched the given ID for the given provider, an HTTP code <code>200</code> with a response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"user_id": "@hello:example.org"
|
||
}
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>provider</code> - The ID of the authentication provider, as advertised by the <a href="https://spec.matrix.org/latest/client-server-api/#post_matrixclientv3login"><code>GET /_matrix/client/v3/login</code></a> API in the <code>m.login.sso</code> authentication method.</li>
|
||
<li><code>external_id</code> - The user ID from the authentication provider. Usually corresponds to the <code>sub</code> claim for OIDC providers, or to the <code>uid</code> attestation for SAML2 providers.</li>
|
||
</ul>
|
||
<p>The <code>external_id</code> may have characters that are not URL-safe (typically <code>/</code>, <code>:</code> or <code>@</code>), so it is advised to URL-encode those parameters.</p>
|
||
<p><strong>Errors</strong></p>
|
||
<p>Returns a <code>404</code> HTTP status code if no user was found, with a response body like this:</p>
|
||
<pre><code class="language-json">{
|
||
"errcode":"M_NOT_FOUND",
|
||
"error":"User not found"
|
||
}
|
||
</code></pre>
|
||
<p><em>Added in Synapse 1.68.0.</em></p>
|
||
<h2 id="find-a-user-based-on-their-third-party-id-threepid-or-3pid"><a class="header" href="#find-a-user-based-on-their-third-party-id-threepid-or-3pid">Find a user based on their Third Party ID (ThreePID or 3PID)</a></h2>
|
||
<p>The API is:</p>
|
||
<pre><code>GET /_synapse/admin/v1/threepid/<medium>/users/<address>
|
||
</code></pre>
|
||
<p>When a user matched the given address for the given medium, an HTTP code <code>200</code> with a response body like the following is returned:</p>
|
||
<pre><code class="language-json">{
|
||
"user_id": "@hello:example.org"
|
||
}
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>medium</code> - Kind of third-party ID, either <code>email</code> or <code>msisdn</code>.</li>
|
||
<li><code>address</code> - Value of the third-party ID.</li>
|
||
</ul>
|
||
<p>The <code>address</code> may have characters that are not URL-safe, so it is advised to URL-encode those parameters.</p>
|
||
<p><strong>Errors</strong></p>
|
||
<p>Returns a <code>404</code> HTTP status code if no user was found, with a response body like this:</p>
|
||
<pre><code class="language-json">{
|
||
"errcode":"M_NOT_FOUND",
|
||
"error":"User not found"
|
||
}
|
||
</code></pre>
|
||
<p><em>Added in Synapse 1.72.0.</em></p>
|
||
<h2 id="redact-all-the-events-of-a-user"><a class="header" href="#redact-all-the-events-of-a-user">Redact all the events of a user</a></h2>
|
||
<p>This endpoint allows an admin to redact the events of a given user. There are no restrictions on
|
||
redactions for a local user. By default, we puppet the user who sent the message to redact it themselves.
|
||
Redactions for non-local users are issued using the admin user, and will fail in rooms where the
|
||
admin user is not admin/does not have the specified power level to issue redactions. An option
|
||
is provided to override the default and allow the admin to issue the redactions in all cases.</p>
|
||
<p>The API is</p>
|
||
<pre><code>POST /_synapse/admin/v1/user/<user_id>/redact
|
||
|
||
{
|
||
"rooms": ["!roomid1", "!roomid2"]
|
||
}
|
||
</code></pre>
|
||
<p>If an empty list is provided as the key for <code>rooms</code>, all events in all the rooms the user is member of will be redacted,
|
||
otherwise all the events in the rooms provided in the request will be redacted.</p>
|
||
<p>The API starts redaction process running, and returns immediately with a JSON body with
|
||
a redact id which can be used to query the status of the redaction process:</p>
|
||
<pre><code class="language-json">{
|
||
"redact_id": "<opaque id>"
|
||
}
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>user_id</code> - The fully qualified MXID of the user: for example, <code>@user:server.com</code>.</li>
|
||
</ul>
|
||
<p>The following JSON body parameter must be provided:</p>
|
||
<ul>
|
||
<li><code>rooms</code> - A list of rooms to redact the user’s events in. If an empty list is provided all events in all rooms
|
||
the user is a member of will be redacted</li>
|
||
</ul>
|
||
<p>The following JSON body parameters are optional:</p>
|
||
<ul>
|
||
<li><code>reason</code> - Reason the redaction is being requested, ie “spam”, “abuse”, etc. This will be included in each redaction event, and be visible to users.</li>
|
||
<li><code>limit</code> - a limit on the number of the user’s events to search for ones that can be redacted (events are redacted newest to oldest) in each room, defaults to 1000 if not provided.</li>
|
||
<li><code>use_admin</code> - If set to <code>true</code>, the admin user is used to issue the redactions, rather than puppeting the user. Useful
|
||
when the admin is also the moderator of the rooms that require redactions. Note that the redactions will fail in rooms
|
||
where the admin does not have the sufficient power level to issue the redactions.</li>
|
||
</ul>
|
||
<p><em>Added in Synapse 1.116.0.</em></p>
|
||
<h2 id="check-the-status-of-a-redaction-process"><a class="header" href="#check-the-status-of-a-redaction-process">Check the status of a redaction process</a></h2>
|
||
<p>It is possible to query the status of the background task for redacting a user’s events.
|
||
The status can be queried up to 24 hours after completion of the task,
|
||
or until Synapse is restarted (whichever happens first).</p>
|
||
<p>The API is:</p>
|
||
<pre><code>GET /_synapse/admin/v1/user/redact_status/<redact_id>
|
||
</code></pre>
|
||
<p>A response body like the following is returned:</p>
|
||
<pre><code>{
|
||
"status": "active",
|
||
"failed_redactions": [],
|
||
}
|
||
</code></pre>
|
||
<p><strong>Parameters</strong></p>
|
||
<p>The following parameters should be set in the URL:</p>
|
||
<ul>
|
||
<li><code>redact_id</code> - string - The ID for this redaction process, provided when the redaction was requested.</li>
|
||
</ul>
|
||
<p><strong>Response</strong></p>
|
||
<p>The following fields are returned in the JSON response body:</p>
|
||
<ul>
|
||
<li><code>status</code> - string - one of scheduled/active/completed/failed, indicating the status of the redaction job</li>
|
||
<li><code>failed_redactions</code> - dictionary - the keys of the dict are event ids the process was unable to redact, if any, and the values are
|
||
the corresponding error that caused the redaction to fail</li>
|
||
</ul>
|
||
<p><em>Added in Synapse 1.116.0.</em></p>
|
||
|
||
</main>
|
||
|
||
<nav class="nav-wrapper" aria-label="Page navigation">
|
||
<!-- Mobile navigation buttons -->
|
||
<a rel="prev" href="../admin_api/statistics.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
||
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg></span>
|
||
</a>
|
||
|
||
<a rel="next prefetch" href="../admin_api/version_api.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
||
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"/></svg></span>
|
||
</a>
|
||
|
||
<div style="clear: both"></div>
|
||
</nav>
|
||
</div>
|
||
</div>
|
||
|
||
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
||
<a rel="prev" href="../admin_api/statistics.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
||
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg></span>
|
||
</a>
|
||
|
||
<a rel="next prefetch" href="../admin_api/version_api.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
||
<span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"/></svg></span>
|
||
</a>
|
||
</nav>
|
||
|
||
</div>
|
||
|
||
<template id=fa-eye><span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM432 256c0 79.5-64.5 144-144 144s-144-64.5-144-144s64.5-144 144-144s144 64.5 144 144zM288 192c0 35.3-28.7 64-64 64c-11.5 0-22.3-3-31.6-8.4c-.2 2.8-.4 5.5-.4 8.4c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-2.8 0-5.6 .1-8.4 .4c5.3 9.3 8.4 20.1 8.4 31.6z"/></svg></span></template>
|
||
<template id=fa-eye-slash><span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c5.2-11.8 8-24.8 8-38.5c0-53-43-96-96-96c-2.8 0-5.6 .1-8.4 .4c5.3 9.3 8.4 20.1 8.4 31.6c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zm223.1 298L373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5z"/></svg></span></template>
|
||
<template id=fa-copy><span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M502.6 70.63l-61.25-61.25C435.4 3.371 427.2 0 418.7 0H255.1c-35.35 0-64 28.66-64 64l.0195 256C192 355.4 220.7 384 256 384h192c35.2 0 64-28.8 64-64V93.25C512 84.77 508.6 76.63 502.6 70.63zM464 320c0 8.836-7.164 16-16 16H255.1c-8.838 0-16-7.164-16-16L239.1 64.13c0-8.836 7.164-16 16-16h128L384 96c0 17.67 14.33 32 32 32h47.1V320zM272 448c0 8.836-7.164 16-16 16H63.1c-8.838 0-16-7.164-16-16L47.98 192.1c0-8.836 7.164-16 16-16H160V128H63.99c-35.35 0-64 28.65-64 64l.0098 256C.002 483.3 28.66 512 64 512h192c35.2 0 64-28.8 64-64v-32h-47.1L272 448z"/></svg></span></template>
|
||
<template id=fa-play><span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"/></svg></span></template>
|
||
<template id=fa-clock-rotate-left><span class=fa-svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M75 75L41 41C25.9 25.9 0 36.6 0 57.9V168c0 13.3 10.7 24 24 24H134.1c21.4 0 32.1-25.9 17-41l-30.8-30.8C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75zm181 53c-13.3 0-24 10.7-24 24V256c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65V152c0-13.3-10.7-24-24-24z"/></svg></span></template>
|
||
|
||
|
||
|
||
<script>
|
||
window.playground_copyable = true;
|
||
</script>
|
||
|
||
|
||
<script src="../elasticlunr-ef4e11c1.min.js"></script>
|
||
<script src="../mark-09e88c2c.min.js"></script>
|
||
<script src="../searcher-c2a407aa.js"></script>
|
||
|
||
<script src="../clipboard-1626706a.min.js"></script>
|
||
<script src="../highlight-abc7f01d.js"></script>
|
||
<script src="../book-a0b12cfe.js"></script>
|
||
|
||
<!-- Custom JS scripts -->
|
||
<script src="../docs/website_files/version-picker-a1e40922.js"></script>
|
||
<script src="../docs/website_files/version-d2c738f4.js"></script>
|
||
|
||
|
||
|
||
</div>
|
||
</body>
|
||
</html>
|