diff --git a/api/client-server/old_sync.yaml b/api/client-server/old_sync.yaml index dd6330692..d475aba3f 100644 --- a/api/client-server/old_sync.yaml +++ b/api/client-server/old_sync.yaml @@ -407,7 +407,7 @@ paths: 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 - should instead call the |/rooms/{roomId}/context/{eventId}|_ API. + should instead call the |/rooms/{roomId}/event/{eventId}|_ API. operationId: getOneEvent security: - accessToken: [] diff --git a/api/client-server/rooms.yaml b/api/client-server/rooms.yaml index 176d9fc9e..88c2b9d94 100644 --- a/api/client-server/rooms.yaml +++ b/api/client-server/rooms.yaml @@ -27,6 +27,49 @@ produces: securityDefinitions: $ref: definitions/security.yaml 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}": get: summary: Get the state identified by the type and key. diff --git a/api/client-server/sync.yaml b/api/client-server/sync.yaml index 95cd181c4..34659dd06 100644 --- a/api/client-server/sync.yaml +++ b/api/client-server/sync.yaml @@ -366,46 +366,3 @@ paths: } tags: - Room participation - "/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