Retrieve a portion of a space tree.

GET {{baseUrl}}/hierarchy/:roomId?suggested_only=true

Federation version of the Client-Server GET /hierarchy endpoint. Unlike the Client-Server API version, this endpoint does not paginate. Instead, all the space-room's children the requesting server could feasibly peek/join are returned. The requesting server is responsible for filtering the results further down for the user's request.

Only m.space.child state events of the room are considered. Invalid child rooms and parent events are not covered by this endpoint.

Responses to this endpoint should be cached for a period of time.

Request Params

KeyDatatypeRequiredDescription
suggested_onlybooleanOptional (default false) flag to indicate whether or not the server should only consider
suggested rooms. Suggested rooms are annotated in their m.space.child event
contents.

RESPONSES

status: OK

{"room":{"room_id":"!space:example.org","avatar_url":"mxc://example.org/abcdef","guest_can_join":false,"name":"The First Space","topic":"No other spaces were created first, ever","world_readable":true,"join_rule":"public","room_type":"m.space","num_joined_members":42,"canonical_alias":"#general:example.org","allowed_room_ids":[],"children_state":[{"type":"m.space.child","state_key":"!a:example.org","content":{"via":["remote.example.org"]},"sender":"@alice:example.org","origin_server_ts":1629413349153}]},"inaccessible_children":["!secret:example.org"],"children":[{"room_id":"!second_room:example.org","avatar_url":"mxc://example.org/abcdef2","guest_can_join":false,"name":"The ~~First~~ Second Space","topic":"Hello world","world_readable":true,"join_rule":"restricted","room_type":"m.space","num_joined_members":42,"canonical_alias":"#general:example.org","allowed_room_ids":["!upstream:example.org"],"children_state":[{"type":"m.space.child","state_key":"!b:example.org","content":{"via":["remote.example.org"]},"sender":"@alice:example.org","origin_server_ts":1629422222222}]}]}