Wiki source code of Extensions
Version 22.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 | {{/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 | )))|(% colspan="1" %)(% colspan="1" %) | ||
368 | ((( | ||
369 | Originates a call from the specified extension to a destination number. | ||
370 | ))) | ||
371 | |||
372 | = Curl Examples = | ||
373 | |||
374 | === Get the status of a user in a specific core server === | ||
375 | |||
376 | {{code language="bash"}} | ||
377 | curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/users/status | ||
378 | {{/code}} | ||
379 | |||
380 | === Set the status of a user in a specific core server === | ||
381 | |||
382 | {{code language="bash"}} | ||
383 | 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 | ||
384 | {{/code}} | ||
385 | {{/layout-cell}} | ||
386 | {{/layout-section}} | ||
387 | {{/layout}} |