diff options
author | Travis Ralston <travpc@gmail.com> | 2021-02-02 04:16:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-02 11:16:29 +0000 |
commit | b60bb28bbc3d916586a913970298baba483efc1f (patch) | |
tree | 88a337a12cd293a98dc89158de859e800604b92f /docs | |
parent | Put SAML callback URI under /_synapse/client. (#9289) (diff) | |
download | synapse-b60bb28bbc3d916586a913970298baba483efc1f.tar.xz |
Add an admin API to get the current room state (#9168)
This could arguably replace the existing admin API for `/members`, however that is out of scope of this change. This sort of endpoint is ideal for moderation use cases as well as other applications, such as needing to retrieve various bits of information about a room to perform a task (like syncing power levels between two places). This endpoint exposes nothing more than an admin would be able to access with a `select *` query on their database.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/admin_api/rooms.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/admin_api/rooms.md b/docs/admin_api/rooms.md index f34cec1ff7..3832b36407 100644 --- a/docs/admin_api/rooms.md +++ b/docs/admin_api/rooms.md @@ -368,6 +368,36 @@ Response: } ``` +# Room State API + +The Room State admin API allows server admins to get a list of all state events in a room. + +The response includes the following fields: + +* `state` - The current state of the room at the time of request. + +## Usage + +A standard request: + +``` +GET /_synapse/admin/v1/rooms/<room_id>/state + +{} +``` + +Response: + +```json +{ + "state": [ + {"type": "m.room.create", "state_key": "", "etc": true}, + {"type": "m.room.power_levels", "state_key": "", "etc": true}, + {"type": "m.room.name", "state_key": "", "etc": true} + ] +} +``` + # Delete Room API The Delete Room admin API allows server admins to remove rooms from server |