Get the child events for a given parent event.
Retrieve all of the child events for a given parent event.
Note that when paginating the from token should be "after" the to token in terms of topological ordering, because it is only possible to paginate "backwards" through events, starting at from.
For example, passing a from token from page 2 of the results, and a to token from page 1, would return the empty set. The caller can use a from token from page 1 and a to token from page 2 to paginate over the same range, however.
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 ID of the room containing the parent event.
The ID of the parent event whose child events are to be returned.
Query parameters
The pagination token to stop returning results at. If not supplied, results continue up to limit or until there are no more events.
Like from, this can be a previous token from a prior call to this endpoint or from /messages or /sync.
The maximum number of results to return in a single chunk. The server can and should apply a maximum value to this parameter to avoid large responses.
Similarly, the server should apply a default value when not supplied.
Optional (default b) direction to return events from. If this is set to f, events will be returned in chronological order starting at from. If it is set to b, events will be returned in reverse chronological order, again starting at from.
Whether to additionally include events which only relate indirectly to the given event, i.e. events related to the given event via two or more direct relationships.
If set to false, only events which have a direct relation with the given event will be included.
If set to true, events which have an indirect relation with the given event will be included additionally up to a certain depth level. Homeservers SHOULD traverse at least 3 levels of relationships. Implementations MAY perform more but MUST be careful to not infinitely recurse.
The default value is false.
Response
The paginated child events which point to the parent. If no events are pointing to the parent or the pagination yields no results, an empty chunk is returned.
Example response
{
"chunk": [
{
"content": {
"membership": "join"
},
"event_id": "$26RqwJMLw-yds1GAH_QxjHRC1Da9oasK0e5VLnck_45",
"origin_server_ts": 1632489532305,
"sender": "@example:example.org",
"state_key": "@user:example.org",
"type": "m.room.member",
"unsigned": {
"age": 1567437,
"membership": "join",
"redacted_because": {
"content": {
"reason": "spam"
},
"event_id": "$Nhl3rsgHMjk-DjMJANawr9HHAhLg4GcoTYrSiYYGqEE",
"origin_server_ts": 1632491098485,
"redacts": "$26RqwJMLw-yds1GAH_QxjHRC1Da9oasK0e5VLnck_45",
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@moderator:example.org",
"type": "m.room.redaction",
"unsigned": {
"age": 1257
}
}
},
"room_id": "!jEsUZKDJdhlrceRyVU:example.org"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.