Wiki source code of User Status 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 user status configuration REST resource allows access to the configuration for predefined users statuses. This resource allows adding, removing, and updating predefined user statuses 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/core/{coreServerId}/statuses
34 {{/code}}
35
36 = JSON Representation =
37
38 {{code}}
39 {
40 "id": "34c2d569-b92b-4587-916d-627035f6d038",
41 "name": "Out To Lunch",
42 "type": "unavailable",
43 "note": "Went to that awesome taco place down the street."
44 }
45 {{/code}}
46
47 |=(((
48 Property
49 )))|=(((
50 Type
51 )))|=(((
52 Description
53 )))
54 |(((
55 {{{id}}}
56 )))|(((
57 String
58 )))|(((
59 Configuration id of the user status.
60 )))
61 |(% colspan="1" %)(% colspan="1" %)
62 (((
63 name
64 )))|(% colspan="1" %)(% colspan="1" %)
65 (((
66 String
67 )))|(% colspan="1" %)(% colspan="1" %)
68 (((
69 The display name of the status.
70 )))
71 |(% colspan="1" %)(% colspan="1" %)
72 (((
73 type
74 )))|(% colspan="1" %)(% colspan="1" %)
75 (((
76 String
77 )))|(% colspan="1" %)(% colspan="1" %)
78 (((
79 The status type. Determines the icon used for the status. The following values are allowed.
80
81 * available
82 * unavailable
83 * out
84 * altblue
85 * altgreen
86 * altpink
87 * altpurple
88 * altred
89 )))
90 |(% colspan="1" %)(% colspan="1" %)
91 (((
92 note
93 )))|(% colspan="1" %)(% colspan="1" %)
94 (((
95 String
96 )))|(% colspan="1" %)(% colspan="1" %)
97 (((
98 Note for the status. Set to blank string for no note.
99 )))
100
101 = Resource Paths =
102
103 |=(% colspan="2" %)(% colspan="2" %)
104 (((
105 {{{communication_manager/rest/config/core/{coreServerId}/statuses}}}
106 )))
107 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
108 (((
109 **Description**
110 )))|(((
111 Accesses all the predefined statuses in the core server.
112 )))
113 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
114 (((
115 **GET**
116 )))|(((
117 Gets all the predefined statuses in the core server.
118 )))
119 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
120 (((
121 **POST
122 **
123 )))|(% colspan="1" %)(% colspan="1" %)
124 (((
125 Adds a user status to the configuration.
126
127 (% style="line-height: 1.42857;" %)**Errors:**
128
129 * 409 'A status with the given id already exists.': Returned if a status with the given id already exists.
130 * 409 'A status with the given name already exists.': Returned if a status with the given name already exists.
131 * 412 'No name provided.': Returned if no name was provided.
132 * 412 'No type provided.': Returned if no type was provided.
133 * 412 'No note provided.': Returned if no note was provided.
134 * 400 'The status type that was provided was not a valid type please use one of the following': The type value provides is invalid.
135 )))
136 |(% colspan="2" %)(% colspan="2" %)
137 (((
138
139 )))
140 |=(% colspan="2" %)(% colspan="2" %)
141 (((
142 {{{communication_manager/rest/config/core/{coreServerId}/statuses/{statusId}}}}
143 )))
144 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
145 (((
146 **Description**
147 )))|(((
148 Accesses the configuration of a specific predefined status.
149
150 **Parameters:**
151
152 * statusId: The configuration id of the user status.
153 )))
154 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
155 (((
156 **GET**
157 )))|(((
158 Gets the configuration of the specified status.
159
160 **Errors:**
161
162 * 404 'A status with the given id does not exist': Returned if no status exists with the given id.
163 )))
164 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
165 (((
166 **PUT**
167 )))|(% colspan="1" %)(% colspan="1" %)
168 (((
169 Updates the specified status.
170
171 **Errors:**
172
173 * 404 'A status with the given id does not exist': Returned if no status exists with the given id.
174 * 409 'A status with the given name already exists.': Returned if a status with the given name already exists.
175 * 412 'No name provided.': Returned if no name was provided.
176 * 412 'No type provided.': Returned if no type was provided.
177 * 412 'No note provided.': Returned if no note was provided.
178 * 400 'The status type that was provided was not a valid type please use one of the following': The type value provides is invalid.
179 )))
180 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
181 (((
182 **DELETE**
183 )))|(% colspan="1" %)(% colspan="1" %)
184 (((
185 Deletes the specified status.
186
187 **Errors:**
188
189 * 404 'A status with the given id does not exist': Returned if no status exists with the given id.
190 )))
191
192 = Curl Examples =
193
194 === Get all statuses in a core server ===
195
196 {{code language="bash"}}
197 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/statuses
198 {{/code}}
199
200 === Get the configuration for a specific status ===
201
202 {{code language="bash"}}
203 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/statuses/56cf70a3-1ee0-4b09-8f40-297430eeeddf
204 {{/code}}
205
206 === Add a new status ===
207
208 {{code language="bash"}}
209 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"53b8b3b8-a338-4179-a0e9-67ab9b3d0d9d","name":"On Vacation","type":"away","note":""}' http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/statuses
210 {{/code}}
211
212 === Delete a status ===
213
214 {{code language="bash"}}
215 curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/statuses/56cf70a3-1ee0-4b09-8f40-297430eeeddf
216 {{/code}}
217
218 === Update a status ===
219
220 {{code language="bash"}}
221 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"53b8b3b8-a338-4179-a0e9-67ab9b3d0d9d","name":"On Vacation","type":"unavailable","note":""}' http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/statuses/56cf70a3-1ee0-4b09-8f40-297430eeeddf
222 {{/code}}
223 {{/layout-cell}}
224 {{/layout-section}}
225 {{/layout}}
iSymphony