Document MissingParams error message for /ari/events
[asterisk/asterisk.git] / rest-api / api-docs / events.json
1 {
2         "_copyright": "Copyright (C) 2012 - 2013, Digium, Inc.",
3         "_author": "David M. Lee, II <dlee@digium.com>",
4         "_svn_revision": "$Revision$",
5         "apiVersion": "0.0.1",
6         "swaggerVersion": "1.3",
7         "basePath": "http://localhost:8088/stasis",
8         "resourcePath": "/api-docs/events.{format}",
9         "apis": [
10                 {
11                         "path": "/events",
12                         "description": "Events from Asterisk to applications",
13                         "operations": [
14                                 {
15                                         "httpMethod": "GET",
16                                         "upgrade": "websocket",
17                                         "websocketProtocol": "ari",
18                                         "summary": "WebSocket connection for events.",
19                                         "nickname": "eventWebsocket",
20                                         "responseClass": "Message",
21                                         "parameters": [
22                                                 {
23                                                         "name": "app",
24                                                         "description": "Comma seperated list of applications to subscribe to.",
25                                                         "paramType": "query",
26                                                         "required": true,
27                                                         "allowMultiple": true,
28                                                         "dataType": "string"
29                                                 }
30                                         ]
31                                 }
32                         ]
33                 }
34         ],
35         "models": {
36                 "Message": {
37                         "id": "Message",
38                         "description": "Base type for errors and events",
39                         "discriminator": "type",
40                         "properties": {
41                                 "type": {
42                                         "type": "string",
43                                         "required": true,
44                                         "description": "Indicates the type of this message."
45                                 }
46                         }
47                 },
48                 "MissingParams": {
49                         "id": "MissingParams",
50                         "extends": "Message",
51                         "description": "Error event sent when required params are missing.",
52                         "properties": {
53                                 "params": {
54                                         "required": true,
55                                         "type": "List[string]",
56                                         "description": "A list of the missing parameters"
57                                 }
58                         }
59                 },
60                 "Event": {
61                         "id": "Event",
62                         "extends": "Message",
63                         "description": "Base type for asynchronous events from Asterisk.",
64                         "properties": {
65                                 "application": {
66                                         "type": "string",
67                                         "description": "Name of the application receiving the event.",
68                                         "required": true
69                                 },
70                                 "timestamp": {
71                                         "type": "Date",
72                                         "description": "Time at which this event was created.",
73                                         "required": false
74                                 }
75                         }
76                 },
77                 "PlaybackStarted": {
78                         "id": "PlaybackStarted",
79                         "extends": "Event",
80                         "description": "Event showing the start of a media playback operation.",
81                         "properties": {
82                                 "playback": {
83                                         "type": "Playback",
84                                         "description": "Playback control object",
85                                         "required": true
86                                 }
87                         }
88                 },
89                 "PlaybackFinished": {
90                         "id": "PlaybackFinished",
91                         "extends": "Event",
92                         "description": "Event showing the completion of a media playback operation.",
93                         "properties": {
94                                 "playback": {
95                                         "type": "Playback",
96                                         "description": "Playback control object",
97                                         "required": true
98                                 }
99                         }
100                 },
101                 "ApplicationReplaced": {
102                         "id": "ApplicationReplaced",
103                         "extends": "Event",
104                         "description": "Notification that another WebSocket has taken over for an application.\n\nAn application may only be subscribed to by a single WebSocket at a time. If multiple WebSockets attempt to subscribe to the same application, the newer WebSocket wins, and the older one receives this event.",
105                         "properties": {}
106                 },
107                 "BridgeCreated": {
108                         "id": "BridgeCreated",
109                         "extends": "Event",
110                         "description": "Notification that a bridge has been created.",
111                         "properties": {
112                                 "bridge": {
113                                         "required": true,
114                                         "type": "Bridge"
115                                 }
116                         }
117                 },
118                 "BridgeDestroyed": {
119                         "id": "BridgeDestroyed",
120                         "extends": "Event",
121                         "description": "Notification that a bridge has been destroyed.",
122                         "properties": {
123                                 "bridge": {
124                                         "required": true,
125                                         "type": "Bridge"
126                                 }
127                         }
128                 },
129                 "BridgeMerged": {
130                         "id": "BridgeMerged",
131                         "extends": "Event",
132                         "description": "Notification that one bridge has merged into another.",
133                         "properties": {
134                                 "bridge": {
135                                         "required": true,
136                                         "type": "Bridge"
137                                 },
138                                 "bridge_from": {
139                                         "required": true,
140                                         "type": "Bridge"
141                                 }
142                         }
143                 },
144                 "ChannelCreated": {
145                         "id": "ChannelCreated",
146                         "extends": "Event",
147                         "description": "Notification that a channel has been created.",
148                         "properties": {
149                                 "channel": {
150                                         "required": true,
151                                         "type": "Channel"
152                                 }
153                         }
154                 },
155                 "ChannelDestroyed": {
156                         "id": "ChannelDestroyed",
157                         "extends": "Event",
158                         "description": "Notification that a channel has been destroyed.",
159                         "properties": {
160                                 "cause": {
161                                         "required": true,
162                                         "description": "Integer representation of the cause of the hangup",
163                                         "type": "int"
164                                 },
165                                 "cause_txt": {
166                                         "required": true,
167                                         "description": "Text representation of the cause of the hangup",
168                                         "type": "string"
169                                 },
170                                 "channel": {
171                                         "required": true,
172                                         "type": "Channel"
173                                 }
174                         }
175                 },
176                 "ChannelEnteredBridge": {
177                         "id": "ChannelEnteredBridge",
178                         "extends": "Event",
179                         "description": "Notification that a channel has entered a bridge.",
180                         "properties": {
181                                 "bridge": {
182                                         "required": true,
183                                         "type": "Bridge"
184                                 },
185                                 "channel": {
186                                         "type": "Channel"
187                                 }
188                         }
189                 },
190                 "ChannelLeftBridge": {
191                         "id": "ChannelLeftBridge",
192                         "extends": "Event",
193                         "description": "Notification that a channel has left a bridge.",
194                         "properties": {
195                                 "bridge": {
196                                         "required": true,
197                                         "type": "Bridge"
198                                 },
199                                 "channel": {
200                                         "required": true,
201                                         "type": "Channel"
202                                 }
203                         }
204                 },
205                 "ChannelStateChange": {
206                         "id": "ChannelStateChange",
207                         "extends": "Event",
208                         "description": "Notification of a channel's state change.",
209                         "properties": {
210                                 "channel": {
211                                         "required": true,
212                                         "type": "Channel"
213                                 }
214                         }
215                 },
216                 "ChannelDtmfReceived": {
217                         "id": "ChannelDtmfReceived",
218                         "extends": "Event",
219                         "description": "DTMF received on a channel.\n\nThis event is sent when the DTMF ends. There is no notification about the start of DTMF",
220                         "properties": {
221                                 "digit": {
222                                         "required": true,
223                                         "type": "string",
224                                         "description": "DTMF digit received (0-9, A-E, # or *)"
225                                 },
226                                 "duration_ms": {
227                                         "required": true,
228                                         "type": "int",
229                                         "description": "Number of milliseconds DTMF was received"
230                                 },
231                                 "channel": {
232                                         "required": true,
233                                         "type": "Channel",
234                                         "description": "The channel on which DTMF was received"
235                                 }
236                         }
237                 },
238                 "ChannelDialplan": {
239                         "id": "ChannelDialplan",
240                         "extends": "Event",
241                         "description": "Channel changed location in the dialplan.",
242                         "properties": {
243                                 "channel": {
244                                         "required": true,
245                                         "type": "Channel",
246                                         "description": "The channel that changed dialplan location."
247                                 },
248                                 "dialplan_app": {
249                                         "required": true,
250                                         "type": "string",
251                                         "description": "The application about to be executed."
252                                 },
253                                 "dialplan_app_data": {
254                                         "required": true,
255                                         "type": "string",
256                                         "description": "The data to be passed to the application."
257                                 }
258                         }
259                 },
260                 "ChannelCallerId": {
261                         "id": "ChannelCallerId",
262                         "extends": "Event",
263                         "description": "Channel changed Caller ID.",
264                         "properties": {
265                                 "caller_presentation": {
266                                         "required": true,
267                                         "type": "int",
268                                         "description": "The integer representation of the Caller Presentation value."
269                                 },
270                                 "caller_presentation_txt": {
271                                         "required": true,
272                                         "type": "string",
273                                         "description": "The text representation of the Caller Presentation value."
274                                 },
275                                 "channel": {
276                                         "required": true,
277                                         "type": "Channel",
278                                         "description": "The channel that changed Caller ID."
279                                 }
280                         }
281                 },
282                 "ChannelUserevent": {
283                         "id": "ChannelUserevent",
284                         "extends": "Event",
285                         "description": "User-generated event with additional user-defined fields in the object.",
286                         "properties": {
287                                 "eventname": {
288                                         "required": true,
289                                         "type": "string",
290                                         "description": "The name of the user event."
291                                 },
292                                 "channel": {
293                                         "required": true,
294                                         "type": "Channel",
295                                         "description": "The channel that signaled the user event."
296                                 }
297                         }
298                 },
299                 "ChannelHangupRequest": {
300                         "id": "ChannelHangupRequest",
301                         "extends": "Event",
302                         "description": "A hangup was requested on the channel.",
303                         "properties": {
304                                 "cause": {
305                                         "type": "int",
306                                         "description": "Integer representation of the cause of the hangup."
307                                 },
308                                 "soft": {
309                                         "type": "boolean",
310                                         "description": "Whether the hangup request was a soft hangup request."
311                                 },
312                                 "channel": {
313                                         "required": true,
314                                         "type": "Channel",
315                                         "description": "The channel on which the hangup was requested."
316                                 }
317                         }
318                 },
319                 "ChannelVarset": {
320                         "id": "ChannelVarset",
321                         "extends": "Event",
322                         "description": "Channel variable changed.",
323                         "properties": {
324                                 "variable": {
325                                         "required": true,
326                                         "type": "string",
327                                         "description": "The variable that changed."
328                                 },
329                                 "value": {
330                                         "required": true,
331                                         "type": "string",
332                                         "description": "The new value of the variable."
333                                 },
334                                 "channel": {
335                                         "required": false,
336                                         "type": "Channel",
337                                         "description": "The channel on which the variable was set.\n\nIf missing, the variable is a global variable."
338                                 }
339                         }
340                 },
341                 "StasisEnd": {
342                         "id": "StasisEnd",
343                         "extends": "Event",
344                         "description": "Notification that a channel has left a Stasis appliction.",
345                         "properties": {
346                                 "channel": {
347                                         "required": true,
348                                         "type": "Channel"
349                                 }
350                         }
351                 },
352                 "StasisStart": {
353                         "id": "StasisStart",
354                         "extends": "Event",
355                         "description": "Notification that a channel has entered a Stasis appliction.",
356                         "properties": {
357                                 "args": {
358                                         "required": true,
359                                         "type": "List[string]",
360                                         "description": "Arguments to the application"
361                                 },
362                                 "channel": {
363                                         "required": true,
364                                         "type": "Channel"
365                                 }
366                         }
367                 }
368         }
369 }