Add format query parameter to GET /state/{eventType}/{stateKey} (#2175)
Some checks failed
Spec / 🔎 Validate OpenAPI specifications (push) Has been cancelled
Spec / 🔎 Check Event schema examples (push) Has been cancelled
Spec / 🔎 Check OpenAPI definitions examples (push) Has been cancelled
Spec / 🔎 Check JSON Schemas inline examples (push) Has been cancelled
Spec / ⚙️ Calculate baseURL for later jobs (push) Has been cancelled
Spec / 📢 Run towncrier for changelog (push) Has been cancelled
Spell Check / Spell Check with Typos (push) Has been cancelled
Spec / 🐍 Build OpenAPI definitions (push) Has been cancelled
Spec / 📖 Build the spec (push) Has been cancelled
Spec / 🔎 Validate generated HTML (push) Has been cancelled
Spec / 📖 Build the historical backup spec (push) Has been cancelled

This commit is contained in:
Tulir Asokan 2025-07-19 22:52:41 +03:00 committed by GitHub
parent 3877598b1e
commit c8380d9552
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 2 deletions

View file

@ -0,0 +1 @@
Add `format` query parameter to `GET /state/{eventType}/{stateKey}` to allow fetching metadata of a specific state event.

View file

@ -105,13 +105,31 @@ paths:
example: "" example: ""
schema: schema:
type: string 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: responses:
"200": "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: content:
application/json: application/json:
schema: schema:
type: object oneOf:
- type: object
- $ref: "../../event-schemas/schema/core-event-schema/state_event.yaml"
examples: examples:
response: response:
value: { value: {