deploy: f1695ac20e
This commit is contained in:
@@ -1131,6 +1131,69 @@ that were deleted.</p>
|
||||
}
|
||||
]
|
||||
}
|
||||
</code></pre>
|
||||
<h1 id="admin-space-hierarchy-endpoint"><a class="header" href="#admin-space-hierarchy-endpoint">Admin Space Hierarchy Endpoint</a></h1>
|
||||
<p>This API allows an admin to fetch the space/room hierarchy for a given space,
|
||||
returning details about that room and any children the room may have, paginating
|
||||
over the space tree in a depth-first manner to locate child rooms. This is
|
||||
functionally similar to the <a href="https://spec.matrix.org/v1.16/client-server-api/#get_matrixclientv1roomsroomidhierarchy">CS Hierarchy</a> endpoint but does not check for
|
||||
room membership when returning room summaries.</p>
|
||||
<p>The endpoint does not query other servers over federation about remote rooms
|
||||
that the server has not joined. This is a deliberate trade-off: while this
|
||||
means it will leave some holes in the hierarchy that we could otherwise
|
||||
sometimes fill in, it significantly improves the endpoint's response time and
|
||||
the admin endpoint is designed for managing rooms local to the homeserver
|
||||
anyway.</p>
|
||||
<p><strong>Parameters</strong></p>
|
||||
<p>The following query parameters are available:</p>
|
||||
<ul>
|
||||
<li><code>from</code> - An optional pagination token, provided when there are more rooms to
|
||||
return than the limit. </li>
|
||||
<li><code>limit</code> - Maximum amount of rooms to return. Must be a non-negative integer,
|
||||
defaults to <code>50</code>.</li>
|
||||
<li><code>max_depth</code> - The maximum depth in the tree to explore, must be a non-negative
|
||||
integer. 0 would correspond to just the root room, 1 would include just the
|
||||
root room's children, etc. If not provided will recurse into the space tree without limit.</li>
|
||||
</ul>
|
||||
<p>Request:</p>
|
||||
<pre><code class="language-http">GET /_synapse/admin/v1/rooms/<room_id>/hierarchy
|
||||
</code></pre>
|
||||
<p>Response:</p>
|
||||
<pre><code class="language-json">{
|
||||
"rooms":
|
||||
[
|
||||
{ "children_state": [
|
||||
{
|
||||
"content": {
|
||||
"via": ["local_test_server"]
|
||||
},
|
||||
"origin_server_ts": 1500,
|
||||
"sender": "@user:test",
|
||||
"state_key": "!QrMkkqBSwYRIFNFCso:test",
|
||||
"type": "m.space.child"
|
||||
}
|
||||
],
|
||||
"name": "space room",
|
||||
"guest_can_join": false,
|
||||
"join_rule": "public",
|
||||
"num_joined_members": 1,
|
||||
"room_id": "!sPOpNyMHbZAoAOsOFL:test",
|
||||
"room_type": "m.space",
|
||||
"world_readable": false
|
||||
},
|
||||
|
||||
{
|
||||
"children_state": [],
|
||||
"guest_can_join": true,
|
||||
"join_rule": "invite",
|
||||
"name": "nefarious",
|
||||
"num_joined_members": 1,
|
||||
"room_id": "!QrMkkqBSwYRIFNFCso:test",
|
||||
"topic": "being bad",
|
||||
"world_readable": false}
|
||||
],
|
||||
"next_batch": "KUYmRbeSpAoaAIgOKGgyaCEn"
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user