1 files changed, 72 insertions, 3 deletions
diff --git a/docs/admin_api/user_admin_api.md b/docs/admin_api/user_admin_api.md
index a6e2e0a153..c63b7068c5 100644
--- a/docs/admin_api/user_admin_api.md
+++ b/docs/admin_api/user_admin_api.md
@@ -477,9 +477,9 @@ with a body of:
}
```
-## List room memberships of a user
+## List joined rooms of a user
-Gets a list of all `room_id` that a specific `user_id` is member.
+Gets a list of all `room_id` that a specific `user_id` is joined to and is a member of (participating in).
The API is:
@@ -516,6 +516,73 @@ The following fields are returned in the JSON response body:
- `joined_rooms` - An array of `room_id`.
- `total` - Number of rooms.
+## Get the number of invites sent by the user
+
+Fetches the number of invites sent by the provided user ID across all rooms
+after the given timestamp.
+
+```
+GET /_synapse/admin/v1/users/$user_id/sent_invite_count
+```
+
+**Parameters**
+
+The following parameters should be set in the URL:
+
+* `user_id`: fully qualified: for example, `@user:server.com`
+
+The following should be set as query parameters in the URL:
+
+* `from_ts`: 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 `received_ts`
+ column in the `events` table.
+ Note: https://currentmillis.com/ is a useful tool for converting dates
+ into timestamps and vice versa.
+
+A response body like the following is returned:
+
+```json
+{
+ "invite_count": 30
+}
+```
+
+_Added in Synapse 1.122.0_
+
+## Get the cumulative number of rooms a user has joined after a given timestamp
+
+Fetches the number of rooms that the user joined after the given timestamp, even
+if they have subsequently left/been banned from those rooms.
+
+```
+GET /_synapse/admin/v1/users/$<user_id/cumulative_joined_room_count
+```
+
+**Parameters**
+
+The following parameters should be set in the URL:
+
+* `user_id`: fully qualified: for example, `@user:server.com`
+
+The following should be set as query parameters in the URL:
+
+* `from_ts`: 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 `received_ts`
+ column in the `events` table.
+ Note: https://currentmillis.com/ is a useful tool for converting dates
+ into timestamps and vice versa.
+
+A response body like the following is returned:
+
+```json
+{
+ "cumulative_joined_room_count": 30
+}
+```
+_Added in Synapse 1.122.0_
+
## Account Data
Gets information about account data for a specific `user_id`.
@@ -1444,4 +1511,6 @@ The following fields are returned in the JSON response body:
- `failed_redactions` - 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
-_Added in Synapse 1.116.0._
\ No newline at end of file
+_Added in Synapse 1.116.0._
+
+
|