mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-02-22 22:13:43 +01:00
Merge 0bf809a399 into 3877598b1e
This commit is contained in:
commit
61e2162827
1
changelogs/client_server/newsfragments/2175.feature
Normal file
1
changelogs/client_server/newsfragments/2175.feature
Normal file
|
|
@ -0,0 +1 @@
|
|||
Add `format` query parameter to `GET /state/{eventType}/{stateKey}` to allow fetching metadata of a specific state event.
|
||||
|
|
@ -105,13 +105,31 @@ paths:
|
|||
example: ""
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: format
|
||||
x-addedInMatrixVersion: "1.16"
|
||||
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:
|
||||
type: object
|
||||
oneOf:
|
||||
- type: object
|
||||
- $ref: "../../event-schemas/schema/core-event-schema/state_event.yaml"
|
||||
examples:
|
||||
response:
|
||||
value: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue