Wiki source code of Extensions
Version 18.1 by michaely on 2015/07/09 19:52
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{layout}} | ||
2 | {{layout-section ac:type="two_right_sidebar"}} | ||
3 | {{layout-cell}} | ||
4 | = (% style="color: rgb(0,0,0);font-size: 24.0px;line-height: 1.25;" %)Description(%%) = | ||
5 | |||
6 | The live extension REST resource provides access to information about extensions in the system. This resource also provides actions for originating calls, and enabling/disabling Do Not Disturb on an extension. | ||
7 | |||
8 | {{info}} | ||
9 | This resource is restricted by licensing. See the resource and action path information below for more details. | ||
10 | {{/info}} | ||
11 | |||
12 | \\ | ||
13 | {{/layout-cell}} | ||
14 | |||
15 | {{layout-cell}} | ||
16 | {{panel title="On this page:"}} | ||
17 | |||
18 | |||
19 | {{toc maxLevel="2" indent="1"/}} | ||
20 | {{/panel}} | ||
21 | {{/layout-cell}} | ||
22 | {{/layout-section}} | ||
23 | |||
24 | {{layout-section ac:type="single"}} | ||
25 | {{layout-cell}} | ||
26 | (% style="color: rgb(0,0,0);" %) | ||
27 | |||
28 | |||
29 | = (% style="color: rgb(0,0,0);" %)JSON Representation(%%) = | ||
30 | |||
31 | {{code}} | ||
32 | { | ||
33 | "id": "e640205f-bc76-4db4-8e03-bf34eb33a8ce", | ||
34 | "extensionNumber": "4224", | ||
35 | "displayName": "Michael Y", | ||
36 | "configurationId": "813936dd-98a4-4ccc-8bcf-dd1f27673c1f", | ||
37 | "permissionId": "813936dd-98a4-4ccc-8bcf-dd1f27673c1f" | ||
38 | } | ||
39 | {{/code}} | ||
40 | |||
41 | (% style="line-height: 1.4285715;" %) | ||
42 | |=((( | ||
43 | Property | ||
44 | )))|=((( | ||
45 | Type | ||
46 | )))|=((( | ||
47 | Description | ||
48 | ))) | ||
49 | |((( | ||
50 | {{{id}}} | ||
51 | )))|((( | ||
52 | String | ||
53 | )))|((( | ||
54 | The id of the extension. | ||
55 | ))) | ||
56 | |(% colspan="1" %)(% colspan="1" %) | ||
57 | ((( | ||
58 | extensionNumber | ||
59 | )))|(% colspan="1" %)(% colspan="1" %) | ||
60 | ((( | ||
61 | String | ||
62 | )))|(% colspan="1" %)(% colspan="1" %) | ||
63 | ((( | ||
64 | The number used to access the extension. | ||
65 | ))) | ||
66 | |(% colspan="1" %)(% colspan="1" %) | ||
67 | ((( | ||
68 | displayName | ||
69 | )))|(% colspan="1" %)(% colspan="1" %) | ||
70 | ((( | ||
71 | String | ||
72 | )))|(% colspan="1" %)(% colspan="1" %) | ||
73 | ((( | ||
74 | The display name of the extension. | ||
75 | ))) | ||
76 | |(% colspan="1" %)(% colspan="1" %) | ||
77 | ((( | ||
78 | {{{configurationId}}} | ||
79 | )))|(% colspan="1" %)(% colspan="1" %) | ||
80 | ((( | ||
81 | String | ||
82 | )))|(% colspan="1" %)(% colspan="1" %) | ||
83 | ((( | ||
84 | The id of the configuration object that represents the extension. | ||
85 | ))) | ||
86 | |(% colspan="1" %)(% colspan="1" %) | ||
87 | ((( | ||
88 | {{{permissionId}}} | ||
89 | )))|(% colspan="1" %)(% colspan="1" %) | ||
90 | ((( | ||
91 | String | ||
92 | )))|(% colspan="1" %)(% colspan="1" %) | ||
93 | ((( | ||
94 | The extension's permission id. | ||
95 | ))) | ||
96 | |||
97 | = Root Resource Paths = | ||
98 | |||
99 | Paths used to access this resource, in relation to parent resources. | ||
100 | |||
101 | |=(% colspan="2" %)(% colspan="2" %) | ||
102 | ((( | ||
103 | {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/extensions}}} | ||
104 | ))) | ||
105 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
106 | ((( | ||
107 | **Description** | ||
108 | )))|((( | ||
109 | Provides access to all extensions in a specified core server. | ||
110 | |||
111 | {{info}} | ||
112 | Excludes any extensions that are not bound to a licensed/full user. | ||
113 | {{/info}} | ||
114 | |||
115 | **Parameters:** | ||
116 | |||
117 | * core_server_id: the id of the parent core server\\ | ||
118 | * core_server_slug: the slug of the parent core server | ||
119 | |||
120 | **Errors:** | ||
121 | |||
122 | * 404 Not Found: Returned if no core server with the given id or slug exists | ||
123 | ))) | ||
124 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
125 | ((( | ||
126 | **GET** | ||
127 | )))|(% colspan="1" %)(% colspan="1" %) | ||
128 | ((( | ||
129 | Gets all extensions in the specified core server. | ||
130 | ))) | ||
131 | |(% colspan="1" %)(% colspan="1" %) | ||
132 | ((( | ||
133 | |||
134 | )))|(% colspan="1" %)(% colspan="1" %) | ||
135 | ((( | ||
136 | |||
137 | ))) | ||
138 | |=(% colspan="2" %)(% colspan="2" %) | ||
139 | ((( | ||
140 | {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/user/[{user_id} | getByName/{username}]/extensions}}} | ||
141 | ))) | ||
142 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
143 | ((( | ||
144 | **Description** | ||
145 | )))|(% colspan="1" %)(% colspan="1" %) | ||
146 | ((( | ||
147 | Provides access to all the extensions bound to the specified user. | ||
148 | |||
149 | {{info}} | ||
150 | Excludes any extensions that are not bound to a licensed/full user. | ||
151 | {{/info}} | ||
152 | |||
153 | **Parameters:** | ||
154 | |||
155 | * core_server_id: the id of the parent core server\\ | ||
156 | * core_server_slug: the slug of the parent core server | ||
157 | * user_id: the id of the parent user | ||
158 | * username: the username of the parent user | ||
159 | |||
160 | **Errors:** | ||
161 | |||
162 | * 404 Not Found: Returned if no core server with the given id or slug exists | ||
163 | * 404 Not Found: Returned if no user with the given id or username exists | ||
164 | ))) | ||
165 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
166 | ((( | ||
167 | **GET** | ||
168 | )))|(% colspan="1" %)(% colspan="1" %) | ||
169 | ((( | ||
170 | Gets all extensions bound to the specified extension. | ||
171 | ))) | ||
172 | |||
173 | = Instance Resource Paths = | ||
174 | |||
175 | Paths used to access a specific instance of this resource. | ||
176 | |||
177 | |=(% colspan="2" %)(% colspan="2" %) | ||
178 | ((( | ||
179 | {{{{root_resource_path}/{extension_id}}}} | ||
180 | ))) | ||
181 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
182 | ((( | ||
183 | **Description** | ||
184 | )))|(% colspan="1" %)(% colspan="1" %) | ||
185 | ((( | ||
186 | Provides access to a specific extension, by extension id. | ||
187 | |||
188 | {{info}} | ||
189 | This resource will not be available if the extension is not bound to a licensed/full user. | ||
190 | {{/info}} | ||
191 | |||
192 | **Parameters:** | ||
193 | |||
194 | * root_resource_path: One of the root resource paths for this resource. See Root Resource Paths above\\ | ||
195 | * core_server_id: the id of the parent core server\\ | ||
196 | * core_server_slug: the slug of the parent core server | ||
197 | * extension_id: the id of the extension to access | ||
198 | |||
199 | **Errors:** | ||
200 | |||
201 | * 404 Not Found: Returned if any of the ancestors in the root resource path could not be found | ||
202 | * 403 Forbidden: Returned if the extension is not bound to a licensed/full user | ||
203 | ))) | ||
204 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
205 | ((( | ||
206 | **GET** | ||
207 | )))|(% colspan="1" %)(% colspan="1" %) | ||
208 | ((( | ||
209 | Gets the specified extension. | ||
210 | ))) | ||
211 | |(% colspan="2" %)(% colspan="2" %) | ||
212 | ((( | ||
213 | |||
214 | ))) | ||
215 | |=(% colspan="2" %)(% colspan="2" %) | ||
216 | ((( | ||
217 | {{{{root_resource_path}/getByName/{extension_number}}}} | ||
218 | ))) | ||
219 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
220 | ((( | ||
221 | **Description** | ||
222 | )))|(% colspan="1" %)(% colspan="1" %) | ||
223 | ((( | ||
224 | Provides access to a specific extension, by extension number. | ||
225 | |||
226 | {{info}} | ||
227 | This resource will not be available if the extension is not bound to a licensed/full user. | ||
228 | {{/info}} | ||
229 | |||
230 | **Parameters:** | ||
231 | |||
232 | * root_resource_path: One of the root resource paths for this resource. See Root Resource Paths above\\ | ||
233 | * core_server_id: the id of the parent core server\\ | ||
234 | * core_server_slug: the slug of the parent core server | ||
235 | * extension_number: the extension number of the extension to access | ||
236 | |||
237 | **Errors:** | ||
238 | |||
239 | * 404 Not Found: Returned if any of the ancestors in the root resource path could not be found | ||
240 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
241 | ))) | ||
242 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
243 | ((( | ||
244 | **GET** | ||
245 | )))|(% colspan="1" %)(% colspan="1" %) | ||
246 | ((( | ||
247 | Gets the specified extension. | ||
248 | ))) | ||
249 | |||
250 | = Sub Resource Paths = | ||
251 | |||
252 | Paths used to access the child resources of this resource. | ||
253 | |||
254 | |=(% colspan="2" %)(% colspan="2" %) | ||
255 | ((( | ||
256 | {{{{instance_resource_path}/agents}}} | ||
257 | ))) | ||
258 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
259 | ((( | ||
260 | **Description** | ||
261 | )))|(% colspan="1" %)(% colspan="1" %) | ||
262 | ((( | ||
263 | Provides access to the agents related to the specified extension. See Agents. | ||
264 | |||
265 | {{info}} | ||
266 | This resource will not be available if the extension is not bound to a licensed/full user. | ||
267 | {{/info}} | ||
268 | |||
269 | **Parameters:** | ||
270 | |||
271 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
272 | |||
273 | **Errors:** | ||
274 | |||
275 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
276 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
277 | ))) | ||
278 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
279 | ((( | ||
280 | **GET** | ||
281 | )))|(% colspan="1" %)(% colspan="1" %) | ||
282 | ((( | ||
283 | Gets all the agents related to the specified extension. | ||
284 | ))) | ||
285 | |(% colspan="1" %)(% colspan="1" %) | ||
286 | ((( | ||
287 | |||
288 | )))|(% colspan="1" %)(% colspan="1" %) | ||
289 | ((( | ||
290 | |||
291 | ))) | ||
292 | |=(% colspan="2" %)(% colspan="2" %) | ||
293 | ((( | ||
294 | {{{{instance_resource_path}/callSegments}}} | ||
295 | ))) | ||
296 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
297 | ((( | ||
298 | **Description** | ||
299 | )))|(% colspan="1" %)(% colspan="1" %) | ||
300 | ((( | ||
301 | Provides access to the call segments for the specified extension. See Call Segments. | ||
302 | |||
303 | {{info}} | ||
304 | This resource will not be available if the extension is not bound to a licensed/full user. | ||
305 | {{/info}} | ||
306 | |||
307 | **Parameters:** | ||
308 | |||
309 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
310 | |||
311 | **Errors:** | ||
312 | |||
313 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
314 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
315 | ))) | ||
316 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
317 | ((( | ||
318 | **GET** | ||
319 | )))|(% colspan="1" %)(% colspan="1" %) | ||
320 | ((( | ||
321 | Gets all the call segments for the specified extension. | ||
322 | ))) | ||
323 | |||
324 | = Action Paths = | ||
325 | |||
326 | Actions that can be performed on this resource. | ||
327 | |||
328 | |=(% colspan="2" %)(% colspan="2" %) | ||
329 | ((( | ||
330 | {{{{instance_resource_path}/originate}}} | ||
331 | ))) | ||
332 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
333 | ((( | ||
334 | **Description** | ||
335 | )))|((( | ||
336 | Originates a call from the specified extension. | ||
337 | |||
338 | {{info}} | ||
339 | This action will not be available if the extension is not bound to a licensed/full user. | ||
340 | {{/info}} | ||
341 | |||
342 | **Parameters:** | ||
343 | |||
344 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
345 | |||
346 | **Errors:** | ||
347 | |||
348 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
349 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
350 | ))) | ||
351 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
352 | ((( | ||
353 | **JSON** | ||
354 | )))|(% colspan="1" %)(% colspan="1" %) | ||
355 | ((( | ||
356 | {{code}} | ||
357 | { | ||
358 | "destinationNumber": "18005555555" | ||
359 | } | ||
360 | {{/code}} | ||
361 | |||
362 | **Properties:** | ||
363 | |||
364 | |=((( | ||
365 | Property | ||
366 | )))|=((( | ||
367 | Type | ||
368 | )))|=((( | ||
369 | Description | ||
370 | ))) | ||
371 | |(% colspan="1" %)(% colspan="1" %) | ||
372 | ((( | ||
373 | {{{destinationNumber}}} | ||
374 | )))|(% colspan="1" %)(% colspan="1" %) | ||
375 | ((( | ||
376 | String | ||
377 | )))|(% colspan="1" %)(% colspan="1" %) | ||
378 | ((( | ||
379 | The number to originate to. | ||
380 | ))) | ||
381 | |||
382 | ** | ||
383 | ** | ||
384 | ))) | ||
385 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
386 | ((( | ||
387 | **POST | ||
388 | ** | ||
389 | )))|(% colspan="1" %)(% colspan="1" %) | ||
390 | ((( | ||
391 | Originates a call from the specified extension to a destination number. | ||
392 | ))) | ||
393 | |(% colspan="2" %)(% colspan="2" %) | ||
394 | ((( | ||
395 | |||
396 | ))) | ||
397 | |=(% colspan="2" %)(% colspan="2" %) | ||
398 | ((( | ||
399 | {{{{instance_resource_path}/enableDnd}}} | ||
400 | ))) | ||
401 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
402 | ((( | ||
403 | **Description** | ||
404 | )))|(% colspan="1" %)(% colspan="1" %) | ||
405 | ((( | ||
406 | Enables do not disturb on the specified extension. | ||
407 | |||
408 | {{info}} | ||
409 | This action will not be available if the extension is not bound to a licensed/full user. | ||
410 | {{/info}} | ||
411 | |||
412 | **Parameters:** | ||
413 | |||
414 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
415 | |||
416 | **Errors:** | ||
417 | |||
418 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
419 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
420 | ))) | ||
421 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
422 | ((( | ||
423 | **POST | ||
424 | ** | ||
425 | )))|(% colspan="1" %)(% colspan="1" %) | ||
426 | ((( | ||
427 | Enables do not disturb on the specified extension. | ||
428 | ))) | ||
429 | |(% colspan="2" %)(% colspan="2" %) | ||
430 | ((( | ||
431 | |||
432 | ))) | ||
433 | |=(% colspan="2" %)(% colspan="2" %) | ||
434 | ((( | ||
435 | {{{{instance_resource_path}/disableDnd}}} | ||
436 | ))) | ||
437 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
438 | ((( | ||
439 | **Description** | ||
440 | )))|(% colspan="1" %)(% colspan="1" %) | ||
441 | ((( | ||
442 | Disables do not disturb on the specified extension. | ||
443 | |||
444 | {{info}} | ||
445 | This action will not be available if the extension is not bound to a licensed/full user. | ||
446 | {{/info}} | ||
447 | |||
448 | **Parameters:** | ||
449 | |||
450 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
451 | |||
452 | **Errors:** | ||
453 | |||
454 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
455 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
456 | ))) | ||
457 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
458 | ((( | ||
459 | **POST | ||
460 | ** | ||
461 | )))|(% colspan="1" %)(% colspan="1" %) | ||
462 | ((( | ||
463 | Disables do not disturb on the specified extension. | ||
464 | ))) | ||
465 | |||
466 | = Curl Examples = | ||
467 | |||
468 | === Get the status of a user in a specific core server === | ||
469 | |||
470 | {{code language="bash"}} | ||
471 | curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/users/status | ||
472 | {{/code}} | ||
473 | |||
474 | === Set the status of a user in a specific core server === | ||
475 | |||
476 | {{code language="bash"}} | ||
477 | curl --user manager:manag3rpa55word -i -H "Content-Type: application/json" -X POST -d '{"name" : "Went back in time", "type" : "away", "note" : "Tell Doc Brown", "returnTime" : 499132800}' http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/users/status/set | ||
478 | {{/code}} | ||
479 | {{/layout-cell}} | ||
480 | {{/layout-section}} | ||
481 | {{/layout}} |