Wiki source code of User Group Configuration
Last modified by michaely on 2021/09/10 23:34
Show last authors
author | version | line-number | content |
---|---|---|---|
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 group REST resource allows access to the configuration for user groups in the system. This resource allows adding, removing, and updating of user groups in the system. User groups are used by the permission system. See [[doc:Permissions Configuration]]. | ||
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}/userGroups | ||
34 | {{/code}} | ||
35 | |||
36 | = JSON Representation = | ||
37 | |||
38 | {{code}} | ||
39 | { | ||
40 | "id": "b6078433-d2e8-4d92-924a-80e7ed386164", | ||
41 | "displayName": "Managers", | ||
42 | "permissionDisplayName": "Managers", | ||
43 | "permissionId": "b6078433-d2e8-4d92-924a-80e7ed386164" | ||
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 group. | ||
60 | ))) | ||
61 | |(% colspan="1" %)(% colspan="1" %) | ||
62 | ((( | ||
63 | displayName | ||
64 | )))|(% colspan="1" %)(% colspan="1" %) | ||
65 | ((( | ||
66 | String | ||
67 | )))|(% colspan="1" %)(% colspan="1" %) | ||
68 | ((( | ||
69 | Display name of the user group. | ||
70 | ))) | ||
71 | |(% colspan="1" %)(% colspan="1" %) | ||
72 | ((( | ||
73 | permissionDisplayName | ||
74 | )))|(% colspan="1" %)(% colspan="1" %) | ||
75 | ((( | ||
76 | String | ||
77 | )))|(% colspan="1" %)(% colspan="1" %) | ||
78 | ((( | ||
79 | Display name of the user group in teh permission system. | ||
80 | ))) | ||
81 | |(% colspan="1" %)(% colspan="1" %) | ||
82 | ((( | ||
83 | permissionId | ||
84 | )))|(% colspan="1" %)(% colspan="1" %) | ||
85 | ((( | ||
86 | String | ||
87 | )))|(% colspan="1" %)(% colspan="1" %) | ||
88 | ((( | ||
89 | The permission id of the user group. | ||
90 | ))) | ||
91 | |||
92 | = Resource Paths = | ||
93 | |||
94 | |=(% colspan="2" %)(% colspan="2" %) | ||
95 | ((( | ||
96 | {{{communication_manager/rest/config/core/{coreServerId}/userGroups}}} | ||
97 | ))) | ||
98 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
99 | ((( | ||
100 | **Description** | ||
101 | )))|((( | ||
102 | Accesses all the user groups in the core server. | ||
103 | ))) | ||
104 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
105 | ((( | ||
106 | **GET** | ||
107 | )))|((( | ||
108 | Gets all the user groups in the core server. | ||
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 a user group to the configuration. | ||
117 | |||
118 | (% style="line-height: 1.42857;" %)**Errors:** | ||
119 | |||
120 | * 409 'A user group with the given id already exists.': Returned if a user group with the given id already exists. | ||
121 | * 409 'A user group with the given name already exists.': Returned if a user group with the given name already exists. | ||
122 | * 412 'No displayName provided.': Returned if no display name was provided. | ||
123 | ))) | ||
124 | |(% colspan="2" %)(% colspan="2" %) | ||
125 | ((( | ||
126 | |||
127 | ))) | ||
128 | |=(% colspan="2" %)(% colspan="2" %) | ||
129 | ((( | ||
130 | {{{communication_manager/rest/config/core/{coreServerId}/userGroups/{userGroupId}}}} | ||
131 | ))) | ||
132 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
133 | ((( | ||
134 | **Description** | ||
135 | )))|((( | ||
136 | Accesses the configuration of a specific user group. | ||
137 | |||
138 | **Parameters:** | ||
139 | |||
140 | * userGroupId: The configuration id of the user group. | ||
141 | ))) | ||
142 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
143 | ((( | ||
144 | **GET** | ||
145 | )))|((( | ||
146 | Gets the configuration of the specified user group. | ||
147 | |||
148 | **Errors:** | ||
149 | |||
150 | * 404 'A user group with the given id does not exist': Returned if no user group exists with the given id. | ||
151 | ))) | ||
152 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
153 | ((( | ||
154 | **PUT** | ||
155 | )))|(% colspan="1" %)(% colspan="1" %) | ||
156 | ((( | ||
157 | Updates the specified user group configuration. | ||
158 | |||
159 | **Errors:** | ||
160 | |||
161 | * 404 'A user group with the given id does not exist': Returned if no user group exists with the given id. | ||
162 | * 409 'A user group with the given name already exists.': Returned if a user group with the given name already exists. | ||
163 | * 412 'No display name provided.': Returned if no display name was provided. | ||
164 | ))) | ||
165 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
166 | ((( | ||
167 | **DELETE** | ||
168 | )))|(% colspan="1" %)(% colspan="1" %) | ||
169 | ((( | ||
170 | Deletes the specified user group configuration. | ||
171 | |||
172 | **Errors:** | ||
173 | |||
174 | * 404 'A user group with the given id does not exist': Returned if no user group exists with the given id. | ||
175 | ))) | ||
176 | |||
177 | = Sub/Child Resource Paths = | ||
178 | |||
179 | |=(% colspan="2" %)(% colspan="2" %) | ||
180 | ((( | ||
181 | {{{communication_manager/rest/config/core/{coreServerId}/userGroups/{userGroupId}/users}}} | ||
182 | ))) | ||
183 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
184 | ((( | ||
185 | **Description** | ||
186 | )))|(% colspan="1" %)(% colspan="1" %) | ||
187 | ((( | ||
188 | Access the sub/child resource for the users that are part of the user group. | ||
189 | |||
190 | (% style="line-height: 1.42857;" %)**Parameters:** | ||
191 | |||
192 | * userGroupId: The configuration id of the user group. | ||
193 | |||
194 | **Errors:** | ||
195 | |||
196 | * 404 'A user group with the given id does not exist': Returned if no user group exists with the given id. | ||
197 | |||
198 | See [[doc:Group Users Configuration]] for more information. | ||
199 | ))) | ||
200 | |||
201 | = Curl Examples = | ||
202 | |||
203 | === Get all user Groups in a core server === | ||
204 | |||
205 | {{code language="bash"}} | ||
206 | curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/userGroups | ||
207 | {{/code}} | ||
208 | |||
209 | === Get the configuration for a specific user group === | ||
210 | |||
211 | {{code language="bash"}} | ||
212 | curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/usersGroup/56cf70a3-1ee0-4b09-8f40-297430eeeddf | ||
213 | {{/code}} | ||
214 | |||
215 | === Add a new User Group === | ||
216 | |||
217 | {{code language="bash"}} | ||
218 | curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"b6078433-d2e8-4d92-924a-80e7ed386164","displayName":"Managers","permissionDisplayName":"Managers","permissionId":"b6078433-d2e8-4d92-924a-80e7ed386164"}' http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/users | ||
219 | {{/code}} | ||
220 | |||
221 | === Delete an user group === | ||
222 | |||
223 | {{code language="bash"}} | ||
224 | curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/usersGroup/56cf70a3-1ee0-4b09-8f40-297430eeeddf | ||
225 | {{/code}} | ||
226 | |||
227 | === Update a user group === | ||
228 | |||
229 | {{code language="bash"}} | ||
230 | curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"56cf70a3-1ee0-4b09-8f40-297430eeeddf","displayName":"Managers New","permissionDisplayName":"Managers New","permissionId":"b6078433-d2e8-4d92-924a-80e7ed386164"}' http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/users/56cf70a3-1ee0-4b09-8f40-297430eeeddf | ||
231 | {{/code}} | ||
232 | {{/layout-cell}} | ||
233 | {{/layout-section}} | ||
234 | {{/layout}} |