summary refs log tree commit diff
path: root/docs/admin_api
diff options
context:
space:
mode:
authorShay <hillerys@element.io>2023-04-28 11:33:45 -0700
committerGitHub <noreply@github.com>2023-04-28 11:33:45 -0700
commit89f6fb0d5a87d7415d1e67c600f47cb2b4370971 (patch)
tree18bae0fa4b5cc476af57307d17c9a3e5b2b4f8df /docs/admin_api
parentUpdate development docs referencing outdated versions of sqlite we no longer ... (diff)
downloadsynapse-89f6fb0d5a87d7415d1e67c600f47cb2b4370971.tar.xz
Add an admin API endpoint to support per-user feature flags (#15344)
Diffstat (limited to 'docs/admin_api')
-rw-r--r--docs/admin_api/experimental_features.md54
1 files changed, 54 insertions, 0 deletions
diff --git a/docs/admin_api/experimental_features.md b/docs/admin_api/experimental_features.md
new file mode 100644
index 0000000000..c1aebe4b01
--- /dev/null
+++ b/docs/admin_api/experimental_features.md
@@ -0,0 +1,54 @@
+# Experimental Features API
+
+This API allows a server administrator to enable or disable some experimental features on a per-user
+basis. Currently supported features are [msc3026](https://github.com/matrix-org/matrix-spec-proposals/pull/3026): busy 
+presence state enabled, [msc2654](https://github.com/matrix-org/matrix-spec-proposals/pull/2654): enable unread counts,
+[msc3881](https://github.com/matrix-org/matrix-spec-proposals/pull/3881): enable remotely toggling push notifications 
+for another client, and [msc3967](https://github.com/matrix-org/matrix-spec-proposals/pull/3967): do not require
+UIA when first uploading cross-signing keys. 
+
+
+To use it, you will need to authenticate by providing an `access_token`
+for a server admin: see [Admin API](../usage/administration/admin_api/).
+
+## Enabling/Disabling Features
+
+This API allows a server administrator to enable experimental features for a given user. The request must 
+provide a body containing the user id and listing the features to enable/disable in the following format:
+```json
+{
+   "features": {
+      "msc3026":true,
+      "msc2654":true
+   }
+}
+```
+where true is  used to enable the feature, and false is used to disable the feature.
+
+
+The API is:
+
+```
+PUT /_synapse/admin/v1/experimental_features/<user_id>
+```
+
+## Listing Enabled Features
+ 
+To list which features are enabled/disabled for a given user send a request to the following API:
+
+```
+GET /_synapse/admin/v1/experimental_features/<user_id>
+```
+
+It will return a list of possible features and indicate whether they are enabled or disabled for the
+user like so:
+```json
+{
+   "features": {
+      "msc3026": true,
+      "msc2654": true,
+      "msc3881": false,
+      "msc3967": false
+   }
+}
+```
\ No newline at end of file