summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
authorMichael Albert <37796947+awesome-michael@users.noreply.github.com>2020-07-16 22:43:23 +0200
committerGitHub <noreply@github.com>2020-07-16 16:43:23 -0400
commitfff483ea96160912ee4e9f5f3f743b86a933058f (patch)
treea9fcc72cbbab8b54309d8cf0260402e710a3333b /docs
parentConsistently use `db_to_json` to convert from database values to JSON objects... (diff)
downloadsynapse-fff483ea96160912ee4e9f5f3f743b86a933058f.tar.xz
Add admin endpoint to get members in a room. (#7842)
Diffstat (limited to '')
-rw-r--r--docs/admin_api/rooms.md34
1 files changed, 33 insertions, 1 deletions
diff --git a/docs/admin_api/rooms.md b/docs/admin_api/rooms.md
index 3f26adc16c..15b83e9824 100644
--- a/docs/admin_api/rooms.md
+++ b/docs/admin_api/rooms.md
@@ -319,11 +319,43 @@ Response:
 }
 ```
 
+# Room Members API
+
+The Room Members admin API allows server admins to get a list of all members of a room.
+
+The response includes the following fields:
+
+* `members` - A list of all the members that are present in the room, represented by their ids.
+* `total` - Total number of members in the room.
+
+## Usage
+
+A standard request:
+
+```
+GET /_synapse/admin/v1/rooms/<room_id>/members
+
+{}
+```
+
+Response:
+
+```
+{
+  "members": [
+    "@foo:matrix.org",
+    "@bar:matrix.org",
+    "@foobar:matrix.org
+    ],
+  "total": 3
+}
+```
+
 # Delete Room API
 
 The Delete Room admin API allows server admins to remove rooms from server
 and block these rooms.
-It is a combination and improvement of "[Shutdown room](shutdown_room.md)" 
+It is a combination and improvement of "[Shutdown room](shutdown_room.md)"
 and "[Purge room](purge_room.md)" API.
 
 Shuts down a room. Moves all local users and room aliases automatically to a