Merge pull request #1110 from t3chguy/rooms/event

Document new rooms/$/event/$ API for fetching a single event (no ctx)
pull/977/head
Richard van der Hoff 7 years ago committed by GitHub
commit f7bbcd1678
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -407,7 +407,8 @@ paths:
retrieve this event e.g. by being a member in the room for this event. retrieve this event e.g. by being a member in the room for this event.
This endpoint was deprecated in r0 of this specification. Clients This endpoint was deprecated in r0 of this specification. Clients
should instead call the |/rooms/{roomId}/context/{eventId}|_ API. should instead call the |/rooms/{roomId}/event/{eventId}|_ API
or the |/rooms/{roomId}/context/{eventId}|_ API.
operationId: getOneEvent operationId: getOneEvent
security: security:
- accessToken: [] - accessToken: []

@ -27,6 +27,49 @@ produces:
securityDefinitions: securityDefinitions:
$ref: definitions/security.yaml $ref: definitions/security.yaml
paths: paths:
"/rooms/{roomId}/event/{eventId}":
get:
summary: Get a single event by event ID.
description: |-
Get a single event based on ``roomId/eventId``. You must have permission to
retrieve this event e.g. by being a member in the room for this event.
operationId: getOneRoomEvent
security:
- accessToken: []
parameters:
- in: path
type: string
name: roomId
description: The ID of the room the event is in.
required: true
x-example: "!asfDuShaf7Gafaw:matrix.org"
- in: path
type: string
name: eventId
description: The event ID to get.
required: true
x-example: "$asfDuShaf7Gafaw:matrix.org"
responses:
200:
description: The full event.
examples:
application/json: {
"content": {
"body": "Hello world!",
"msgtype": "m.text"
},
"room_id": "!wfgy43Sg4a:matrix.org",
"sender": "@bob:matrix.org",
"event_id": "$asfDuShaf7Gafaw:matrix.org",
"type": "m.room.message"
}
schema:
allOf:
- "$ref": "definitions/event-schemas/schema/core-event-schema/event.yaml"
404:
description: The event was not found or you do not have permission to read this event.
tags:
- Room participation
"/rooms/{roomId}/state/{eventType}/{stateKey}": "/rooms/{roomId}/state/{eventType}/{stateKey}":
get: get:
summary: Get the state identified by the type and key. summary: Get the state identified by the type and key.

@ -7,6 +7,8 @@ Unreleased changes
- ``POST /user_directory/search`` - ``POST /user_directory/search``
(`#1096 <https://github.com/matrix-org/matrix-doc/pull/1096>`_). (`#1096 <https://github.com/matrix-org/matrix-doc/pull/1096>`_).
- ``GET /rooms/{roomId}/event/{eventId}``
(`#1110 <https://github.com/matrix-org/matrix-doc/pull/1110>`_).
- Spec clarifications: - Spec clarifications:

@ -1447,6 +1447,9 @@ have to wait in milliseconds before they can try again.
.. |/rooms/{roomId}/context/{eventId}| replace:: ``/rooms/{roomId}/context/{eventId}`` .. |/rooms/{roomId}/context/{eventId}| replace:: ``/rooms/{roomId}/context/{eventId}``
.. _/rooms/{roomId}/context/{eventId}: #get-matrix-client-%CLIENT_MAJOR_VERSION%-rooms-roomid-context-eventid .. _/rooms/{roomId}/context/{eventId}: #get-matrix-client-%CLIENT_MAJOR_VERSION%-rooms-roomid-context-eventid
.. |/rooms/{roomId}/event/{eventId}| replace:: ``/rooms/{roomId}/event/{eventId}``
.. _/rooms/{roomId}/event/{eventId}: #get-matrix-client-%CLIENT_MAJOR_VERSION%-rooms-roomid-event-eventid
.. |/account/3pid| replace:: ``/account/3pid`` .. |/account/3pid| replace:: ``/account/3pid``
.. _/account/3pid: #post-matrix-client-%CLIENT_MAJOR_VERSION%-account-3pid .. _/account/3pid: #post-matrix-client-%CLIENT_MAJOR_VERSION%-account-3pid

Loading…
Cancel
Save