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