Last modified by ryanp on 2021/09/10 23:34

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 group 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 See [[doc:Asterisk Extension Group Extensions]] for more information.
188 )))
189 |(% colspan="2" %)(% colspan="2" %)
190 (((
191
192 )))
193 |=(% colspan="2" %)(% colspan="2" %)
194 (((
195 {{{communication_manager/rest/config/core/{coreServerId}/extensionGroups/{extensionGroupId}/users}}}
196 )))
197 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
198 (((
199 **Description**
200 )))|(% colspan="1" %)(% colspan="1" %)
201 (((
202 Accesses the sub/child resource for the users who's extensions are part of this group.
203
204 **Parameters:**
205
206 * extensionGroupId: The configuration id of the extension group.
207
208 **Errors:**
209
210 * 404 'An extension group with the given id does not exist': Returned if no extension group exists with the given id.
211
212 See [[doc:Asterisk Extension Group Users]] for more information.
213 )))
214 |(% colspan="2" %)(% colspan="2" %)
215 (((
216
217 )))
218 |=(% colspan="2" %)(% colspan="2" %)
219 (((
220 {{{communication_manager/rest/config/core/{coreServerId}/extensionGroups/{extensionGroupId}/viewers}}}
221 )))
222 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
223 (((
224 **Description**
225 )))|(% colspan="1" %)(% colspan="1" %)
226 (((
227 Accesses the sub/child resource for the users who are marked as viewers of the extension group.
228
229 **Parameters:**
230
231 * extensionGroupId: The configuration id of the extension group.
232
233 **Errors:**
234
235 * 404 'An extension group with the given id does not exist': Returned if no extension group exists with the given id.
236
237 See [[doc:Asterisk Extension Group Viewers]] for more information.
238 )))
239 |(% colspan="2" %)(% colspan="2" %)
240 (((
241
242 )))
243 |=(% colspan="2" %)(% colspan="2" %)
244 (((
245 {{{communication_manager/rest/config/core/{coreServerId}/extensionGroups/{extensionGroupId}/editors}}}
246 )))
247 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
248 (((
249 **Description**
250 )))|(% colspan="1" %)(% colspan="1" %)
251 (((
252 Accesses the sub/child resource for the users who are marked as editors of the extension group.
253
254 **Parameters:**
255
256 * extensionGroupId: The configuration id of the extension group.
257
258 **Errors:**
259
260 * 404 'An extension group with the given id does not exist': Returned if no extension group exists with the given id.
261
262 See [[doc:Asterisk Extension Group Editors]] for more information.
263 )))
264
265 = Curl Examples =
266
267 === Get all extension groups in a core server ===
268
269 {{code language="bash"}}
270 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroups
271 {{/code}}
272
273 === Get the configuration for a specific extension group ===
274
275 {{code language="bash"}}
276 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
277 {{/code}}
278
279 === Add a new extension group ===
280
281 {{code language="bash"}}
282 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/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroups
283 {{/code}}
284
285 === Delete an extension group ===
286
287 {{code language="bash"}}
288 curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroup/56cf70a3-1ee0-4b09-8f40-297430eeeddf
289 {{/code}}
290
291 === Update an extension group ===
292
293 {{code language="bash"}}
294 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/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroup/c46f4e60-aba2-4340-a6a5-0c7304d40ba1
295 {{/code}}
296 {{/layout-cell}}
297 {{/layout-section}}
298 {{/layout}}
iSymphony