Version 5.1 by michaely on 2016/05/31 14:05

Show last authors
1 {{layout}}
2 {{layout-section ac:type="two_right_sidebar"}}
3 {{layout-cell}}
4 {{warning}}
5 This page is currently being written. Although the information below is probably accurate, it may not be complete or may have errors.
6 {{/warning}}
7
8 {{info}}
9 The information on this page applies to **iSymphony 3.1+**.
10 {{/info}}
11
12 = (% style="color: rgb(0,0,0);" %)Description(%%) =
13
14 The Asterisk extension group configuration REST resource allows access to the configuration for extension groups in the system. This resource allows adding, removing, and updating of extension groups in the system.
15
16
17 {{/layout-cell}}
18
19 {{layout-cell}}
20 {{panel title="On this page:"}}
21
22
23 {{toc maxLevel="2" indent="1"/}}
24 {{/panel}}
25 {{/layout-cell}}
26 {{/layout-section}}
27
28 {{layout-section ac:type="single"}}
29 {{layout-cell}}
30 = (% style="color: rgb(0,0,0);" %)Root Resource Path(%%) =
31
32 {{code}}
33 communication_manager/rest/config/asterisk/{coreServerId}/extensionGroups
34 {{/code}}
35
36 = JSON Representation =
37
38 {{code}}
39 {
40 "id": "6faafc58-9e7d-461e-a3ab-de6e5fce6dee",
41 "displayName": "Not So Famous",
42 "publicGroup": true
43 }
44 {{/code}}
45
46 |=(((
47 Property
48 )))|=(((
49 Type
50 )))|=(((
51 Description
52 )))
53 |(((
54 {{{id}}}
55 )))|(((
56 String
57 )))|(((
58 Configuration id of the extension group.
59 )))
60 |(% colspan="1" %)(% colspan="1" %)
61 (((
62 {{{displayName}}}
63 )))|(% colspan="1" %)(% colspan="1" %)
64 (((
65 String
66 )))|(% colspan="1" %)(% colspan="1" %)
67 (((
68 The display name of the extension group.
69 )))
70 |(% colspan="1" %)(% colspan="1" %)
71 (((
72 publicGroup
73 )))|(% colspan="1" %)(% colspan="1" %)
74 (((
75 Boolean
76 )))|(% colspan="1" %)(% colspan="1" %)
77 (((
78 Flag specifying if the extension group is public or not.
79 )))
80
81 = Resource Paths =
82
83 |=(% colspan="2" %)(% colspan="2" %)
84 (((
85 {{{communication_manager/rest/config/asterisk/{coreServerId}/extensionGroups}}}
86 )))
87 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
88 (((
89 **Description**
90 )))|(((
91 Accesses all the extension groups in the core server.
92 )))
93 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
94 (((
95 **GET**
96 )))|(((
97 Gets the configuration for all the extension groups in the core server.
98 )))
99 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
100 (((
101 **POST
102 **
103 )))|(% colspan="1" %)(% colspan="1" %)
104 (((
105 Adds a extension group to the configuration.
106
107 (% style="line-height: 1.42857;" %)**Errors:**
108
109 * 409 'An extension group with the given id already exists.': Returned if an extension group with the given id already exists.
110 * 409 'An extension with the given displayName already exists.': Returned if an extension group with the given display name already exists.
111 * 412 'No displayName provided.': Returned if no display name was provided.
112 )))
113 |(% colspan="2" %)(% colspan="2" %)
114 (((
115
116 )))
117 |=(% colspan="2" %)(% colspan="2" %)
118 (((
119 {{{communication_manager/rest/config/asterisk/{coreServerId}/extensionGroups/{extensionGroupId}}}}
120 )))
121 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
122 (((
123 **Description**
124 )))|(((
125 Accesses the configuration of a specific extension group.
126
127 **Parameters:**
128
129 * extensionGroupId: The configuration id of the extension group.
130 )))
131 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
132 (((
133 **GET**
134 )))|(((
135 Gets the configuration of the specified extension group.
136
137 **Errors:**
138
139 * 404 'An extension group with the given id does not exist': Returned if no extension group exists with the given id.
140 )))
141 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
142 (((
143 **PUT**
144 )))|(% colspan="1" %)(% colspan="1" %)
145 (((
146 Updates the specified extension group configuration.
147
148 **Errors:**
149
150 * 404 'An extension group with the given id does not exist': Returned if no extension group exists with the given id.
151 * 409 'An extension with the given displayName already exists.': Returned if an extension group with the given display name already exists.
152 * 412 'No displayName provided.': Returned if no display name was provided.
153 )))
154 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
155 (((
156 **DELETE**
157 )))|(% colspan="1" %)(% colspan="1" %)
158 (((
159 Deletes the specified extension group.
160
161 **Errors:**
162
163 * 404 'An extension group with the given id does not exist': Returned if no extension gropu exists with the given id.
164 )))
165
166 = Sub/Child Resource Paths =
167
168 |=(% colspan="2" %)(% colspan="2" %)
169 (((
170 {{{communication_manager/rest/config/core/{coreServerId}/extensionGroups/{extensionGroupId}/extensions}}}
171 )))
172 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
173 (((
174 **Description**
175 )))|(% colspan="1" %)(% colspan="1" %)
176 (((
177 Access the sub/child resource for the extensions that belong to this group.
178
179 **Parameters:**
180
181 * extensionGroupId: The configuration id of the extension group.
182
183 **Errors:**
184
185 * 404 'An extension group with the given id does not exist': Returned if no extension group exists with the given id.
186 )))
187 |(% colspan="2" %)(% colspan="2" %)
188 (((
189
190 )))
191 |=(% colspan="2" %)(% colspan="2" %)
192 (((
193 {{{communication_manager/rest/config/core/{coreServerId}/extensionGroups/{extensionGroupId}/users}}}
194 )))
195 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
196 (((
197 **Description**
198 )))|(% colspan="1" %)(% colspan="1" %)
199 (((
200 Accesses the sub/child resource for the users who's extensions are part of this group.
201
202 **Parameters:**
203
204 * extensionGroupId: The configuration id of the extension group.
205
206 **Errors:**
207
208 * 404 'An extension group with the given id does not exist': Returned if no extension group exists with the given id.
209 )))
210 |(% colspan="2" %)(% colspan="2" %)
211 (((
212
213 )))
214 |=(% colspan="2" %)(% colspan="2" %)
215 (((
216 {{{communication_manager/rest/config/core/{coreServerId}/extensionGroups/{extensionGroupId}/viewers}}}
217 )))
218 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
219 (((
220 **Description**
221 )))|(% colspan="1" %)(% colspan="1" %)
222 (((
223 Accesses the sub/child resource for the users who are marked as viewers of the extension group.
224
225 **Parameters:**
226
227 * extensionGroupId: The configuration id of the extension group.
228
229 **Errors:**
230
231 * 404 'An extension group with the given id does not exist': Returned if no extension group exists with the given id.
232 )))
233 |(% colspan="2" %)(% colspan="2" %)
234 (((
235
236 )))
237 |=(% colspan="2" %)(% colspan="2" %)
238 (((
239 {{{communication_manager/rest/config/core/{coreServerId}/extensionGroups/{extensionGroupId}/editors}}}
240 )))
241 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
242 (((
243 **Description**
244 )))|(% colspan="1" %)(% colspan="1" %)
245 (((
246 Accesses the sub/child resource for the users who are marked as editors of the extension group.
247
248 **Parameters:**
249
250 * extensionGroupId: The configuration id of the extension group.
251
252 **Errors:**
253
254 * 404 'An extension group with the given id does not exist': Returned if no extension group exists with the given id.
255 )))
256
257 = Curl Examples =
258
259 === Get all extension groups in a core server ===
260
261 {{code language="bash"}}
262 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroups
263 {{/code}}
264
265 === Get the configuration for a specific extension group ===
266
267 {{code language="bash"}}
268 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroup/56cf70a3-1ee0-4b09-8f40-297430eeeddf
269 {{/code}}
270
271 === Add a new extension group ===
272
273 {{code language="bash"}}
274 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"6faafc58-9e7d-461e-a3ab-de6e5fce6dee","displayName":"Not So Famous","publicGroup":true},{"id":"3cd3e767-e9c6-4589-a7dc-9a431312611f","displayName":"Famous People","publicGroup":true}' http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroups
275 {{/code}}
276
277 === Delete an extension group ===
278
279 {{code language="bash"}}
280 curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroup/56cf70a3-1ee0-4b09-8f40-297430eeeddf
281 {{/code}}
282
283 === Update an extension group ===
284
285 {{code language="bash"}}
286 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"c46f4e60-aba2-4340-a6a5-0c7304d40ba1","displayName":"Not So Famous","publicGroup":false},{"id":"3cd3e767-e9c6-4589-a7dc-9a431312611f","displayName":"Famous People","publicGroup":true}' http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroup/c46f4e60-aba2-4340-a6a5-0c7304d40ba1
287 {{/code}}
288 {{/layout-cell}}
289 {{/layout-section}}
290 {{/layout}}