Wiki source code of Status

Version 7.1 by michaely on 2015/07/10 16:20

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.2+**.
10 {{/info}}
11
12 {{note}}
13 This resource is restricted by licensing. See the resource and action path information below for more details.
14 {{/note}}
15
16
17
18 (% style="color: rgb(0,0,0);font-size: 24.0px;line-height: 1.25;" %)Description
19
20 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.
21 {{/layout-cell}}
22
23 {{layout-cell}}
24 {{panel title="On this page:"}}
25
26
27 {{toc maxLevel="2" indent="1"/}}
28 {{/panel}}
29 {{/layout-cell}}
30 {{/layout-section}}
31
32 {{layout-section ac:type="single"}}
33 {{layout-cell}}
34 (% style="color: rgb(0,0,0);" %)
35
36
37 = JSON Representation =
38
39 {{code}}
40 {
41 "id": "99c6c017-7c86-4d78-89ca-dbc1267ffe76",
42 "configurationId": "215734e0-383d-11e2-81c1-0800200c9a66",
43 "name": "Went back in time",
44 "type": "away",
45 "note": "Tell Doc Brown",
46 "returnTime": 499132800,
47 "userCreated": true
48 }
49 {{/code}}
50
51 |=(((
52 Property
53 )))|=(((
54 Type
55 )))|=(((
56 Description
57 )))
58 |(((
59 {{{id}}}
60 )))|(((
61 String
62 )))|(((
63 The id of the user status.
64 )))
65 |(% colspan="1" %)(% colspan="1" %)
66 (((
67 {{{configurationId}}}
68 )))|(% colspan="1" %)(% colspan="1" %)
69 (((
70 String
71 )))|(% colspan="1" %)(% colspan="1" %)
72 (((
73 The id of the configuration object that represents the user status.
74 )))
75 |(% colspan="1" %)(% colspan="1" %)
76 (((
77 {{{name}}}
78 )))|(% colspan="1" %)(% colspan="1" %)
79 (((
80 String
81 )))|(% colspan="1" %)(% colspan="1" %)
82 (((
83 The status name.
84 )))
85 |(% colspan="1" %)(% colspan="1" %)
86 (((
87 type
88 )))|(% colspan="1" %)(% colspan="1" %)
89 (((
90 String
91 )))|(% colspan="1" %)(% colspan="1" %)
92 (((
93 The status type. Determines the icon used for the status. See Status Types below.
94 )))
95 |(% colspan="1" %)(% colspan="1" %)
96 (((
97 (% style="font-family: monospace;" %)note
98 )))|(% colspan="1" %)(% colspan="1" %)
99 (((
100 String
101 )))|(% colspan="1" %)(% colspan="1" %)
102 (((
103 The note set for the status.
104 )))
105 |(% colspan="1" %)(% colspan="1" %)
106 (((
107 returnTime
108 )))|(% colspan="1" %)(% colspan="1" %)
109 (((
110 Long
111 )))|(% colspan="1" %)(% colspan="1" %)
112 (((
113 The time the user has set to return, or -1 if no return time has been set. Represented as a unix timestamp, in milliseconds.
114 )))
115 |(% colspan="1" %)(% colspan="1" %)
116 (((
117 userCreated
118 )))|(% colspan="1" %)(% colspan="1" %)
119 (((
120 Boolean
121 )))|(% colspan="1" %)(% colspan="1" %)
122 (((
123 True, if the status is a custom status set by the user; false, if the status is a pre-configured status.
124 )))
125
126 = Status Types =
127
128 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.
129
130 {{info}}
131 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.
132 {{/info}}
133
134
135
136 * available
137 * unavailable
138 * away
139 * xa
140 * dnd
141 * chat
142 * altblue
143 * altgreen
144 * altpink
145 * altpurple
146 * altred
147
148 = Instance Resource Paths =
149
150 Paths used to access a specific instance of the resource.
151
152 |=(% colspan="2" %)(% colspan="2" %)
153 (((
154 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/users/[{user_id} | getByName/{username}]/status}}}
155 )))
156 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
157 (((
158 **Description**
159 )))|(((
160 Provides access to the status of the specified user.
161
162 {{info}}
163 This resource will not be available if the user is not licensed/full, or no license is installed on the core server.
164 {{/info}}
165
166 (% style="line-height: 1.4285715;" %)**Parameters:**
167
168 * core_server_id: the id of the parent core server\\
169 * core_server_slug: the slug of the parent core server
170 * user_id: the id of the parent user
171 * user_name: the username of the parent user
172
173 **Errors:**
174
175 * 404 Not Found: Returned if no core server with the given id or slug exists
176 * 404 Not Found: Returned if no user with the given id or username exists, in the specified core server
177 * 403 Forbidden: Returned if the user is not licensed/full, or no license is installed on the core server.
178 )))
179 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
180 (((
181 **GET**
182 )))|(((
183 Gets the status of the specified user.
184 )))
185
186 = Action Paths =
187
188 Actions that can be performed on this resource.
189
190 |=(% colspan="2" %)(% colspan="2" %)
191 (((
192 {{{{instance_resource_path}/set}}}
193 )))
194 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
195 (((
196 **Description**
197 )))|(((
198 Updates the status of a user.
199
200 {{info}}
201 This action will not be available if the user is not licensed/full, or no license is installed on the core server.
202 {{/info}}
203
204 (% style="line-height: 1.4285715;" %)**Parameters:**
205
206 * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above
207
208 **Errors:**
209
210 * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found
211 * 422 Unprocessable Entity: Returned if no JSON name property is given
212 * 422 Unprocessable Entity: Returned if no JSON type property is given
213 * 422 Unprocessable Entity: Returned if the JSON type property value is not valid
214 * 422 Unprocessable Entity: Returned if the JSON returnTime property value is to0 large, or is a non numerical value.
215 * 403 Forbidden: Returned if the user is not licensed/full, or no license is installed on the core server.
216 )))
217 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
218 (((
219 **JSON**
220 )))|(% colspan="1" %)(% colspan="1" %)
221 (((
222 {{code}}
223 {
224 "name": "Went back in time",
225 "type": "away",
226 "note": "Tell Doc Brown",
227 "returnTime": 499132800
228 }
229 {{/code}}
230
231 **Properties:**
232
233 |=(((
234 Property
235 )))|=(((
236 Type
237 )))|=(((
238 Description
239 )))
240 |(% colspan="1" %)(% colspan="1" %)
241 (((
242 {{{name}}}
243 )))|(% colspan="1" %)(% colspan="1" %)
244 (((
245 String
246 )))|(% colspan="1" %)(% colspan="1" %)
247 (((
248 The status name.
249 )))
250 |(% colspan="1" %)(% colspan="1" %)
251 (((
252 type
253 )))|(% colspan="1" %)(% colspan="1" %)
254 (((
255 String
256 )))|(% colspan="1" %)(% colspan="1" %)
257 (((
258 The status type. Determines the icon used for the status. See Status Types above.
259 )))
260 |(% colspan="1" %)(% colspan="1" %)
261 (((
262 note
263 )))|(% colspan="1" %)(% colspan="1" %)
264 (((
265 String
266 )))|(% colspan="1" %)(% colspan="1" %)
267 (((
268 The note for the status.
269 )))
270 |(% colspan="1" %)(% colspan="1" %)
271 (((
272 returnTime
273 )))|(% colspan="1" %)(% colspan="1" %)
274 (((
275 Long
276 )))|(% colspan="1" %)(% colspan="1" %)
277 (((
278 The time the user is returning, or -1 for no return time. Represented as a unix timestamp, in milliseconds.
279 )))
280
281 **
282 **
283 )))
284 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
285 (((
286 **POST**
287 )))|(% colspan="1" %)(% colspan="1" %)
288 (((
289 Updates the status of the user.
290 )))
291
292 = Curl Examples =
293
294 === Get the status of a specific user ===
295
296 {{code language="bash"}}
297 curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/users/status
298 {{/code}}
299
300 === Set the status of a specific user ===
301
302 {{code language="bash"}}
303 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
304 {{/code}}
305 {{/layout-cell}}
306 {{/layout-section}}
307 {{/layout}}