summary refs log tree commit diff
path: root/docs/client-server/swagger_matrix/events
blob: ca69d34db5659469abc18189ab5d996baf9c849e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
{
  "apiVersion": "1.0.0",
  "swaggerVersion": "1.2",
  "basePath": "http://localhost:8080/matrix/client/api/v1",
  "resourcePath": "/events",
  "produces": [
    "application/json"
  ],
  "apis": [
    {
      "path": "/events",
      "operations": [
        {
          "method": "GET",
          "summary": "Listen on the event stream",
          "notes": "This can only be done by the logged in user. This will block until an event is received, or until the timeout is reached.",
          "type": "PaginationChunk",
          "nickname": "get_event_stream"
        }
      ],
      "parameters": [
        {
          "name": "from",
          "description": "The token to stream from.",
          "required": false,
          "type": "string",
          "paramType": "query"
        },
        {
          "name": "timeout",
          "description": "The maximum time in milliseconds to wait for an event.",
          "required": false,
          "type": "integer",
          "paramType": "query"
        }
      ],
      "responseMessages": [
        {
          "code": 400,
          "message": "Bad pagination token."
        }
      ]
    },
    {
      "path": "/events/{eventId}",
      "operations": [
        {
          "method": "GET",
          "summary": "Get information about a single event.",
          "notes": "Get information about a single event.",
          "type": "Event",
          "nickname": "get_event",
          "parameters": [
            {
              "name": "eventId",
              "description": "The event ID to get.",
              "required": true,
              "type": "string",
              "paramType": "path"
            }
          ],
          "responseMessages": [
            {
              "code": 404,
              "message": "Event not found."
            }
          ]
        }
      ]
    },
    {
      "path": "/initialSync",
      "operations": [
        {
          "method": "GET",
          "summary": "Get this user's current state.",
          "notes": "Get this user's current state.",
          "type": "InitialSyncResponse",
          "nickname": "initial_sync",
          "parameters": [
            {
              "name": "limit",
              "description": "The maximum number of messages to return for each room.",
              "type": "integer",
              "paramType": "query",
              "required": false
            }
          ]
        }
      ]
    },
    {
      "path": "/publicRooms",
      "operations": [
        {
          "method": "GET",
          "summary": "Get a list of publicly visible rooms.",
          "type": "PublicRoomsPaginationChunk",
          "nickname": "get_public_room_list"
        }
      ]
    }
  ],
  "models": {
    "PaginationChunk": {
      "id": "PaginationChunk",
      "properties": {
        "start": {
          "type": "string",
          "description": "A token which correlates to the first value in \"chunk\" for paginating.",
          "required": true
        },
        "end": {
          "type": "string",
          "description": "A token which correlates to the last value in \"chunk\" for paginating.",
          "required": true
        },
        "chunk": {
          "type": "array",
          "description": "An array of events.",
          "required": true,
          "items": {
            "$ref": "Event"
          }
        }
      }
    },
    "Event": {
      "id": "Event",
      "properties": {
        "event_id": {
          "type": "string",
          "description": "An ID which uniquely identifies this event.",
          "required": true
        },
        "room_id": {
          "type": "string",
          "description": "The room in which this event occurred.",
          "required": true
        }
      }
    },
    "PublicRoomInfo": {
      "id": "PublicRoomInfo",
      "properties": {
        "aliases": {
          "type": "array",
          "description": "A list of room aliases for this room.",
          "items": {
            "$ref": "string"
          }
        },
        "name": {
          "type": "string",
          "description": "The name of the room, as given by the m.room.name state event."
        },
        "room_id": {
          "type": "string",
          "description": "The room ID for this public room.",
          "required": true
        },
        "topic": {
          "type": "string",
          "description": "The topic of this room, as given by the m.room.topic state event."
        }
      }
    },
    "PublicRoomsPaginationChunk": {
      "id": "PublicRoomsPaginationChunk",
      "properties": {
        "start": {
          "type": "string",
          "description": "A token which correlates to the first value in \"chunk\" for paginating.",
          "required": true
        },
        "end": {
          "type": "string",
          "description": "A token which correlates to the last value in \"chunk\" for paginating.",
          "required": true
        },
        "chunk": {
          "type": "array",
          "description": "A list of public room data.",
          "required": true,
          "items": {
            "$ref": "PublicRoomInfo"
          }
        }
      }
    },
    "InitialSyncResponse": {
      "id": "InitialSyncResponse",
      "properties": {
        "end": {
          "type": "string",
          "description": "A streaming token which can be used with /events to continue from this snapshot of data.",
          "required": true
        },
        "presence": {
          "type": "array",
          "description": "A list of presence events.",
          "items": {
            "$ref": "Event"
          },
          "required": false
        },
        "rooms": {
          "type": "array",
          "description": "A list of initial sync room data.",
          "required": false,
          "items": {
            "$ref": "InitialSyncRoomData"
          }
        }
      }
    },
    "InitialSyncRoomData": {
      "id": "InitialSyncRoomData",
      "properties": {
        "membership": {
          "type": "string",
          "description": "This user's membership state in this room.",
          "required": true
        },
        "room_id": {
          "type": "string",
          "description": "The ID of this room.",
          "required": true
        },
        "messages": {
          "type": "PaginationChunk",
          "description": "The most recent messages for this room, governed by the limit parameter.",
          "required": false
        },
        "state": {
          "type": "array",
          "description": "A list of state events representing the current state of the room.",
          "required": false,
          "items": {
            "$ref": "Event"
          }
        }
      }
    }
  }
}