Debian Codegraph @

rest-api/api-docs/applications.json

raw symbols SCIP
1 {
2 "_copyright": "Copyright (C) 2013, Digium, Inc.",
3 "_author": "David M. Lee, II <[email protected]>",
4 "_svn_revision": "$Revision$",
5 "apiVersion": "2.0.0",
6 "swaggerVersion": "1.1",
7 "basePath": "http://localhost:8088/ari",
8 "resourcePath": "/api-docs/applications.{format}",
9 "since": [
10 "13.0.0"
11 ],
12 "apis": [
13 {
14 "path": "/applications",
15 "description": "Stasis applications",
16 "operations": [
17 {
18 "httpMethod": "GET",
19 "since": [
20 "13.0.0"
21 ],
22 "summary": "List all applications.",
23 "nickname": "list",
24 "responseClass": "List[Application]"
25 }
26 ]
27 },
28 {
29 "path": "/applications/{applicationName}",
30 "description": "Stasis application",
31 "operations": [
32 {
33 "httpMethod": "GET",
34 "since": [
35 "13.0.0"
36 ],
37 "summary": "Get details of an application.",
38 "nickname": "get",
39 "responseClass": "Application",
40 "parameters": [
41 {
42 "name": "applicationName",
43 "description": "Application's name",
44 "paramType": "path",
45 "required": true,
46 "allowMultiple": false,
47 "dataType": "string"
48 }
49 ],
50 "errorResponses": [
51 {
52 "code": 404,
53 "reason": "Application does not exist."
54 }
55 ]
56 }
57 ]
58 },
59 {
60 "path": "/applications/{applicationName}/subscription",
61 "description": "Stasis application",
62 "operations": [
63 {
64 "httpMethod": "POST",
65 "since": [
66 "13.0.0"
67 ],
68 "summary": "Subscribe an application to a event source.",
69 "notes": "Returns the state of the application after the subscriptions have changed",
70 "nickname": "subscribe",
71 "responseClass": "Application",
72 "parameters": [
73 {
74 "name": "applicationName",
75 "description": "Application's name",
76 "paramType": "path",
77 "required": true,
78 "allowMultiple": false,
79 "dataType": "string"
80 },
81 {
82 "name": "eventSource",
83 "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}",
84 "paramType": "query",
85 "required": true,
86 "allowMultiple": true,
87 "dataType": "string"
88 }
89 ],
90 "errorResponses": [
91 {
92 "code": 400,
93 "reason": "Missing parameter."
94 },
95 {
96 "code": 404,
97 "reason": "Application does not exist."
98 },
99 {
100 "code": 422,
101 "reason": "Event source does not exist."
102 }
103 ]
104 },
105 {
106 "httpMethod": "DELETE",
107 "since": [
108 "13.0.0"
109 ],
110 "summary": "Unsubscribe an application from an event source.",
111 "notes": "Returns the state of the application after the subscriptions have changed",
112 "nickname": "unsubscribe",
113 "responseClass": "Application",
114 "parameters": [
115 {
116 "name": "applicationName",
117 "description": "Application's name",
118 "paramType": "path",
119 "required": true,
120 "allowMultiple": false,
121 "dataType": "string"
122 },
123 {
124 "name": "eventSource",
125 "description": "URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}",
126 "paramType": "query",
127 "required": true,
128 "allowMultiple": true,
129 "dataType": "string"
130 }
131 ],
132 "errorResponses": [
133 {
134 "code": 400,
135 "reason": "Missing parameter; event source scheme not recognized."
136 },
137 {
138 "code": 404,
139 "reason": "Application does not exist."
140 },
141 {
142 "code": 409,
143 "reason": "Application not subscribed to event source."
144 },
145 {
146 "code": 422,
147 "reason": "Event source does not exist."
148 }
149 ]
150 }
151 ]
152 },
153 {
154 "path": "/applications/{applicationName}/eventFilter",
155 "description": "Stasis application",
156 "operations": [
157 {
158 "httpMethod": "PUT",
159 "since": [
160 "13.26.0",
161 "16.3.0"
162 ],
163 "summary": "Filter application events types.",
164 "notes": "Allowed and/or disallowed event type filtering can be done. The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:<br /><br />\"allowed\" - Specifies an allowed list of event types<br />\"disallowed\" - Specifies a disallowed list of event types<br /><br />Further, each of those key's value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value:<br /><br />\"type\" - The type name of the event to filter<br /><br />The value must be the string name (case sensitive) of the event type that needs filtering. For example:<br /><br />{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }<br /><br />As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.<br /><br />The following rules apply:<br /><br />* If the body is empty, both the allowed and disallowed filters are set empty.<br />* If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).<br />* If only one list type is given then only that type is set. The other type is not updated.<br />* An empty \"allowed\" list means all events are allowed.<br />* An empty \"disallowed\" list means no events are disallowed.<br />* Disallowed events take precedence over allowed events if the event type is specified in both lists.",
165 "nickname": "filter",
166 "responseClass": "Application",
167 "parameters": [
168 {
169 "name": "applicationName",
170 "description": "Application's name",
171 "paramType": "path",
172 "required": true,
173 "allowMultiple": false,
174 "dataType": "string"
175 },
176 {
177 "name": "filter",
178 "description": "Specify which event types to allow/disallow",
179 "paramType": "body",
180 "required": false,
181 "dataType": "object",
182 "allowMultiple": false
183 }
184 ],
185 "errorResponses": [
186 {
187 "code": 400,
188 "reason": "Bad request."
189 },
190 {
191 "code": 404,
192 "reason": "Application does not exist."
193 }
194 ]
195 }
196 ]
197 }
198 ],
199 "models": {
200 "Application": {
201 "id": "Application",
202 "description": "Details of a Stasis application",
203 "properties": {
204 "name": {
205 "type": "string",
206 "description": "Name of this application",
207 "required": true
208 },
209 "channel_ids": {
210 "type": "List[string]",
211 "description": "Id's for channels subscribed to.",
212 "required": true
213 },
214 "bridge_ids": {
215 "type": "List[string]",
216 "description": "Id's for bridges subscribed to.",
217 "required": true
218 },
219 "endpoint_ids": {
220 "type": "List[string]",
221 "description": "{tech}/{resource} for endpoints subscribed to.",
222 "required": true
223 },
224 "device_names": {
225 "type": "List[string]",
226 "description": "Names of the devices subscribed to.",
227 "required": true
228 },
229 "events_allowed": {
230 "type": "List[object]",
231 "description": "Event types sent to the application.",
232 "required": true
233 },
234 "events_disallowed": {
235 "type": "List[object]",
236 "description": "Event types not sent to the application.",
237 "required": true
238 }
239 }
240 }
241 }
242 }