Wiki source code of Extensions
Version 23.1 by michaely on 2015/07/09 19:37
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 | = | ||
14 | {{/layout-cell}} | ||
15 | |||
16 | {{layout-cell}} | ||
17 | {{panel title="On this page:"}} | ||
18 | |||
19 | |||
20 | {{toc maxLevel="2" indent="1"/}} | ||
21 | {{/panel}} | ||
22 | {{/layout-cell}} | ||
23 | {{/layout-section}} | ||
24 | |||
25 | {{layout-section ac:type="single"}} | ||
26 | {{layout-cell}} | ||
27 | = (% style="color: rgb(0,0,0);" %) | ||
28 | (%%) = | ||
29 | |||
30 | = (% style="color: rgb(0,0,0);" %)JSON Representation(%%) = | ||
31 | |||
32 | {{code}} | ||
33 | { | ||
34 | "id": "e640205f-bc76-4db4-8e03-bf34eb33a8ce", | ||
35 | "extensionNumber": "4224", | ||
36 | "displayName": "Michael Y", | ||
37 | "configurationId": "813936dd-98a4-4ccc-8bcf-dd1f27673c1f", | ||
38 | "permissionId": "813936dd-98a4-4ccc-8bcf-dd1f27673c1f" | ||
39 | } | ||
40 | {{/code}} | ||
41 | |||
42 | (% style="line-height: 1.4285715;" %) | ||
43 | |=((( | ||
44 | Property | ||
45 | )))|=((( | ||
46 | Type | ||
47 | )))|=((( | ||
48 | Description | ||
49 | ))) | ||
50 | |((( | ||
51 | {{{id}}} | ||
52 | )))|((( | ||
53 | String | ||
54 | )))|((( | ||
55 | The id of the extension. | ||
56 | ))) | ||
57 | |(% colspan="1" %)(% colspan="1" %) | ||
58 | ((( | ||
59 | extensionNumber | ||
60 | )))|(% colspan="1" %)(% colspan="1" %) | ||
61 | ((( | ||
62 | String | ||
63 | )))|(% colspan="1" %)(% colspan="1" %) | ||
64 | ((( | ||
65 | The number used to access the extension. | ||
66 | ))) | ||
67 | |(% colspan="1" %)(% colspan="1" %) | ||
68 | ((( | ||
69 | displayName | ||
70 | )))|(% colspan="1" %)(% colspan="1" %) | ||
71 | ((( | ||
72 | String | ||
73 | )))|(% colspan="1" %)(% colspan="1" %) | ||
74 | ((( | ||
75 | The display name of the extension. | ||
76 | ))) | ||
77 | |(% colspan="1" %)(% colspan="1" %) | ||
78 | ((( | ||
79 | {{{configurationId}}} | ||
80 | )))|(% colspan="1" %)(% colspan="1" %) | ||
81 | ((( | ||
82 | String | ||
83 | )))|(% colspan="1" %)(% colspan="1" %) | ||
84 | ((( | ||
85 | The id of the configuration object that represents the extension. | ||
86 | ))) | ||
87 | |(% colspan="1" %)(% colspan="1" %) | ||
88 | ((( | ||
89 | {{{permissionId}}} | ||
90 | )))|(% colspan="1" %)(% colspan="1" %) | ||
91 | ((( | ||
92 | String | ||
93 | )))|(% colspan="1" %)(% colspan="1" %) | ||
94 | ((( | ||
95 | The extension's permission id. | ||
96 | ))) | ||
97 | |||
98 | = Root Resource Paths = | ||
99 | |||
100 | Paths used to access this resource, in relation to parent resources. | ||
101 | |||
102 | |=(% colspan="2" %)(% colspan="2" %) | ||
103 | ((( | ||
104 | {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/extensions}}} | ||
105 | ))) | ||
106 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
107 | ((( | ||
108 | **Description** | ||
109 | )))|((( | ||
110 | Provides access to all extensions in a specified core server. | ||
111 | |||
112 | {{info}} | ||
113 | Excludes any extensions that are not bound to a licensed/full user. | ||
114 | {{/info}} | ||
115 | |||
116 | **Parameters:** | ||
117 | |||
118 | * core_server_id: the id of the parent core server\\ | ||
119 | * core_server_slug: the slug of the parent core server | ||
120 | |||
121 | **Errors:** | ||
122 | |||
123 | * 404 Not Found: Returned if no core server with the given id or slug exists | ||
124 | ))) | ||
125 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
126 | ((( | ||
127 | **GET** | ||
128 | )))|(% colspan="1" %)(% colspan="1" %) | ||
129 | ((( | ||
130 | Gets all extensions in the specified core server. | ||
131 | ))) | ||
132 | |(% colspan="1" %)(% colspan="1" %) | ||
133 | ((( | ||
134 | |||
135 | )))|(% colspan="1" %)(% colspan="1" %) | ||
136 | ((( | ||
137 | |||
138 | ))) | ||
139 | |=(% colspan="2" %)(% colspan="2" %) | ||
140 | ((( | ||
141 | {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/user/[{user_id} | getByName/{username}]/extensions}}} | ||
142 | ))) | ||
143 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
144 | ((( | ||
145 | **Description** | ||
146 | )))|(% colspan="1" %)(% colspan="1" %) | ||
147 | ((( | ||
148 | Provides access to all the extensions bound to the specified user. | ||
149 | |||
150 | {{info}} | ||
151 | Excludes any extensions that are not bound to a licensed/full user. | ||
152 | {{/info}} | ||
153 | |||
154 | **Parameters:** | ||
155 | |||
156 | * core_server_id: the id of the parent core server\\ | ||
157 | * core_server_slug: the slug of the parent core server | ||
158 | * user_id: the id of the parent user | ||
159 | * username: the username of the parent user | ||
160 | |||
161 | **Errors:** | ||
162 | |||
163 | * 404 Not Found: Returned if no core server with the given id or slug exists | ||
164 | * 404 Not Found: Returned if no user with the given id or username exists | ||
165 | ))) | ||
166 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
167 | ((( | ||
168 | **GET** | ||
169 | )))|(% colspan="1" %)(% colspan="1" %) | ||
170 | ((( | ||
171 | Gets all extensions bound to the specified extension. | ||
172 | ))) | ||
173 | |||
174 | = Instance Resource Paths = | ||
175 | |||
176 | Paths used to access a specific instance of this resource. | ||
177 | |||
178 | |=(% colspan="2" %)(% colspan="2" %) | ||
179 | ((( | ||
180 | {{{{root_resource_path}/{extension_id}}}} | ||
181 | ))) | ||
182 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
183 | ((( | ||
184 | **Description** | ||
185 | )))|(% colspan="1" %)(% colspan="1" %) | ||
186 | ((( | ||
187 | Provides access to a specific extension, by extension id. | ||
188 | |||
189 | {{info}} | ||
190 | This resource will not be available if the extension is not bound to a licensed/full user. | ||
191 | {{/info}} | ||
192 | |||
193 | **Parameters:** | ||
194 | |||
195 | * root_resource_path: One of the root resource paths for this resource. See Root Resource Paths above\\ | ||
196 | * core_server_id: the id of the parent core server\\ | ||
197 | * core_server_slug: the slug of the parent core server | ||
198 | * extension_id: the id of the extension to access | ||
199 | |||
200 | **Errors:** | ||
201 | |||
202 | * 404 Not Found: Returned if any of the ancestors in the root resource path could not be found | ||
203 | * 403 Forbidden: Returned if the extension is not bound to a licensed/full user | ||
204 | ))) | ||
205 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
206 | ((( | ||
207 | **GET** | ||
208 | )))|(% colspan="1" %)(% colspan="1" %) | ||
209 | ((( | ||
210 | Gets the specified extension. | ||
211 | ))) | ||
212 | |(% colspan="2" %)(% colspan="2" %) | ||
213 | ((( | ||
214 | |||
215 | ))) | ||
216 | |=(% colspan="2" %)(% colspan="2" %) | ||
217 | ((( | ||
218 | {{{{root_resource_path}/getByName/{extension_number}}}} | ||
219 | ))) | ||
220 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
221 | ((( | ||
222 | **Description** | ||
223 | )))|(% colspan="1" %)(% colspan="1" %) | ||
224 | ((( | ||
225 | Provides access to a specific extension, by extension number. | ||
226 | |||
227 | {{info}} | ||
228 | This resource will not be available if the extension is not bound to a licensed/full user. | ||
229 | {{/info}} | ||
230 | |||
231 | **Parameters:** | ||
232 | |||
233 | * root_resource_path: One of the root resource paths for this resource. See Root Resource Paths above\\ | ||
234 | * core_server_id: the id of the parent core server\\ | ||
235 | * core_server_slug: the slug of the parent core server | ||
236 | * extension_number: the extension number of the extension to access | ||
237 | |||
238 | **Errors:** | ||
239 | |||
240 | * 404 Not Found: Returned if any of the ancestors in the root resource path could not be found | ||
241 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
242 | ))) | ||
243 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
244 | ((( | ||
245 | **GET** | ||
246 | )))|(% colspan="1" %)(% colspan="1" %) | ||
247 | ((( | ||
248 | Gets the specified extension. | ||
249 | ))) | ||
250 | |||
251 | = Sub Resource Paths = | ||
252 | |||
253 | Paths used to access the child resources, this resource provides. | ||
254 | |||
255 | |=(% colspan="2" %)(% colspan="2" %) | ||
256 | ((( | ||
257 | {{{{instance_resource_path}/agents}}} | ||
258 | ))) | ||
259 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
260 | ((( | ||
261 | **Description** | ||
262 | )))|(% colspan="1" %)(% colspan="1" %) | ||
263 | ((( | ||
264 | See Agents. | ||
265 | |||
266 | {{info}} | ||
267 | This resource will not be available if the extension is not bound to a licensed/full user. | ||
268 | {{/info}} | ||
269 | |||
270 | **Parameters:** | ||
271 | |||
272 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
273 | |||
274 | **Errors:** | ||
275 | |||
276 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
277 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
278 | ))) | ||
279 | |=(% colspan="2" %)(% colspan="2" %) | ||
280 | ((( | ||
281 | {{{{instance_resource_path}/callSegments}}} | ||
282 | ))) | ||
283 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
284 | ((( | ||
285 | **Description** | ||
286 | )))|(% colspan="1" %)(% colspan="1" %) | ||
287 | ((( | ||
288 | See Call Segments. | ||
289 | |||
290 | {{info}} | ||
291 | This resource will not be available if the extension is not bound to a licensed/full user. | ||
292 | {{/info}} | ||
293 | |||
294 | **Parameters:** | ||
295 | |||
296 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
297 | |||
298 | **Errors:** | ||
299 | |||
300 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
301 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
302 | ))) | ||
303 | |||
304 | = Action Paths = | ||
305 | |||
306 | Actions that can be performed on this resource. | ||
307 | |||
308 | |=(% colspan="2" %)(% colspan="2" %) | ||
309 | ((( | ||
310 | {{{{instance_resource_path}/originate}}} | ||
311 | ))) | ||
312 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
313 | ((( | ||
314 | **Description** | ||
315 | )))|((( | ||
316 | Originates a call from the specified extension. | ||
317 | |||
318 | {{info}} | ||
319 | This action will not be available if the extension is not bound to a licensed/full user. | ||
320 | {{/info}} | ||
321 | |||
322 | **Parameters:** | ||
323 | |||
324 | * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above | ||
325 | |||
326 | **Errors:** | ||
327 | |||
328 | * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found | ||
329 | * 403 Forbidden: Returned if if the extension is not bound to a licensed/full user | ||
330 | ))) | ||
331 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
332 | ((( | ||
333 | **JSON** | ||
334 | )))|(% colspan="1" %)(% colspan="1" %) | ||
335 | ((( | ||
336 | {{code}} | ||
337 | { | ||
338 | "destinationNumber": "18005555555" | ||
339 | } | ||
340 | {{/code}} | ||
341 | |||
342 | **Properties:** | ||
343 | |||
344 | |=((( | ||
345 | Property | ||
346 | )))|=((( | ||
347 | Type | ||
348 | )))|=((( | ||
349 | Description | ||
350 | ))) | ||
351 | |(% colspan="1" %)(% colspan="1" %) | ||
352 | ((( | ||
353 | {{{destinationNumber}}} | ||
354 | )))|(% colspan="1" %)(% colspan="1" %) | ||
355 | ((( | ||
356 | String | ||
357 | )))|(% colspan="1" %)(% colspan="1" %) | ||
358 | ((( | ||
359 | The number to originate to. | ||
360 | ))) | ||
361 | |||
362 | ** | ||
363 | ** | ||
364 | ))) | ||
365 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
366 | ((( | ||
367 | **POST** | ||
368 | )))|(% colspan="1" %)(% colspan="1" %) | ||
369 | ((( | ||
370 | Originates a call from the specified extension to a destination number. | ||
371 | ))) | ||
372 | |||
373 | = Curl Examples = | ||
374 | |||
375 | === Get the status of a user in a specific core server === | ||
376 | |||
377 | {{code language="bash"}} | ||
378 | curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/users/status | ||
379 | {{/code}} | ||
380 | |||
381 | === Set the status of a user in a specific core server === | ||
382 | |||
383 | {{code language="bash"}} | ||
384 | 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 | ||
385 | {{/code}} | ||
386 | {{/layout-cell}} | ||
387 | {{/layout-section}} | ||
388 | {{/layout}} |