diff --git a/changelogs/client_server/newsfragments/2175.feature b/changelogs/client_server/newsfragments/2175.feature new file mode 100644 index 00000000..ddd71d27 --- /dev/null +++ b/changelogs/client_server/newsfragments/2175.feature @@ -0,0 +1 @@ +Add `format` query parameter to `GET /state/{eventType}/{stateKey}` to allow fetching metadata of a specific state event. diff --git a/data/api/client-server/rooms.yaml b/data/api/client-server/rooms.yaml index a2197f34..8bbe2395 100644 --- a/data/api/client-server/rooms.yaml +++ b/data/api/client-server/rooms.yaml @@ -105,9 +105,24 @@ paths: example: "" schema: type: string + - in: query + name: format + description: |- + The format to use for the returned data. `content` (the default) will + return only the content of the state event. `event` will return the entire + event in the usual format suitable for clients, including fields like event + ID, sender and timestamp. + example: event + schema: + type: string + enum: + - content + - event responses: "200": - description: The content of the state event. + description: |- + The content of the state event, or the entire client-formatted event + if `?format=event` was used. content: application/json: schema: