Wiki source code of Core Server Configuration

Last modified by michaely 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 core server REST resource allows access to the configuration of a core server. There are currently no top level properties of a core server that can be modified. This resource simply serves as a parent resource to access other sub/child resources.
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/api/resource/core
34 {{/code}}
35
36 = JSON Representation =
37
38 {{code}}
39 {
40 "serverId": "9280cd1c-4ad7-4ed9-ae8a-0648b0b45cf7"
41 }
42 {{/code}}
43
44 |=(((
45 Property
46 )))|=(((
47 Type
48 )))|=(((
49 Description
50 )))
51 |(((
52 {{{serverId}}}
53 )))|(((
54 String
55 )))|(((
56 The id of the core server that the configuration represents.
57 )))
58
59 = =
60
61 {{id name="auth_token_rest_json"/}}Session Authentication TokenThe following is the JSON used for requesting a Session Authentication Token from the core server resource.
62
63 == Request ==
64
65 {{code}}
66 {
67 "username": "johnd",
68 "password": "pass"
69 }
70 {{/code}}
71
72 |=(((
73 Property
74 )))|=(((
75 Type
76 )))|=(((
77 Description
78 )))
79 |(((
80 {{{username}}}
81 )))|(((
82 String
83 )))|(((
84 The authentication username to create the session token with.
85 )))
86 |(% colspan="1" %)(% colspan="1" %)
87 (((
88 {{{password}}}
89 )))|(% colspan="1" %)(% colspan="1" %)
90 (((
91 String
92 )))|(% colspan="1" %)(% colspan="1" %)
93 (((
94 The authentication password to create the session token with.
95 )))
96
97 == Reply ==
98
99 {{code}}
100 {
101 "sessionIdentifier": "1b841f86-8dfe-4e97-9609-8af83888fbfd",
102 "userIdentifier": "ed38fe4d-13ad-4fd0-be25-d3404c421370",
103 "expiry": 1417995590444,
104 "renewExpiry": false
105 }
106 {{/code}}
107
108 |=(((
109 Property
110 )))|=(((
111 Type
112 )))|=(((
113 Description
114 )))
115 |(((
116 {{{sessionIdentifier}}}
117 )))|(((
118 String
119 )))|(((
120 The identifier provided to the system when logging in with this session token.
121 )))
122 |(% colspan="1" %)(% colspan="1" %)
123 (((
124 {{{userIdentifier}}}
125 )))|(% colspan="1" %)(% colspan="1" %)
126 (((
127 String
128 )))|(% colspan="1" %)(% colspan="1" %)
129 (((
130 The UUID of the user this session token is related to.
131 )))
132 |(% colspan="1" %)(% colspan="1" %)
133 (((
134 {{{expiry}}}
135 )))|(% colspan="1" %)(% colspan="1" %)
136 (((
137 long
138 )))|(% colspan="1" %)(% colspan="1" %)
139 (((
140 The Unix timestamp, in milliseconds, when the token will expire.
141 )))
142 |(% colspan="1" %)(% colspan="1" %)
143 (((
144 {{{renewExpiry}}}
145 )))|(% colspan="1" %)(% colspan="1" %)
146 (((
147 boolean
148 )))|(% colspan="1" %)(% colspan="1" %)
149 (((
150 True if the session expiry will be extended when the token is successfully used.
151
152 {{info}}
153 This value will always be false for tokens created via the REST system.
154 {{/info}}
155 )))
156
157 = Resource Paths =
158
159 |=(% colspan="2" %)(% colspan="2" %)
160 (((
161 {{{communication_manager/api/resource/core}}}
162 )))
163 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
164 (((
165 **Description**
166 )))|(((
167 Accesses the configuration models for all core servers in the system.
168 )))
169 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
170 (((
171 **GET**
172 )))|(((
173 Gets all the configuration models for all core servers in the system.
174 )))
175 |(% colspan="2" %)(% colspan="2" %)
176 (((
177
178 )))
179 |=(% colspan="2" %)(% colspan="2" %)
180 (((
181 {{{communication_manager/api/resource/core/{core_server_id}}}}
182 )))
183 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
184 (((
185 **Description**
186 )))|(((
187 Accesses the configuration model for the specified core server.
188
189 **Parameters:**
190
191 * core_server_id: The UUID of the core server.
192
193 **Errors:**
194
195 * 404 'Failed to locate the core server with the given id.': Returned if no core server exists with the given id.
196 )))
197 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
198 (((
199 **GET**
200 )))|(((
201 Gets the chat configuration model for the specified core server.
202 )))
203
204 = Sub/Child Resource Paths =
205
206 |=(% colspan="2" %)(% colspan="2" %)
207 (((
208 {{{communication_manager/api/resource/core/{core_server_id}/users}}}
209 )))
210 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
211 (((
212 **Description**
213 )))|(% colspan="1" %)(% colspan="1" %)
214 (((
215 Access the sub/child resource for users, in a specified core server, via the core server id.
216
217 **Parameters:**
218
219 * core_server_id: The UUID of the core server.
220
221 **Errors:**
222
223 * 404 'Failed to locate the core server with the given id.': Returned if no core server exists with the given id.
224
225 See [[doc:User Configuration]] for more information.
226 )))
227 |(% colspan="2" %)(% colspan="2" %)
228 (((
229
230 )))
231 |=(% colspan="2" %)(% colspan="2" %)
232 (((
233 {{{communication_manager/api/resource/core/{core_server_id}/statuses}}}
234 )))
235 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
236 (((
237 **Description**
238 )))|(% colspan="1" %)(% colspan="1" %)
239 (((
240 Access the sub/child resource for statuses, in a specified core server via the via the core server id.
241
242 **Parameters:**
243
244 * core_server_id: The UUID of the core server.
245
246 **Errors:**
247
248 * (((
249 404 'Failed to locate the core server with the given id.': Returned if no core server exists with the given id.
250 )))
251
252 See [[doc:User Status Configuration]] for more information.
253 )))
254 |(% colspan="2" %)(% colspan="2" %)
255 (((
256
257 )))
258 |=(% class="highlight-grey" colspan="2" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="2" data-highlight-colour="grey" %)
259 (((
260 {{{communication_manager/api/resource/core/{core_server_id}/userGroups}}}
261 )))
262 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
263 (((
264 **Description**
265 )))|(((
266 Access the sub/child resource for user groups, in a specified core server via the via the core server id.
267
268 **Parameters:**
269
270 * core_server_id: The UUID of the core server.
271
272 **Errors:**
273
274 * (((
275 404 'Failed to locate the core server with the given id.': Returned if no core server exists with the given id.
276 )))
277
278 See [[doc:User Group Configuration]] for more information.
279 )))
280 |(% colspan="2" %)(% colspan="2" %)
281 (((
282
283 )))
284 |=(% class="highlight-grey" colspan="2" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="2" data-highlight-colour="grey" %)
285 (((
286 {{{communication_manager/api/resource/core/{core_server_id}/permissions}}}
287 )))
288 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
289 (((
290 **Description**
291 )))|(% colspan="1" %)(% colspan="1" %)
292 (((
293 Access the sub/child resource for permissions, in a specified core server via the via the core server id.
294
295 **Parameters:**
296
297 * core_server_id: The UUID of the core server.
298
299 **Errors:**
300
301 * (((
302 404 'Failed to locate the core server with the given id.': Returned if no core server exists with the given id.
303 )))
304
305 See [[doc:Permissions Configuration]] for more information.
306 )))
307 |(% colspan="2" %)(% colspan="2" %)
308 (((
309
310 )))
311 |=(% colspan="2" %)(% colspan="2" %)
312 (((
313 {{{communication_manager/api/resource/core/{core_server_id}/authToken}}}
314 )))
315 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
316 (((
317 **Description**
318 )))|(% colspan="1" %)(% colspan="1" %)
319 (((
320 Access the sub/child resource for creating authentication tokens, via the core server id.
321
322 For JSON used to in the request and response for this resource see [[Session Authentication Token>>doc:||anchor="auth_token_rest_json"]] above.
323
324 **Parameters:**
325
326 * core_server_id: The UUID of the core server.
327
328 **Errors:**
329
330 * (((
331 404 'Failed to locate the core server with the given id.': Returned if no core server exists with the given id.
332 )))
333
334 See [[doc:Session Authentication Tokens]] for more information.
335 )))
336
337 = Curl Examples =
338
339 === Get configuration for all core servers ===
340
341 {{code language="bash"}}
342 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/api/resource/core
343 {{/code}}
344
345 === Get the configuration for a specific core server ===
346
347 {{code language="bash"}}
348 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/api/resource/core/9280cd1c-4ad7-4ed9-ae8a-0648b0b45cf7
349 {{/code}}
350
351 === Request an authentication session token ===
352
353 {{code language="bash"}}
354 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"username":"johnd","password":"pass"}' http://localhost:55050/communication_manager/api/resource/core/9280cd1c-4ad7-4ed9-ae8a-0648b0b45cf7/authToken
355 {{/code}}
356 {{/layout-cell}}
357 {{/layout-section}}
358 {{/layout}}
iSymphony