Retrieve a portion of a space tree.
Paginates over the space tree in a depth-first manner to locate child rooms of a given space.
Where a child room is unknown to the local server, federation is used to fill in the details. The servers listed in the via array should be contacted to attempt to fill in missing rooms.
Only m.space.child state events of the room are considered. Invalid child rooms and parent events are not covered by this endpoint.
Request
- Base URLhttps://matrix.org
- Auth
- API key in query parameter access_token
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The room ID of the space to get a hierarchy for.
Query parameters
Optional (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.
Optional limit for the maximum number of rooms to include per response. Must be an integer greater than zero.
Servers should apply a default value, and impose a maximum value to avoid resource exhaustion.
Optional limit for how far to go into the space. Must be a non-negative integer.
When reached, no further child rooms will be returned.
Servers should apply a default value, and impose a maximum value to avoid resource exhaustion.
A pagination token from a previous result. If specified, max_depth and suggested_only cannot be changed from the first request.
Response
A portion of the space tree, starting at the provided room ID.
Example response
{
"rooms": [
{
"avatar_url": "mxc://example.org/abcdef",
"canonical_alias": "#general:example.org",
"guest_can_join": true,
"join_rule": "public",
"name": "General Chat",
"num_joined_members": 42,
"room_id": "!abcdefg:example.org",
"topic": "All things general"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.