Fix two more possible crashes in CEL
[asterisk/asterisk.git] / rest-api / api-docs / bridges.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.1",
7         "basePath": "http://localhost:8088/stasis",
8         "resourcePath": "/api-docs/bridges.{format}",
9         "apis": [
10                 {
11                         "path": "/bridges",
12                         "description": "Active bridges",
13                         "operations": [
14                                 {
15                                         "httpMethod": "GET",
16                                         "summary": "List active bridges.",
17                                         "nickname": "getBridges",
18                                         "responseClass": "List[Bridge]"
19                                 },
20                                 {
21                                         "httpMethod": "POST",
22                                         "summary": "Create a new bridge.",
23                                         "notes": "This bridge persists until it has been shut down, or Asterisk has been shut down.",
24                                         "nickname": "newBridge",
25                                         "responseClass": "Bridge",
26                                         "parameters": [
27                                                 {
28                                                         "name": "type",
29                                                         "description": "Type of bridge to create.",
30                                                         "paramType": "query",
31                                                         "required": false,
32                                                         "allowMultiple": false,
33                                                         "dataType": "string",
34                                                         "allowedValues": {
35                                                                 "type": "LIST",
36                                                                 "values": [
37                                                                         "mixing",
38                                                                         "holding"
39                                                                 ]
40                                                         }
41                                                 }
42                                         ]
43                                 }
44                         ]
45                 },
46                 {
47                         "path": "/bridges/{bridgeId}",
48                         "description": "Individual bridge",
49                         "operations": [
50                                 {
51                                         "httpMethod": "GET",
52                                         "summary": "Get bridge details.",
53                                         "nickname": "getBridge",
54                                         "responseClass": "Bridge",
55                                         "parameters": [
56                                                 {
57                                                         "name": "bridgeId",
58                                                         "description": "Bridge's id",
59                                                         "paramType": "path",
60                                                         "required": true,
61                                                         "allowMultiple": false,
62                                                         "dataType": "string"
63                                                 }
64                                         ]
65                                 },
66                                 {
67                                         "httpMethod": "DELETE",
68                                         "summary": "Shut down a bridge.",
69                                         "notes": "If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.",
70                                         "nickname": "deleteBridge",
71                                         "responseClass": "void",
72                                         "parameters": [
73                                                 {
74                                                         "name": "bridgeId",
75                                                         "description": "Bridge's id",
76                                                         "paramType": "path",
77                                                         "required": true,
78                                                         "allowMultiple": false,
79                                                         "dataType": "string"
80                                                 }
81                                         ]
82                                 }
83                         ]
84                 },
85                 {
86                         "path": "/bridges/{bridgeId}/addChannel",
87                         "description": "Add a channel to a bridge",
88                         "operations": [
89                                 {
90                                         "httpMethod": "POST",
91                                         "summary": "Add a channel to a bridge.",
92                                         "nickname": "addChannelToBridge",
93                                         "responseClass": "void",
94                                         "parameters": [
95                                                 {
96                                                         "name": "bridgeId",
97                                                         "description": "Bridge's id",
98                                                         "paramType": "path",
99                                                         "required": true,
100                                                         "allowMultiple": false,
101                                                         "dataType": "string"
102                                                 },
103                                                 {
104                                                         "name": "channel",
105                                                         "description": "Channel's id",
106                                                         "paramType": "query",
107                                                         "required": true,
108                                                         "allowMultiple": true,
109                                                         "dataType": "string"
110                                                 }
111                                         ]
112                                 }
113                         ]
114                 },
115                 {
116                         "path": "/bridges/{bridgeId}/removeChannel",
117                         "description": "Remove a channel from a bridge",
118                         "operations": [
119                                 {
120                                         "httpMethod": "POST",
121                                         "summary": "Remove a channel from a bridge.",
122                                         "nickname": "removeChannelFromBridge",
123                                         "responseClass": "void",
124                                         "parameters": [
125                                                 {
126                                                         "name": "bridgeId",
127                                                         "description": "Bridge's id",
128                                                         "paramType": "path",
129                                                         "required": true,
130                                                         "allowMultiple": false,
131                                                         "dataType": "string"
132                                                 },
133                                                 {
134                                                         "name": "channel",
135                                                         "description": "Channel's id",
136                                                         "paramType": "query",
137                                                         "required": true,
138                                                         "allowMultiple": true,
139                                                         "dataType": "string"
140                                                 }
141                                         ]
142                                 }
143                         ]
144                 },
145                 {
146                         "path": "/bridges/{bridgeId}/record",
147                         "description": "Record audio on a bridge",
148                         "operations": [
149                                 {
150                                         "httpMethod": "POST",
151                                         "summary": "Start a recording.",
152                                         "notes": "This records the mixed audio from all channels participating in this bridge.",
153                                         "nickname": "recordBridge",
154                                         "responseClass": "LiveRecording",
155                                         "parameters": [
156                                                 {
157                                                         "name": "bridgeId",
158                                                         "description": "Bridge's id",
159                                                         "paramType": "path",
160                                                         "required": true,
161                                                         "allowMultiple": false,
162                                                         "dataType": "string"
163                                                 },
164                                                 {
165                                                         "name": "name",
166                                                         "description": "Recording's filename",
167                                                         "paramType": "query",
168                                                         "required": true,
169                                                         "allowMultiple": false,
170                                                         "dataType": "string"
171                                                 },
172                                                 {
173                                                         "name": "maxDurationSeconds",
174                                                         "description": "Maximum duration of the recording, in seconds. 0 for no limit.",
175                                                         "paramType": "query",
176                                                         "required": false,
177                                                         "allowMultiple": false,
178                                                         "dataType": "int",
179                                                         "defaultValue": 0
180                                                 },
181                                                 {
182                                                         "name": "maxSilenceSeconds",
183                                                         "description": "Maximum duration of silence, in seconds. 0 for no limit.",
184                                                         "paramType": "query",
185                                                         "required": false,
186                                                         "allowMultiple": false,
187                                                         "dataType": "int",
188                                                         "defaultValue": 0
189                                                 },
190                                                 {
191                                                         "name": "append",
192                                                         "description": "If true, and recording already exists, append to recording.",
193                                                         "paramType": "query",
194                                                         "required": false,
195                                                         "allowMultiple": false,
196                                                         "dataType": "boolean",
197                                                         "defaultValue": false
198                                                 },
199                                                 {
200                                                         "name": "beep",
201                                                         "description": "Play beep when recording begins",
202                                                         "paramType": "query",
203                                                         "required": false,
204                                                         "allowMultiple": false,
205                                                         "dataType": "boolean",
206                                                         "defaultValue": false
207                                                 },
208                                                 {
209                                                         "name": "terminateOn",
210                                                         "description": "DTMF input to terminate recording.",
211                                                         "paramType": "query",
212                                                         "required": false,
213                                                         "allowMultiple": false,
214                                                         "dataType": "string",
215                                                         "defaultValue": "none",
216                                                         "allowableValues": {
217                                                                 "valueType": "LIST",
218                                                                 "values": [
219                                                                         "none",
220                                                                         "any",
221                                                                         "*",
222                                                                         "#"
223                                                                 ]
224                                                         }
225                                                 }
226                                         ]
227                                 }
228                         ]
229                 }
230         ],
231         "models": {
232                 "Bridge": {
233                         "id": "Bridge",
234                         "properties": {
235                                 "bridgeType": {
236                                         "type": "string",
237                                         "description": "Type of bridge technology",
238                                         "required": true,
239                                         "allowedValues": {
240                                                 "type": "LIST",
241                                                 "values": [
242                                                         "mixing",
243                                                         "holding"
244                                                 ]
245                                         }
246                                 },
247                                 "channels": {
248                                         "type": "List[string]",
249                                         "description": "Id's of channels participating in this bridge",
250                                         "required": true
251                                 }
252                         }
253                 }
254         }
255 }