Wiki source code of Extensions
Version 17.1 by michaely on 2015/07/10 11:58
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 call 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 sets of the 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 the 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 | * extension_id: the id of the extension to access | ||
196 | |||
197 | **Errors:** | ||
198 | |||
199 | * 404 Not Found: Returned if any of the ancestors in the root resource path could not be found | ||
200 | * 404 Not Found: Returned if no extension with the specified extension id could be found | ||
201 | * 403 Forbidden: Returned if any of the parents specified in the root resource path are restricted | ||
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 | * extension_number: the extension number of the extension to access | ||
234 | |||
235 | **Errors:** | ||
236 | |||
237 | * 404 Not Found: Returned if any of the ancestors in the root resource path could not be found | ||
238 | * 404 Not Found: Returned if no extension with the specified extension number could be found | ||
239 | * 403 Forbidden: Returned if any of the parents specified in the root resource path are restricted | ||
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 | |(% colspan="2" %)(% colspan="2" %) | ||
250 | ((( | ||
251 | |||
252 | ))) | ||
253 | |=(% colspan="2" %)(% colspan="2" %) | ||
254 | ((( | ||
255 | {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/queues/[{queue_id | getByName{queue_identifier}}]/agent/{agent_id}/extension}}} | ||
256 | ))) | ||
257 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
258 | ((( | ||
259 | **Description** | ||
260 | )))|(% colspan="1" %)(% colspan="1" %) | ||
261 | ((( | ||
262 | Provides access to the extension the specified agent relates to. | ||
263 | |||
264 | {{info}} | ||
265 | This resource will not be available if the extension is not bound to a licensed/full user, or the agent is not in an enabled queue. | ||
266 | {{/info}} | ||
267 | |||
268 | **Parameters:** | ||
269 | |||
270 | * core_server_id: the id of the parent core server\\ | ||
271 | * core_server_slug: the slug of the parent core server | ||
272 | * queue_id: the id of the parent queue | ||
273 | * queue_identifier: the identifier of the parent queue | ||
274 | * agent_id: the id of the agent | ||
275 | |||
276 | **Errors:** | ||
277 | |||
278 | * 404 Not Found: Returned if no core server with the given id or slug exists | ||
279 | * 404 Not Found: Returned if no queue with the given id or identifier exists | ||
280 | * 404 Not Found: Returned if no agent with the given id exists | ||
281 | * 403 Forbidden: Returned if the parent queue is not enabled or the agent is not related to an extension that is bound to a full user | ||
282 | ))) | ||
283 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
284 | ((( | ||
285 | **GET** | ||
286 | )))|(% colspan="1" %)(% colspan="1" %) | ||
287 | ((( | ||
288 | Gets the extension the specified agent relates to. | ||
289 | ))) | ||
290 | |||
291 | = Sub Resource Paths = | ||
292 | |||
293 | Paths used to access the child resources of this resource. | ||
294 | |||
295 | |=(% colspan="2" %)(% colspan="2" %) | ||
296 | ((( | ||
297 | {{{{instance_resource_path}/agents}}} | ||
298 | ))) | ||
299 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
300 | ((( | ||
301 | **Description** | ||
302 | )))|(% colspan="1" %)(% colspan="1" %) | ||
303 | ((( | ||
304 | Provides access to the agents related to the specified extension. See Agents. | ||
305 | |||
306 | {{info}} | ||
307 | This resource will not be available if the extension is not bound to a licensed/full user. | ||
308 | |||
309 | Excludes any agents that are not in an enabled queue. | ||
310 | {{/info}} | ||
311 | |||
312 | **Parameters:** | ||
313 | |||
314 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
315 | |||
316 | **Errors:** | ||
317 | |||
318 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
319 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
320 | ))) | ||
321 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
322 | ((( | ||
323 | **GET** | ||
324 | )))|(% colspan="1" %)(% colspan="1" %) | ||
325 | ((( | ||
326 | Gets all the agents related to the specified extension. | ||
327 | ))) | ||
328 | |(% colspan="1" %)(% colspan="1" %) | ||
329 | ((( | ||
330 | |||
331 | )))|(% colspan="1" %)(% colspan="1" %) | ||
332 | ((( | ||
333 | |||
334 | ))) | ||
335 | |=(% colspan="2" %)(% colspan="2" %) | ||
336 | ((( | ||
337 | {{{{instance_resource_path}/callSegments}}} | ||
338 | ))) | ||
339 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
340 | ((( | ||
341 | **Description** | ||
342 | )))|(% colspan="1" %)(% colspan="1" %) | ||
343 | ((( | ||
344 | Provides access to the call segments for the specified extension. See Call Segments. | ||
345 | |||
346 | {{info}} | ||
347 | This resource will not be available if the extension is not bound to a licensed/full user. | ||
348 | {{/info}} | ||
349 | |||
350 | **Parameters:** | ||
351 | |||
352 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
353 | |||
354 | **Errors:** | ||
355 | |||
356 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
357 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
358 | ))) | ||
359 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
360 | ((( | ||
361 | **GET** | ||
362 | )))|(% colspan="1" %)(% colspan="1" %) | ||
363 | ((( | ||
364 | Gets all the call segments for the specified extension. | ||
365 | ))) | ||
366 | |||
367 | = Action Paths = | ||
368 | |||
369 | Actions that can be performed on this resource. | ||
370 | |||
371 | |=(% colspan="2" %)(% colspan="2" %) | ||
372 | ((( | ||
373 | {{{{instance_resource_path}/originate}}} | ||
374 | ))) | ||
375 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
376 | ((( | ||
377 | **Description** | ||
378 | )))|((( | ||
379 | Originates a call from the specified extension. | ||
380 | |||
381 | {{info}} | ||
382 | This action will not be available if the extension is not bound to a licensed/full user. | ||
383 | {{/info}} | ||
384 | |||
385 | **Parameters:** | ||
386 | |||
387 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
388 | |||
389 | **Errors:** | ||
390 | |||
391 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
392 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
393 | ))) | ||
394 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
395 | ((( | ||
396 | **JSON** | ||
397 | )))|(% colspan="1" %)(% colspan="1" %) | ||
398 | ((( | ||
399 | {{code}} | ||
400 | { | ||
401 | "destinationNumber": "18005555555" | ||
402 | } | ||
403 | {{/code}} | ||
404 | |||
405 | **Properties:** | ||
406 | |||
407 | |=((( | ||
408 | Property | ||
409 | )))|=((( | ||
410 | Type | ||
411 | )))|=((( | ||
412 | Description | ||
413 | ))) | ||
414 | |(% colspan="1" %)(% colspan="1" %) | ||
415 | ((( | ||
416 | {{{destinationNumber}}} | ||
417 | )))|(% colspan="1" %)(% colspan="1" %) | ||
418 | ((( | ||
419 | String | ||
420 | )))|(% colspan="1" %)(% colspan="1" %) | ||
421 | ((( | ||
422 | The number to originate to. | ||
423 | ))) | ||
424 | |||
425 | ** | ||
426 | ** | ||
427 | ))) | ||
428 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
429 | ((( | ||
430 | **POST | ||
431 | ** | ||
432 | )))|(% colspan="1" %)(% colspan="1" %) | ||
433 | ((( | ||
434 | Originates a call from the specified extension to a destination number. | ||
435 | ))) | ||
436 | |(% colspan="2" %)(% colspan="2" %) | ||
437 | ((( | ||
438 | |||
439 | ))) | ||
440 | |=(% colspan="2" %)(% colspan="2" %) | ||
441 | ((( | ||
442 | {{{{instance_resource_path}/enableDnd}}} | ||
443 | ))) | ||
444 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
445 | ((( | ||
446 | **Description** | ||
447 | )))|(% colspan="1" %)(% colspan="1" %) | ||
448 | ((( | ||
449 | Enables do not disturb on the specified extension. | ||
450 | |||
451 | {{info}} | ||
452 | This action will not be available if the extension is not bound to a licensed/full user. | ||
453 | {{/info}} | ||
454 | |||
455 | **Parameters:** | ||
456 | |||
457 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
458 | |||
459 | **Errors:** | ||
460 | |||
461 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
462 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
463 | ))) | ||
464 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
465 | ((( | ||
466 | **POST | ||
467 | ** | ||
468 | )))|(% colspan="1" %)(% colspan="1" %) | ||
469 | ((( | ||
470 | Enables do not disturb on the specified extension. | ||
471 | ))) | ||
472 | |(% colspan="2" %)(% colspan="2" %) | ||
473 | ((( | ||
474 | |||
475 | ))) | ||
476 | |=(% colspan="2" %)(% colspan="2" %) | ||
477 | ((( | ||
478 | {{{{instance_resource_path}/disableDnd}}} | ||
479 | ))) | ||
480 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
481 | ((( | ||
482 | **Description** | ||
483 | )))|(% colspan="1" %)(% colspan="1" %) | ||
484 | ((( | ||
485 | Disables do not disturb on the specified extension. | ||
486 | |||
487 | {{info}} | ||
488 | This action will not be available if the extension is not bound to a licensed/full user. | ||
489 | {{/info}} | ||
490 | |||
491 | **Parameters:** | ||
492 | |||
493 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
494 | |||
495 | **Errors:** | ||
496 | |||
497 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
498 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
499 | ))) | ||
500 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
501 | ((( | ||
502 | **POST | ||
503 | ** | ||
504 | )))|(% colspan="1" %)(% colspan="1" %) | ||
505 | ((( | ||
506 | Disables do not disturb on the specified extension. | ||
507 | ))) | ||
508 | |||
509 | = Curl Examples = | ||
510 | |||
511 | === Get the status of a user in a specific core server === | ||
512 | |||
513 | {{code language="bash"}} | ||
514 | curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/users/status | ||
515 | {{/code}} | ||
516 | |||
517 | === Set the status of a user in a specific core server === | ||
518 | |||
519 | {{code language="bash"}} | ||
520 | 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 | ||
521 | {{/code}} | ||
522 | {{/layout-cell}} | ||
523 | {{/layout-section}} | ||
524 | {{/layout}} |