|
|
@ -20,12 +20,12 @@ securityDefinitions:
|
|
|
|
paths:
|
|
|
|
paths:
|
|
|
|
"/rooms/{roomId}/state/{eventType}/{stateKey}":
|
|
|
|
"/rooms/{roomId}/state/{eventType}/{stateKey}":
|
|
|
|
put:
|
|
|
|
put:
|
|
|
|
summary: Send a message event to the given room.
|
|
|
|
summary: Send a state event to the given room.
|
|
|
|
description: |
|
|
|
|
description: |
|
|
|
|
State events can be sent using this endpoint. These events will be
|
|
|
|
State events can be sent using this endpoint. This endpoint is
|
|
|
|
overwritten if ``<room id>``, ``<event type>`` and ``<state key>`` all
|
|
|
|
equivalent to calling `/rooms/{roomId}/state/{eventType}/{stateKey}`
|
|
|
|
match. If the state event has an empty ``state_key``, it can be
|
|
|
|
with an empty `stateKey`. Previous state events with matching
|
|
|
|
omitted from the path.
|
|
|
|
`<roomId>` and `<eventType>`, and empty `<stateKey>`, will be overwritten.
|
|
|
|
|
|
|
|
|
|
|
|
Requests to this endpoint **cannot use transaction IDs**
|
|
|
|
Requests to this endpoint **cannot use transaction IDs**
|
|
|
|
like other ``PUT`` paths because they cannot be differentiated from the
|
|
|
|
like other ``PUT`` paths because they cannot be differentiated from the
|
|
|
@ -78,3 +78,56 @@ paths:
|
|
|
|
type: string
|
|
|
|
type: string
|
|
|
|
description: |-
|
|
|
|
description: |-
|
|
|
|
A unique identifier for the event.
|
|
|
|
A unique identifier for the event.
|
|
|
|
|
|
|
|
"/rooms/{roomId}/state/{eventType}":
|
|
|
|
|
|
|
|
put:
|
|
|
|
|
|
|
|
summary: Send a state event to the given room.
|
|
|
|
|
|
|
|
description: |
|
|
|
|
|
|
|
|
State events can be sent using this endpoint. These events will be
|
|
|
|
|
|
|
|
overwritten if ``<room id>``, ``<event type>`` and ``<state key>`` all
|
|
|
|
|
|
|
|
match. This endpoint forces the state key to be the empty string.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Requests to this endpoint **cannot use transaction IDs**
|
|
|
|
|
|
|
|
like other ``PUT`` paths because they cannot be differentiated from the
|
|
|
|
|
|
|
|
``state_key``. Furthermore, ``POST`` is unsupported on state paths.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The body of the request should be the content object of the event; the
|
|
|
|
|
|
|
|
fields in this object will vary depending on the type of event. See
|
|
|
|
|
|
|
|
`Room Events`_ for the ``m.`` event specification.
|
|
|
|
|
|
|
|
security:
|
|
|
|
|
|
|
|
- accessToken: []
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
|
|
- in: path
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
name: roomId
|
|
|
|
|
|
|
|
description: The room to set the state in
|
|
|
|
|
|
|
|
required: true
|
|
|
|
|
|
|
|
x-example: "!636q39766251:example.com"
|
|
|
|
|
|
|
|
- in: path
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
name: eventType
|
|
|
|
|
|
|
|
description: The type of event to send.
|
|
|
|
|
|
|
|
required: true
|
|
|
|
|
|
|
|
x-example: "m.room.name"
|
|
|
|
|
|
|
|
- in: body
|
|
|
|
|
|
|
|
name: body
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
type: object
|
|
|
|
|
|
|
|
example: |-
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"name": "New name for the room"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
responses:
|
|
|
|
|
|
|
|
200:
|
|
|
|
|
|
|
|
description: "An ID for the sent event."
|
|
|
|
|
|
|
|
examples:
|
|
|
|
|
|
|
|
application/json: |-
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"event_id": "YUwRidLecu"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
type: object
|
|
|
|
|
|
|
|
properties:
|
|
|
|
|
|
|
|
event_id:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
A unique identifier for the event.
|
|
|
|