Merge "tcptls.c: Log more informative OpenSSL errors"
[asterisk/asterisk.git] / rest-api / api-docs / recordings.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": "2.0.0",
6         "swaggerVersion": "1.1",
7         "basePath": "http://localhost:8088/ari",
8         "resourcePath": "/api-docs/recordings.{format}",
9         "requiresModules": [
10                 "res_stasis_recording"
11         ],
12         "apis": [
13                 {
14                         "path": "/recordings/stored",
15                         "description": "Recordings",
16                         "operations": [
17                                 {
18                                         "httpMethod": "GET",
19                                         "summary": "List recordings that are complete.",
20                                         "nickname": "listStored",
21                                         "responseClass": "List[StoredRecording]"
22                                 }
23                         ]
24                 },
25                 {
26                         "path": "/recordings/stored/{recordingName}",
27                         "description": "Individual recording",
28                         "operations": [
29                                 {
30                                         "httpMethod": "GET",
31                                         "summary": "Get a stored recording's details.",
32                                         "nickname": "getStored",
33                                         "responseClass": "StoredRecording",
34                                         "parameters": [
35                                                 {
36                                                         "name": "recordingName",
37                                                         "description": "The name of the recording",
38                                                         "paramType": "path",
39                                                         "required": true,
40                                                         "allowMultiple": false,
41                                                         "dataType": "string"
42                                                 }
43                                         ],
44                                         "errorResponses": [
45                                                 {
46                                                         "code": 404,
47                                                         "reason": "Recording not found"
48                                                 }
49                                         ]
50                                 },
51                                 {
52                                         "httpMethod": "DELETE",
53                                         "summary": "Delete a stored recording.",
54                                         "nickname": "deleteStored",
55                                         "responseClass": "void",
56                                         "parameters": [
57                                                 {
58                                                         "name": "recordingName",
59                                                         "description": "The name of the recording",
60                                                         "paramType": "path",
61                                                         "required": true,
62                                                         "allowMultiple": false,
63                                                         "dataType": "string"
64                                                 }
65                                         ],
66                                         "errorResponses": [
67                                                 {
68                                                         "code": 404,
69                                                         "reason": "Recording not found"
70                                                 }
71                                         ]
72                                 }
73                         ]
74                 },
75                 {
76                         "path": "/recordings/stored/{recordingName}/file",
77                         "description": "The actual file associated with the stored recording",
78                         "operations": [
79                                 {
80                                         "httpMethod": "GET",
81                                         "summary": "Get the file associated with the stored recording.",
82                                         "nickname": "getStoredFile",
83                                         "responseClass": "binary",
84                                         "parameters": [
85                                                 {
86                                                         "name": "recordingName",
87                                                         "description": "The name of the recording",
88                                                         "paramType": "path",
89                                                         "required": true,
90                                                         "allowMultiple": false,
91                                                         "dataType": "string"
92                                                 }
93                                         ],
94                                         "errorResponses": [
95                                                 {
96                                                         "code": 403,
97                                                         "reason": "The recording file could not be opened"
98                                                 },
99                                                 {
100                                                         "code": 404,
101                                                         "reason": "Recording not found"
102                                                 }
103                                         ]
104                                 }
105                         ]
106                 },
107                 {
108                         "path": "/recordings/stored/{recordingName}/copy",
109                         "description": "Copy an individual recording",
110                         "operations": [
111                                 {
112                                         "httpMethod": "POST",
113                                         "summary": "Copy a stored recording.",
114                                         "nickname": "copyStored",
115                                         "responseClass": "StoredRecording",
116                                         "parameters": [
117                                                 {
118                                                         "name": "recordingName",
119                                                         "description": "The name of the recording to copy",
120                                                         "paramType": "path",
121                                                         "required": true,
122                                                         "allowMultiple": false,
123                                                         "dataType": "string"
124                                                 },
125                                                 {
126                                                         "name": "destinationRecordingName",
127                                                         "description": "The destination name of the recording",
128                                                         "paramType": "query",
129                                                         "required": true,
130                                                         "allowMultiple": false,
131                                                         "dataType": "string"
132                                                 }
133                                         ],
134                                         "errorResponses": [
135                                                 {
136                                                         "code": 404,
137                                                         "reason": "Recording not found"
138                                                 },
139                                                 {
140                                                         "code": 409,
141                                                         "reason": "A recording with the same name already exists on the system"
142                                                 }
143                                         ]
144                                 }
145                         ]
146                 },
147                 {
148                         "path": "/recordings/live/{recordingName}",
149                         "description": "A recording that is in progress",
150                         "operations": [
151                                 {
152                                         "httpMethod": "GET",
153                                         "summary": "List live recordings.",
154                                         "nickname": "getLive",
155                                         "responseClass": "LiveRecording",
156                                         "parameters": [
157                                                 {
158                                                         "name": "recordingName",
159                                                         "description": "The name of the recording",
160                                                         "paramType": "path",
161                                                         "required": true,
162                                                         "allowMultiple": false,
163                                                         "dataType": "string"
164                                                 }
165                                         ],
166                                         "errorResponses": [
167                                                 {
168                                                         "code": 404,
169                                                         "reason": "Recording not found"
170                                                 }
171                                         ]
172                                 },
173                                 {
174                                         "httpMethod": "DELETE",
175                                         "summary": "Stop a live recording and discard it.",
176                                         "nickname": "cancel",
177                                         "responseClass": "void",
178                                         "parameters": [
179                                                 {
180                                                         "name": "recordingName",
181                                                         "description": "The name of the recording",
182                                                         "paramType": "path",
183                                                         "required": true,
184                                                         "allowMultiple": false,
185                                                         "dataType": "string"
186                                                 }
187                                         ],
188                                         "errorResponses": [
189                                                 {
190                                                         "code": 404,
191                                                         "reason": "Recording not found"
192                                                 }
193                                         ]
194                                 }
195                         ]
196                 },
197                 {
198                         "path": "/recordings/live/{recordingName}/stop",
199                         "operations": [
200                                 {
201                                         "httpMethod": "POST",
202                                         "summary": "Stop a live recording and store it.",
203                                         "nickname": "stop",
204                                         "responseClass": "void",
205                                         "parameters": [
206                                                 {
207                                                         "name": "recordingName",
208                                                         "description": "The name of the recording",
209                                                         "paramType": "path",
210                                                         "required": true,
211                                                         "allowMultiple": false,
212                                                         "dataType": "string"
213                                                 }
214                                         ],
215                                         "errorResponses": [
216                                                 {
217                                                         "code": 404,
218                                                         "reason": "Recording not found"
219                                                 }
220                                         ]
221                                 }
222                         ]
223                 },
224                 {
225                         "path": "/recordings/live/{recordingName}/pause",
226                         "operations": [
227                                 {
228                                         "httpMethod": "POST",
229                                         "summary": "Pause a live recording.",
230                                         "notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.",
231                                         "nickname": "pause",
232                                         "responseClass": "void",
233                                         "parameters": [
234                                                 {
235                                                         "name": "recordingName",
236                                                         "description": "The name of the recording",
237                                                         "paramType": "path",
238                                                         "required": true,
239                                                         "allowMultiple": false,
240                                                         "dataType": "string"
241                                                 }
242                                         ],
243                                         "errorResponses": [
244                                                 {
245                                                         "code": 404,
246                                                         "reason": "Recording not found"
247                                                 },
248                                                 {
249                                                         "code": 409,
250                                                         "reason": "Recording not in session"
251                                                 }
252                                         ]
253                                 },
254                                 {
255                                         "httpMethod": "DELETE",
256                                         "summary": "Unpause a live recording.",
257                                         "nickname": "unpause",
258                                         "responseClass": "void",
259                                         "parameters": [
260                                                 {
261                                                         "name": "recordingName",
262                                                         "description": "The name of the recording",
263                                                         "paramType": "path",
264                                                         "required": true,
265                                                         "allowMultiple": false,
266                                                         "dataType": "string"
267                                                 }
268                                         ],
269                                         "errorResponses": [
270                                                 {
271                                                         "code": 404,
272                                                         "reason": "Recording not found"
273                                                 },
274                                                 {
275                                                         "code": 409,
276                                                         "reason": "Recording not in session"
277                                                 }
278                                         ]
279                                 }
280                         ]
281                 },
282                 {
283                         "path": "/recordings/live/{recordingName}/mute",
284                         "operations": [
285                                 {
286                                         "httpMethod": "POST",
287                                         "summary": "Mute a live recording.",
288                                         "notes": "Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.",
289                                         "nickname": "mute",
290                                         "responseClass": "void",
291                                         "parameters": [
292                                                 {
293                                                         "name": "recordingName",
294                                                         "description": "The name of the recording",
295                                                         "paramType": "path",
296                                                         "required": true,
297                                                         "allowMultiple": false,
298                                                         "dataType": "string"
299                                                 }
300                                         ],
301                                         "errorResponses": [
302                                                 {
303                                                         "code": 404,
304                                                         "reason": "Recording not found"
305                                                 },
306                                                 {
307                                                         "code": 409,
308                                                         "reason": "Recording not in session"
309                                                 }
310                                         ]
311                                 },
312                                 {
313                                         "httpMethod": "DELETE",
314                                         "summary": "Unmute a live recording.",
315                                         "nickname": "unmute",
316                                         "responseClass": "void",
317                                         "parameters": [
318                                                 {
319                                                         "name": "recordingName",
320                                                         "description": "The name of the recording",
321                                                         "paramType": "path",
322                                                         "required": true,
323                                                         "allowMultiple": false,
324                                                         "dataType": "string"
325                                                 }
326                                         ],
327                                         "errorResponses": [
328                                                 {
329                                                         "code": 404,
330                                                         "reason": "Recording not found"
331                                                 },
332                                                 {
333                                                         "code": 409,
334                                                         "reason": "Recording not in session"
335                                                 }
336                                         ]
337                                 }
338                         ]
339                 }
340         ],
341         "models": {
342                 "StoredRecording": {
343                         "id": "StoredRecording",
344                         "description": "A past recording that may be played back.",
345                         "properties": {
346                                 "name": {
347                                         "required": true,
348                                         "type": "string"
349                                 },
350                                 "format": {
351                                         "required": true,
352                                         "type": "string"
353                                 }
354                         }
355                 },
356                 "LiveRecording": {
357                         "id": "LiveRecording",
358                         "description": "A recording that is in progress",
359                         "properties": {
360                                 "name": {
361                                         "required": true,
362                                         "type": "string",
363                                         "description": "Base name for the recording"
364                                 },
365                                 "format": {
366                                         "required": true,
367                                         "type": "string",
368                                         "description": "Recording format (wav, gsm, etc.)"
369                                 },
370                                 "target_uri": {
371                                         "required": true,
372                                         "type": "string",
373                                         "description": "URI for the channel or bridge being recorded"
374                                 },
375                                 "state": {
376                                         "required": true,
377                                         "type": "string",
378                                         "allowableValues": {
379                                                 "valueType": "LIST",
380                                                 "values": [
381                                                         "queued",
382                                                         "recording",
383                                                         "paused",
384                                                         "done",
385                                                         "failed",
386                                                         "canceled"
387                                                 ]
388                                         }
389                                 },
390                                 "duration": {
391                                         "required": false,
392                                         "type": "int",
393                                         "description": "Duration in seconds of the recording"
394                                 },
395                                 "talking_duration": {
396                                         "required": false,
397                                         "type": "int",
398                                         "description": "Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds."
399                                 },
400                                 "silence_duration": {
401                                         "required": false,
402                                         "type": "int",
403                                         "description": "Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds."
404                                 },
405                                 "cause": {
406                                         "required": false,
407                                         "type": "string",
408                                         "description": "Cause for recording failure if failed"
409                                 }
410                         }
411                 }
412         }
413 }