Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{layout}} | ||
2 | {{layout-section ac:type="two_right_sidebar"}} | ||
3 | {{layout-cell}} | ||
4 | |||
5 | |||
6 | (% class="_mce_tagged_br" %) | ||
7 | * ((( | ||
8 | = Description = | ||
9 | ))) | ||
10 | |||
11 | The live status REST resource allows access to information about the status of a specific user in the system. ThisĀ resourceĀ also provides an action to update the status of a user. | ||
12 | {{/layout-cell}} | ||
13 | |||
14 | {{layout-cell}} | ||
15 | {{panel title="On this page:"}} | ||
16 | |||
17 | |||
18 | {{toc maxLevel="2" indent="1"/}} | ||
19 | {{/panel}} | ||
20 | {{/layout-cell}} | ||
21 | {{/layout-section}} | ||
22 | |||
23 | {{layout-section ac:type="single"}} | ||
24 | {{layout-cell}} | ||
25 | (% style="color: rgb(0,0,0);" %) | ||
26 | |||
27 | |||
28 | = (% style="color: rgb(0,0,0);" %)Root Resource Path(%%) = | ||
29 | |||
30 | {{code}} | ||
31 | communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/[{user_id} | getByName/{username}]/status | ||
32 | {{/code}} | ||
33 | |||
34 | = JSON Representation = | ||
35 | |||
36 | {{code}} | ||
37 | { | ||
38 | "id": "99c6c017-7c86-4d78-89ca-dbc1267ffe76", | ||
39 | "configurationId": "215734e0-383d-11e2-81c1-0800200c9a66", | ||
40 | "name": "Available", | ||
41 | "type": "available", | ||
42 | "note": "", | ||
43 | "returnTime": -1, | ||
44 | "userCreated": false | ||
45 | } | ||
46 | {{/code}} | ||
47 | |||
48 | |=((( | ||
49 | Property | ||
50 | )))|=((( | ||
51 | Type | ||
52 | )))|=((( | ||
53 | Description | ||
54 | ))) | ||
55 | |((( | ||
56 | {{{id}}} | ||
57 | )))|((( | ||
58 | String | ||
59 | )))|((( | ||
60 | The id of the user status. | ||
61 | ))) | ||
62 | |(% colspan="1" %)(% colspan="1" %) | ||
63 | ((( | ||
64 | {{{configurationId}}} | ||
65 | )))|(% colspan="1" %)(% colspan="1" %) | ||
66 | ((( | ||
67 | String | ||
68 | )))|(% colspan="1" %)(% colspan="1" %) | ||
69 | ((( | ||
70 | The id of the configuration object that represents the user status. | ||
71 | ))) | ||
72 | |(% colspan="1" %)(% colspan="1" %) | ||
73 | ((( | ||
74 | {{{name}}} | ||
75 | )))|(% colspan="1" %)(% colspan="1" %) | ||
76 | ((( | ||
77 | String | ||
78 | )))|(% colspan="1" %)(% colspan="1" %) | ||
79 | ((( | ||
80 | The status name. | ||
81 | ))) | ||
82 | |(% colspan="1" %)(% colspan="1" %) | ||
83 | ((( | ||
84 | type | ||
85 | )))|(% colspan="1" %)(% colspan="1" %) | ||
86 | ((( | ||
87 | String | ||
88 | )))|(% colspan="1" %)(% colspan="1" %) | ||
89 | ((( | ||
90 | The status type. Determines the icon used for the status. See Status Types below. | ||
91 | ))) | ||
92 | |(% colspan="1" %)(% colspan="1" %) | ||
93 | ((( | ||
94 | (% style="font-family: monospace;" %)note | ||
95 | )))|(% colspan="1" %)(% colspan="1" %) | ||
96 | ((( | ||
97 | String | ||
98 | )))|(% colspan="1" %)(% colspan="1" %) | ||
99 | ((( | ||
100 | The note set for the status. | ||
101 | ))) | ||
102 | |(% colspan="1" %)(% colspan="1" %) | ||
103 | ((( | ||
104 | returnTime | ||
105 | )))|(% colspan="1" %)(% colspan="1" %) | ||
106 | ((( | ||
107 | Long | ||
108 | )))|(% colspan="1" %)(% colspan="1" %) | ||
109 | ((( | ||
110 | The time the user has set to return, or -1 if no return time has been set. Represented as a unix timestamp, in milliseconds. | ||
111 | ))) | ||
112 | |(% colspan="1" %)(% colspan="1" %) | ||
113 | ((( | ||
114 | userCreated | ||
115 | )))|(% colspan="1" %)(% colspan="1" %) | ||
116 | ((( | ||
117 | Boolean | ||
118 | )))|(% colspan="1" %)(% colspan="1" %) | ||
119 | ((( | ||
120 | True, if the status is a custom status set by the user; false, if the status is a pre-configured status. | ||
121 | ))) | ||
122 | |||
123 | = Status Types = | ||
124 | |||
125 | The following is a list of accepted status types. These types will be used in the JSON representation of the status, and in the set action when changing the status. | ||
126 | |||
127 | {{info}} | ||
128 | The current status type set on a user does not effect call flow or any other actions in the panel. The status is simply used for informational purposes. | ||
129 | {{/info}} | ||
130 | |||
131 | |||
132 | |||
133 | * available | ||
134 | * unavailable | ||
135 | * away | ||
136 | * xa | ||
137 | * dnd | ||
138 | * chat | ||
139 | * altblue | ||
140 | * altgreen | ||
141 | * altpink | ||
142 | * altpurple | ||
143 | * altred | ||
144 | |||
145 | = Resource Paths = | ||
146 | |||
147 | |=(% colspan="2" %)(% colspan="2" %) | ||
148 | ((( | ||
149 | {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users}}} | ||
150 | ))) | ||
151 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
152 | ((( | ||
153 | **Description** | ||
154 | )))|((( | ||
155 | Accesses the state of all users in a core server. | ||
156 | |||
157 | **Parameters:** | ||
158 | |||
159 | * core_server_id: the id of the core server to get the user from | ||
160 | * core_server_slug: the slug of the core server to get the user from | ||
161 | |||
162 | **Errors:** | ||
163 | |||
164 | * 404 Not Found: Returned if no core server with the given id or slug exists | ||
165 | ))) | ||
166 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
167 | ((( | ||
168 | **GET** | ||
169 | )))|((( | ||
170 | Gets the state of all users in a core server. | ||
171 | ))) | ||
172 | |(% colspan="2" %)(% colspan="2" %) | ||
173 | ((( | ||
174 | |||
175 | ))) | ||
176 | |=(% class="highlight-grey" colspan="2" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="2" data-highlight-colour="grey" %) | ||
177 | ((( | ||
178 | {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/{user_id}}}} | ||
179 | ))) | ||
180 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
181 | ((( | ||
182 | **Description** | ||
183 | )))|((( | ||
184 | Accesses the state of a specific user in a core server, by user id. | ||
185 | |||
186 | **Parameters:** | ||
187 | |||
188 | * core_server_id: the id of the core server to get the user from | ||
189 | * core_server_slug: the slug of the core server to get the user from | ||
190 | * user_id: the id of the user to access | ||
191 | |||
192 | **Errors:** | ||
193 | |||
194 | * 404 Not Found: Returned if no core server with the given id or slug exists | ||
195 | * 404 Not Found: Returned if no user with the given id exists in the specified core server | ||
196 | ))) | ||
197 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
198 | ((( | ||
199 | **GET** | ||
200 | )))|((( | ||
201 | Gets the state of a specific user in a core server. | ||
202 | ))) | ||
203 | |(% colspan="2" %)(% colspan="2" %) | ||
204 | ((( | ||
205 | |||
206 | ))) | ||
207 | |=(% colspan="2" %)(% colspan="2" %) | ||
208 | ((( | ||
209 | {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/getByName/{username}}}} | ||
210 | ))) | ||
211 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
212 | ((( | ||
213 | **Description** | ||
214 | )))|(% colspan="1" %)(% colspan="1" %) | ||
215 | ((( | ||
216 | Accesses the state of a specific user in a core server, by username. | ||
217 | |||
218 | **Parameters:** | ||
219 | |||
220 | * core_server_id: the id of the core server to get the user from | ||
221 | * core_server_slug: the slug of the core server to get the user from | ||
222 | * user_name: the username of the user to access | ||
223 | |||
224 | **Errors:** | ||
225 | |||
226 | * 404 Not Found: Returned if no core server with the given id or slug exists | ||
227 | * 404 Not Found: Returned if no user with the given username exists in the specified core server | ||
228 | ))) | ||
229 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
230 | ((( | ||
231 | **GET** | ||
232 | )))|(% colspan="1" %)(% colspan="1" %) | ||
233 | ((( | ||
234 | Gets the state of a specific user in a core server. | ||
235 | ))) | ||
236 | |(% colspan="2" %)(% colspan="2" %) | ||
237 | ((( | ||
238 | |||
239 | ))) | ||
240 | |=(% colspan="2" %)(% colspan="2" %) | ||
241 | ((( | ||
242 | {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/[{user_id} | getByName/{username}]/logins}}} | ||
243 | ))) | ||
244 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
245 | ((( | ||
246 | **Description** | ||
247 | )))|(% colspan="1" %)(% colspan="1" %) | ||
248 | ((( | ||
249 | Access the sub/child resource for the active logins of specific user. | ||
250 | |||
251 | **Parameters:** | ||
252 | |||
253 | * core_server_id: the id of the parent core server\\ | ||
254 | * core_server_slug: the slug of the parent core server | ||
255 | * user_id: the id of the parent user | ||
256 | * user_name: the username of the parent user | ||
257 | |||
258 | **Errors:** | ||
259 | |||
260 | * 404 Not Found: Returned if no core server with the given id or slug exists | ||
261 | * 404 Not Found: Returned if no user with the given id or username exists in the specified core server | ||
262 | ))) | ||
263 | |(% colspan="2" %)(% colspan="2" %) | ||
264 | ((( | ||
265 | |||
266 | ))) | ||
267 | |=(% colspan="2" %)(% colspan="2" %) | ||
268 | ((( | ||
269 | {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/[{user_id} | getByName/{username}]/status}}} | ||
270 | ))) | ||
271 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
272 | ((( | ||
273 | **Description** | ||
274 | )))|(% colspan="1" %)(% colspan="1" %) | ||
275 | ((( | ||
276 | Access the sub/child resource for the status of a specific user. | ||
277 | |||
278 | **Parameters:** | ||
279 | |||
280 | * core_server_id: the id of the parent core server\\ | ||
281 | * core_server_slug: the slug of the parent core server | ||
282 | * user_id: the id of the parent user | ||
283 | * user_name: the username of the parent user | ||
284 | |||
285 | **Errors:** | ||
286 | |||
287 | * 404 Not Found: Returned if no core server with the given id or slug exists | ||
288 | * 404 Not Found: Returned if no user with the given id or username exists in the specified core server | ||
289 | ))) | ||
290 | |(% colspan="2" %)(% colspan="2" %) | ||
291 | ((( | ||
292 | |||
293 | ))) | ||
294 | |=(% colspan="2" %)(% colspan="2" %) | ||
295 | ((( | ||
296 | {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/[{user_id} | getByName/{username}]/extensions}}} | ||
297 | ))) | ||
298 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
299 | ((( | ||
300 | **Description** | ||
301 | )))|(% colspan="1" %)(% colspan="1" %) | ||
302 | ((( | ||
303 | Access the sub/child resource for the extensions bound to a specific user. | ||
304 | |||
305 | **Parameters:** | ||
306 | |||
307 | * core_server_id: the id of the parent core server\\ | ||
308 | * core_server_slug: the slug of the parent core server | ||
309 | * user_id: the id of the parent user | ||
310 | * user_name: the username of the parent user | ||
311 | |||
312 | **Errors:** | ||
313 | |||
314 | * 404 Not Found: Returned if no core server with the given id or slug exists | ||
315 | * 404 Not Found: Returned if no user with the given id or username exists in the specified core server | ||
316 | ))) | ||
317 | |||
318 | = | ||
319 | Curl Examples = | ||
320 | |||
321 | === Get the state of all users in a specific core server === | ||
322 | |||
323 | {{code language="bash"}} | ||
324 | curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/users | ||
325 | {{/code}} | ||
326 | |||
327 | === Get the state of a specific user in a specific core server === | ||
328 | |||
329 | {{code language="bash"}} | ||
330 | curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/users/4aff6119-54e8-4884-bff6-f76c7dddf74b | ||
331 | {{/code}} | ||
332 | {{/layout-cell}} | ||
333 | {{/layout-section}} | ||
334 | {{/layout}} |