Wiki source code of Extensions

Version 27.1 by michaely on 2015/07/09 17:05

Show last authors
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 allows access to information about the status of a specific extension 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);" %)Root Resource Path(%%) =
30
31 {{code}}
32 communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/extensions
33 {{/code}}
34
35 = JSON Representation =
36
37 {{code}}
38 {
39 "id": "e640205f-bc76-4db4-8e03-bf34eb33a8ce",
40 "extensionNumber": "4224",
41 "displayName": "Michael Y",
42 "configurationId": "813936dd-98a4-4ccc-8bcf-dd1f27673c1f",
43 "permissionId": "813936dd-98a4-4ccc-8bcf-dd1f27673c1f"
44 }
45 {{/code}}
46
47 |=(((
48 Property
49 )))|=(((
50 Type
51 )))|=(((
52 Description
53 )))
54 |(((
55 {{{id}}}
56 )))|(((
57 String
58 )))|(((
59 The id of the extension.
60 )))
61 |(% colspan="1" %)(% colspan="1" %)
62 (((
63 extensionNumber
64 )))|(% colspan="1" %)(% colspan="1" %)
65 (((
66 String
67 )))|(% colspan="1" %)(% colspan="1" %)
68 (((
69 The number used to access the extension.
70 )))
71 |(% colspan="1" %)(% colspan="1" %)
72 (((
73 displayName
74 )))|(% colspan="1" %)(% colspan="1" %)
75 (((
76 String
77 )))|(% colspan="1" %)(% colspan="1" %)
78 (((
79 The display name of the extension.
80 )))
81 |(% colspan="1" %)(% colspan="1" %)
82 (((
83 {{{configurationId}}}
84 )))|(% colspan="1" %)(% colspan="1" %)
85 (((
86 String
87 )))|(% colspan="1" %)(% colspan="1" %)
88 (((
89 The id of the configuration object that represents the extension.
90 )))
91 |(% colspan="1" %)(% colspan="1" %)
92 (((
93 {{{permissionId}}}
94 )))|(% colspan="1" %)(% colspan="1" %)
95 (((
96 String
97 )))|(% colspan="1" %)(% colspan="1" %)
98 (((
99 The extension's permission id.
100 )))
101
102 = Resource Paths =
103
104 The extension resource can be accessed from several different parent resources. The following resource paths have been organized by the parent path used to access the resource.
105
106 == (% style="color: rgb(0,0,0);" %)Core Server Parent(%%) ==
107
108 |=(% colspan="2" %)(% colspan="2" %)
109 (((
110 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/extensions}}}
111 )))
112 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
113 (((
114 **Description**
115 )))|(((
116 Accesses the state of all extensions, in a core server.
117
118 {{info}}
119 The returned result will exclude any extensions that are not bound to a licensed/full user.
120 {{/info}}
121
122 (% style="line-height: 1.4285715;" %)**Parameters:**
123
124 * core_server_id: the id of the parent core server\\
125 * core_server_slug: the slug of the parent core server
126
127 **Errors:**
128
129 * 404 Not Found: Returned if no core server with the given id or slug exists
130 )))
131 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
132 (((
133 **GET**
134 )))|(((
135 Gets the state of all extensions, in a specified core server.
136 )))
137 |(% colspan="2" %)(% colspan="2" %)
138 (((
139
140 )))
141 |=(% colspan="2" %)(% colspan="2" %)
142 (((
143 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/extensions/{extension_id}}}}
144 )))
145 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
146 (((
147 **Description**
148 )))|(% colspan="1" %)(% colspan="1" %)
149 (((
150 Accesses the state of a specific extension, in a core server, by extension id.
151
152 {{info}}
153 This resource will not be available if the extension is not bound to a licensed/full user.
154 {{/info}}
155
156 **Parameters:**
157
158 * core_server_id: the id of the parent core server\\
159 * core_server_slug: the slug of the parent core server
160 * extension_id: the id of the extension to access
161
162 **Errors:**
163
164 * 404 Not Found: Returned if no core server with the given id or slug exists
165 * 404 Not Found: Returned if no extension exists with the give id, in the specified core server
166 * 403 Forbidden: Returned if the extension is not bound to a licensed/full user
167 )))
168 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
169 (((
170 **GET**
171 )))|(% colspan="1" %)(% colspan="1" %)
172 (((
173 Gets the state of a specific extension, in a core server.
174 )))
175 |(% colspan="2" %)(% colspan="2" %)
176 (((
177
178 )))
179 |=(% colspan="2" %)(% colspan="2" %)
180 (((
181 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/extensions/getByName/{extension_number}}}}
182 )))
183 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
184 (((
185 **Description**
186 )))|(% colspan="1" %)(% colspan="1" %)
187 (((
188 Accesses the state of a specific extension, in a core server, by extension number.
189
190 {{info}}
191 This resource will not be available if the extension is not bound to a licensed/full user.
192 {{/info}}
193
194 **Parameters:**
195
196 * core_server_id: the id of the parent core server\\
197 * core_server_slug: the slug of the parent core server
198 * extension_number: the extension number of the extension to access
199
200 **Errors:**
201
202 * 404 Not Found: Returned if no core server with the given id or slug exists
203 * 404 Not Found: Returned if no extension exists with the give extension number, in the specified core server
204 * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user
205 )))
206 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
207 (((
208 **GET**
209 )))|(% colspan="1" %)(% colspan="1" %)
210 (((
211 Gets the state of a specific extension, in a core server.
212 )))
213 |(% colspan="2" %)(% colspan="2" %)
214 (((
215
216 )))
217 |=(% colspan="2" %)(% colspan="2" %)
218 (((
219 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/extensions/[{extension_id} getByName/{extension_number}]/agents}}}
220 )))
221 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
222 (((
223 **Description**
224 )))|(% colspan="1" %)(% colspan="1" %)
225 (((
226 Access the sub/child resource for the queue agents bound to the specified extension.
227
228 {{info}}
229 This resource will not be available if the extension is not bound to a licensed/full user.
230 {{/info}}
231
232 **Parameters:**
233
234 * core_server_id: the id of the parent core server\\
235 * core_server_slug: the slug of the parent core server
236 * extension_id: the id of the extension to access
237 * extension_number: the extension number of the parent extension
238
239 **Errors:**
240
241 * 404 Not Found: Returned if no core server with the given id or slug exists
242 * 404 Not Found: Returned if no extension exists with the give id or extension number, in the specified core server.
243 * 403 Forbidden: if the extension is not bound to a licensed/full user
244 )))
245 |(% colspan="2" %)(% colspan="2" %)
246 (((
247
248 )))
249 |=(% colspan="2" %)(% colspan="2" %)
250 (((
251 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/extensions/[{extension_id} getByName/{extension_number}]/callSegments}}}
252 )))
253 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
254 (((
255 **Description**
256 )))|(% colspan="1" %)(% colspan="1" %)
257 (((
258 Access the sub/child resource for the call segments bound to the specified extension.
259
260 {{info}}
261 This resource will not be available if the extension is not bound to a licensed/full user.
262 {{/info}}
263
264 **Parameters:**
265
266 * core_server_id: the id of the parent core server\\
267 * core_server_slug: the slug of the parent core server
268 * extension_id: the id of the extension to access
269 * extension_number: the extension number of the parent extension
270
271 **Errors:**
272
273 * 404 Not Found: Returned if no core server with the given id or slug exists
274 * 404 Not Found: Returned if no extension exists with the given id or extension number, in the specified core server.
275 * 403 Forbidden: if the extension is not bound to a licensed/full user
276 )))
277
278 == User Parent ==
279
280 |=(% colspan="2" %)(% colspan="2" %)
281 (((
282 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/[{user_id} | getByName/{username}]/extensions}}}
283 )))
284 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
285 (((
286 **Description**
287 )))|(((
288 Accesses the state of all extensions bound to a specific user, in a core server.
289
290 {{info}}
291 The returned result will exclude any extensions that are not bound to a licensed/full user.
292 {{/info}}
293
294 **Parameters:**
295
296 * core_server_id: the id of the parent core server\\
297 * core_server_slug: the slug of the parent core server
298 * user_id: the id of the parent user
299 * username: the username of the parent user
300
301 **Errors:**
302
303 * 404 Not Found: Returned if no core server with the given id or slug exists
304 * 404 Not Found: Returned if no user with the given id or username exists in the specified core server
305 * 403 Forbidden: if the extension is not bound to a licensed/full user
306 )))
307 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
308 (((
309 **GET**
310 )))|(((
311 Gets the state of all extensions bound to a specific user.
312 )))
313 |(% colspan="2" %)(% colspan="2" %)
314 (((
315
316 )))
317 |=(% colspan="2" %)(% colspan="2" %)
318 (((
319 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/[{user_id} | getByName/{username}]/extensions/{extension_id}}}}
320 )))
321 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
322 (((
323 **Description**
324 )))|(% colspan="1" %)(% colspan="1" %)
325 (((
326 Accesses the state of a specific extension, bound to a user, by extension id.
327
328 {{info}}
329 This resource will not be available if the extension is not bound to a licensed/full user.
330 {{/info}}
331
332 **Parameters:**
333
334 * core_server_id: the id of the parent core server\\
335 * core_server_slug: the slug of the parent core server
336 * user_id: the id of the parent user
337 * username: the username of the parent user
338 * extension_id: the id of the extension to access
339
340 **Errors:**
341
342 * 404 Not Found: Returned if no core server with the given id or slug exists
343 * 404 Not Found: Returned if no user with the given id or username exists in the specified core server
344 * 404 Not Found: Returned if no extension exists with the given id, that is bound to the specified user.
345 * 403 Forbidden: Returned if the extension is not bound to a licensed/full user
346 )))
347 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
348 (((
349 **GET**
350 )))|(% colspan="1" %)(% colspan="1" %)
351 (((
352 Gets the state of a specific extension bound to a user.
353 )))
354 |(% colspan="2" %)(% colspan="2" %)
355 (((
356
357 )))
358 |=(% colspan="2" %)(% colspan="2" %)
359 (((
360 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/[{user_id} | getByName/{username}]/extensions/getByName/{extension_number}}}}
361 )))
362 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
363 (((
364 **Description**
365 )))|(% colspan="1" %)(% colspan="1" %)
366 (((
367 Accesses the state of a specific extension, bound to a user, by extension number.
368
369 {{info}}
370 This resource will not be available if the extension is not bound to a licensed/full user.
371 {{/info}}
372
373 **Parameters:**
374
375 * core_server_id: the id of the parent core server\\
376 * core_server_slug: the slug of the parent core server
377 * user_id: the id of the parent user
378 * username: the username of the parent user
379 * extension_id: the id of the parent extension
380 * extension_number: the extension number of the parent extension
381
382 **Errors:**
383
384 * 404 Not Found: Returned if no core server with the given id or slug exists
385 * 404 Not Found: Returned if no user with the given id or username exists in the specified core server
386 * 404 Not Found: Returned if no extension exists with the given id, that is bound to the specified user.
387 * 403 Forbidden: Returned if the extension is not bound to a licensed/full user
388 )))
389 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
390 (((
391 **GET**
392 )))|(% colspan="1" %)(% colspan="1" %)
393 (((
394 Gets the state of a specific extension bound to a user.
395 )))
396 |(% colspan="2" %)(% colspan="2" %)
397 (((
398
399 )))
400 |=(% colspan="2" %)(% colspan="2" %)
401 (((
402 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/[{user_id} | getByName/{username}]/extensions/[{extension_id} getByName/{extension_number}]/agents}}}
403 )))
404 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
405 (((
406 **Description**
407 )))|(% colspan="1" %)(% colspan="1" %)
408 (((
409 Access the sub/child resource for the queue agents bound to the specified extension, that is bound to the specified user.
410
411 {{info}}
412 This resource will not be available if the extension is not bound to a licensed/full user.
413 {{/info}}
414
415 **Parameters:**
416
417 * core_server_id: the id of the parent core server\\
418 * core_server_slug: the slug of the parent core server
419 * user_id: the id of the parent user
420 * username: the username of the parent user
421 * extension_id: the id of the parent extension
422 * extension_number: the extension number of the parent extension
423
424 **Errors:**
425
426 * 404 Not Found: Returned if no core server with the given id or slug exists
427 * 404 Not Found: Returned if no user with the given id or username exists in the specified core server
428 * 404 Not Found: Returned if no extension exists with the given id or extension number, that is bound to the specified user.
429 * 403 Forbidden: Returned if the extension is not bound to a licensed/full user
430 )))
431 |(% colspan="2" %)(% colspan="2" %)
432 (((
433
434 )))
435 |=(% colspan="2" %)(% colspan="2" %)
436 (((
437 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/[{user_id} | getByName/{username}]/extensions/[{extension_id} getByName/{extension_number}]/callSegments}}}
438 )))
439 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
440 (((
441 **Description**
442 )))|(% colspan="1" %)(% colspan="1" %)
443 (((
444 Access the sub/child resource for the call segments bound to the specified extension, that is bound to the specified user.
445
446 {{info}}
447 This resource will not be available if the extension is not bound to a licensed/full user.
448 {{/info}}
449
450 **Parameters:**
451
452 * core_server_id: the id of the parent core server\\
453 * core_server_slug: the slug of the parent core server
454 * user_id: the id of the parent user
455 * username: the username of the parent user
456 * extension_id: the id of the parent extension
457 * extension_number: the extension number of the parent extension
458
459 **Errors:**
460
461 * 404 Not Found: Returned if no core server with the given id or slug exists
462 * 404 Not Found: Returned if no user with the given id or username exists in the specified core server
463 * 404 Not Found: Returned if no extension exists with the given id or extension number, that is bound to the specified user.
464 * 403 Forbidden: Returned if the extension is not bound to a licensed/full user
465 )))
466
467 = Action Paths =
468
469 |=(% colspan="2" %)(% colspan="2" %)
470 (((
471 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/[{user_id} | getByName/{username}]/status/set}}}
472 )))
473 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
474 (((
475 **Description**
476 )))|(((
477 Updates the status of a user.
478
479 {{info}}
480 This action will not be available if the user is not licensed/full, or no license is installed on the core server.
481 {{/info}}
482
483 (% style="line-height: 1.4285715;" %)**Parameters:**
484
485 * core_server_id: the id of the parent core server\\
486 * core_server_slug: the slug of the parent core server
487 * user_id: the id of the user to update status on
488 * user_name: the username of the user to update status on
489
490 **Errors:**
491
492 * 404 Not Found: Returned if no core server with the given id or slug exists
493 * 404 Not Found: Returned if no user with the given id or username exists in the specified core server
494 * 422 Unprocessable Entity: Returned if no JSON name property is given
495 * 422 Unprocessable Entity: Returned if no JSON type property is given
496 * 422 Unprocessable Entity: Returned if the JSON type property value is not valid
497 * 422 Unprocessable Entity: Returned if the JSON returnTime property value is to0 large, or is a non numerical value.
498 * 403 Forbidden: Returned if the user is not licensed/full, or no license is installed on the core server.
499 )))
500 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
501 (((
502 **JSON**
503 )))|(% colspan="1" %)(% colspan="1" %)
504 (((
505 {{code}}
506 {
507 "name": "Went back in time",
508 "type": "away",
509 "note": "Tell Doc Brown",
510 "returnTime": 499132800
511 }
512 {{/code}}
513
514 **Properties:**
515
516 |=(((
517 Property
518 )))|=(((
519 Type
520 )))|=(((
521 Description
522 )))
523 |(% colspan="1" %)(% colspan="1" %)
524 (((
525 {{{name}}}
526 )))|(% colspan="1" %)(% colspan="1" %)
527 (((
528 String
529 )))|(% colspan="1" %)(% colspan="1" %)
530 (((
531 The status name.
532 )))
533 |(% colspan="1" %)(% colspan="1" %)
534 (((
535 type
536 )))|(% colspan="1" %)(% colspan="1" %)
537 (((
538 String
539 )))|(% colspan="1" %)(% colspan="1" %)
540 (((
541 The status type. Determines the icon used for the status. See Status Types above.
542 )))
543 |(% colspan="1" %)(% colspan="1" %)
544 (((
545 note
546 )))|(% colspan="1" %)(% colspan="1" %)
547 (((
548 String
549 )))|(% colspan="1" %)(% colspan="1" %)
550 (((
551 The note for the status.
552 )))
553 |(% colspan="1" %)(% colspan="1" %)
554 (((
555 returnTime
556 )))|(% colspan="1" %)(% colspan="1" %)
557 (((
558 Long
559 )))|(% colspan="1" %)(% colspan="1" %)
560 (((
561 The time the user is returning, or -1 for no return time. Represented as a unix timestamp, in milliseconds.
562 )))
563
564 **
565 **
566 )))
567 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
568 (((
569 **POST**
570 )))|(% colspan="1" %)(% colspan="1" %)
571 (((
572 Updates the status of the user.
573 )))
574
575 =
576 Curl Examples =
577
578 === Get the status of a user in a specific core server ===
579
580 {{code language="bash"}}
581 curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/users/status
582 {{/code}}
583
584 === Set the status of a user in a specific core server ===
585
586 {{code language="bash"}}
587 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
588 {{/code}}
589 {{/layout-cell}}
590 {{/layout-section}}
591 {{/layout}}