Wiki source code of Extensions

Version 21.1 by michaely on 2015/07/09 19:44

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 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, this resource provides.
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 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 |=(% colspan="2" %)(% colspan="2" %)
279 (((
280 {{{{instance_resource_path}/callSegments}}}
281 )))
282 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
283 (((
284 **Description**
285 )))|(% colspan="1" %)(% colspan="1" %)
286 (((
287 See Call Segments.
288
289 {{info}}
290 This resource will not be available if the extension is not bound to a licensed/full user.
291 {{/info}}
292
293 **Parameters:**
294
295 * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above
296
297 **Errors:**
298
299 * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found
300 * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user
301 )))
302
303 = Action Paths =
304
305 Actions that can be performed on this resource.
306
307 |=(% colspan="2" %)(% colspan="2" %)
308 (((
309 {{{{instance_resource_path}/originate}}}
310 )))
311 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
312 (((
313 **Description**
314 )))|(((
315 Originates a call from the specified extension.
316
317 {{info}}
318 This action will not be available if the extension is not bound to a licensed/full user.
319 {{/info}}
320
321 **Parameters:**
322
323 * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above
324
325 **Errors:**
326
327 * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found
328 * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user
329 )))
330 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
331 (((
332 **JSON**
333 )))|(% colspan="1" %)(% colspan="1" %)
334 (((
335 {{code}}
336 {
337 "destinationNumber": "18005555555"
338 }
339 {{/code}}
340
341 **Properties:**
342
343 |=(((
344 Property
345 )))|=(((
346 Type
347 )))|=(((
348 Description
349 )))
350 |(% colspan="1" %)(% colspan="1" %)
351 (((
352 {{{destinationNumber}}}
353 )))|(% colspan="1" %)(% colspan="1" %)
354 (((
355 String
356 )))|(% colspan="1" %)(% colspan="1" %)
357 (((
358 The number to originate to.
359 )))
360
361 **
362 **
363 )))
364 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
365 (((
366 **POST
367 **
368 )))|(% colspan="1" %)(% colspan="1" %)
369 (((
370 Originates a call from the specified extension to a destination number.
371 )))
372 |(% colspan="2" %)(% colspan="2" %)
373 (((
374
375 )))
376 |=(% colspan="2" %)(% colspan="2" %)
377 (((
378 {{{{instance_resource_path}/enableDnd}}}
379 )))
380 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
381 (((
382 **Description**
383 )))|(% colspan="1" %)(% colspan="1" %)
384 (((
385 Enables do not disturb on the specified extension.
386
387 {{info}}
388 This action will not be available if the extension is not bound to a licensed/full user.
389 {{/info}}
390
391 **Parameters:**
392
393 * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above
394
395 **Errors:**
396
397 * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found
398 * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user
399 )))
400 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
401 (((
402 **POST
403 **
404 )))|(% colspan="1" %)(% colspan="1" %)
405 (((
406 Enables do not disturb on the specified extension.
407 )))
408 |(% colspan="2" %)(% colspan="2" %)
409 (((
410
411 )))
412 |=(% colspan="2" %)(% colspan="2" %)
413 (((
414 {{{{instance_resource_path}/disableDnd}}}
415 )))
416 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
417 (((
418 **Description**
419 )))|(% colspan="1" %)(% colspan="1" %)
420 (((
421 Disables do not disturb on the specified extension.
422
423 {{info}}
424 This action will not be available if the extension is not bound to a licensed/full user.
425 {{/info}}
426
427 **Parameters:**
428
429 * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above
430
431 **Errors:**
432
433 * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found
434 * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user
435 )))
436 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
437 (((
438 **POST
439 **
440 )))|(% colspan="1" %)(% colspan="1" %)
441 (((
442 Disables do not disturb on the specified extension.
443 )))
444
445 = Curl Examples =
446
447 === Get the status of a user in a specific core server ===
448
449 {{code language="bash"}}
450 curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/users/status
451 {{/code}}
452
453 === Set the status of a user in a specific core server ===
454
455 {{code language="bash"}}
456 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
457 {{/code}}
458 {{/layout-cell}}
459 {{/layout-section}}
460 {{/layout}}