Wiki source code of Administrator 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 administrator REST resource allows access to the configuration for system administrators. This resource allows adding, removing, and updating of administrators 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/server/administrators
34 {{/code}}
35
36 = JSON Representation =
37
38 {{code}}
39 {
40 "id": "ee828da8-5ee6-413d-82ac-1273f598659d",
41 "userName": "admin",
42 "password": "d36c07e15f98bea42b1cd80bca5b5ce4d9131c68",
43 "superUser": true
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 administrator.
60 )))
61 |(% colspan="1" %)(% colspan="1" %)
62 (((
63 userName
64 )))|(% colspan="1" %)(% colspan="1" %)
65 (((
66 String
67 )))|(% colspan="1" %)(% colspan="1" %)
68 (((
69 Username of the Administrator.
70 )))
71 |(% colspan="1" %)(% colspan="1" %)
72 (((
73 password
74 )))|(% colspan="1" %)(% colspan="1" %)
75 (((
76 String
77 )))|(% colspan="1" %)(% colspan="1" %)
78 (((
79 SHA-1 hash of the administrators password.
80 )))
81 |(% colspan="1" %)(% colspan="1" %)
82 (((
83 superUser
84 )))|(% colspan="1" %)(% colspan="1" %)
85 (((
86 Boolean
87 )))|(% colspan="1" %)(% colspan="1" %)
88 (((
89 Flags specifying if the administrator is a super admin.
90 )))
91
92 = Resource Paths =
93
94 |=(% colspan="2" %)(% colspan="2" %)
95 (((
96 {{{communication_manager/rest/config/server/administrators}}}
97 )))
98 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
99 (((
100 **Description**
101 )))|(((
102 Accesses all the administrators in the system.
103 )))
104 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
105 (((
106 **GET**
107 )))|(((
108 Gets all the administrators in the system.
109 )))
110 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
111 (((
112 **POST
113 **
114 )))|(% colspan="1" %)(% colspan="1" %)
115 (((
116 Adds an administrator to the configuration.
117
118 {{info}}
119 This resource URL will take in a plain text password for the administrator and create a SHA-1 hashed version of it in the configuration.
120
121 If you want to pass in a pre-hashed version of the password that will be stored without modification you can use the following URL instead:
122
123 **communication_manager/rest/config/server/administrators/noHash**
124 {{/info}}
125
126 (% style="line-height: 1.42857;" %)**Errors:**
127
128 * 409 'An administrator with the given id already exists.': Returned if an administrator with the given id already exists.
129 * 409 'An administrator with the given username already exists.': Returned if an administrator with the given username already exists.
130 * 412 'No username provided.': Returned if no username was provided.
131 * 412 'No password provided.': Returned if no password was provided.
132 )))
133 |(% colspan="2" %)(% colspan="2" %)
134 (((
135
136 )))
137 |=(% colspan="2" %)(% colspan="2" %)
138 (((
139 {{{communication_manager/rest/config/server/administrators/{id}}}}
140 )))
141 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
142 (((
143 **Description**
144 )))|(((
145 Accesses the configuration of a specific administrator.
146
147 **Parameters:**
148
149 * id: The configuration id of the administrator.
150 )))
151 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
152 (((
153 **GET**
154 )))|(((
155 Gets the configuration of the specified administrator.
156
157 **Errors:**
158
159 * 404 'An administrator with the given id does not exist': Returned if no administrator exists with the given id.
160 )))
161 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
162 (((
163 **PUT**
164 )))|(% colspan="1" %)(% colspan="1" %)
165 (((
166 Updates the specified administrator configuration.
167
168 {{info}}
169 This resource URL will take in a plain text password for the administrator and create a SHA-1 hashed version of it in the configuration.
170
171 If you want to pass in a pre-hashed version of the password that will be stored without modification you can use the following URL instead:
172
173 **communication_manager/rest/config/server/administrators/noHash/{id}**
174 {{/info}}
175
176 **Errors:**
177
178 * 404 'An administrator with the given id does not exist': Returned if no administrator exists with the given id.
179 * 409 'An administrator with the given username already exists.': Returned if an administrator with the given username already exists.
180 * 412 'No username provided.': Returned if no username was provided.
181 * 412 'No password provided.': Returned if no password was provided.
182 )))
183 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
184 (((
185 **DELETE**
186 )))|(% colspan="1" %)(% colspan="1" %)
187 (((
188 Deletes the specified administrator configuration.
189
190 **Errors:**
191
192 * 404 'An administrator with the given id does not exist': Returned if no administrator exists with the given id.
193 )))
194
195 = Sub/Child Resource Paths =
196
197 |=(% colspan="2" %)(% colspan="2" %)
198 (((
199 {{{communication_manager/rest/config/server/administrators/{id}/managedCoreServers}}}
200 )))
201 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
202 (((
203 **Description**
204 )))|(% colspan="1" %)(% colspan="1" %)
205 (((
206 Access the sub/child resource for the Core Server Instances that are are managed by the specified administrator.
207
208 **Parameters:**
209
210 * id: The configuration id of the administrator.
211
212 **Errors:**
213
214 * 404 'An administrator with the given id does not exist': Returned if no administrator exists with the given id.
215 )))
216
217 = Curl Examples =
218
219 === Get all administrators ===
220
221 {{code language="bash"}}
222 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/server/administrators
223 {{/code}}
224
225 === Get the configuration for a specific administrator ===
226
227 {{code language="bash"}}
228 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/server/administrators/ee828da8-5ee6-413d-82ac-1273f598659d
229 {{/code}}
230
231 === Add a new administrator ===
232
233 {{code language="bash"}}
234 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id": "ee828da8-5ee6-412d-82ac-1273f598659d", "userName": "newAdmin", "password": "d36c07e12f98bea42b1cd80bca5b5ce4d6131c68", "superUser": true}' http://localhost:58080/communication_manager/rest/config/server/administrators
235 {{/code}}
236
237 === Delete an administrator ===
238
239 {{code language="bash"}}
240 curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/config/server/administrators/ee828da8-5ee6-412d-82ac-1273f598659d
241 {{/code}}
242
243 === Update an administrator ===
244
245 {{code language="bash"}}
246 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id": "ee828da8-5ee6-412d-82ac-1273f598659d", "userName": "newAdmin", "password": "d36c07e12f98bea42b1cd80bca5b5ce4d6131c68", "superUser": false}' http://localhost:58080/communication_manager/rest/config/server/administrators/ee828da8-5ee6-412d-82ac-1273f598659d
247 {{/code}}
248 {{/layout-cell}}
249 {{/layout-section}}
250 {{/layout}}
iSymphony