You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an admin API to get the space hierarchy (#19021)
It is often useful when investigating a space to get information about
that space and it's children. This PR adds an Admin API to return
information about a space and it's children, regardless of room
membership. Will not fetch information over federation about remote
rooms that the server is not participating in.
Copy file name to clipboardExpand all lines: docs/admin_api/rooms.md
+73Lines changed: 73 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1115,3 +1115,76 @@ Example response:
1115
1115
]
1116
1116
}
1117
1117
```
1118
+
1119
+
# Admin Space Hierarchy Endpoint
1120
+
1121
+
This API allows an admin to fetch the space/room hierarchy for a given space,
1122
+
returning details about that room and any children the room may have, paginating
1123
+
over the space tree in a depth-first manner to locate child rooms. This is
1124
+
functionally similar to the [CS Hierarchy](https://spec.matrix.org/v1.16/client-server-api/#get_matrixclientv1roomsroomidhierarchy) endpoint but does not check for
1125
+
room membership when returning room summaries.
1126
+
1127
+
The endpoint does not query other servers over federation about remote rooms
1128
+
that the server has not joined. This is a deliberate trade-off: while this
1129
+
means it will leave some holes in the hierarchy that we could otherwise
1130
+
sometimes fill in, it significantly improves the endpoint's response time and
1131
+
the admin endpoint is designed for managing rooms local to the homeserver
1132
+
anyway.
1133
+
1134
+
**Parameters**
1135
+
1136
+
The following query parameters are available:
1137
+
1138
+
*`from` - An optional pagination token, provided when there are more rooms to
1139
+
return than the limit.
1140
+
*`limit` - Maximum amount of rooms to return. Must be a non-negative integer,
1141
+
defaults to `50`.
1142
+
*`max_depth` - The maximum depth in the tree to explore, must be a non-negative
1143
+
integer. 0 would correspond to just the root room, 1 would include just the
1144
+
root room's children, etc. If not provided will recurse into the space tree without limit.
0 commit comments