Wiki source code of Group Users 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 group users REST resource allows access to the set of users that are part of a specific user group. This resource allows adding and removing of users to and from a user group. | ||
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/{userGroupId}/users | ||
34 | {{/code}} | ||
35 | |||
36 | = JSON Representation = | ||
37 | |||
38 | {{code}} | ||
39 | { | ||
40 | "id": "56cf70a3-1ee0-4b09-8f40-297430eeeddf", | ||
41 | "username": "4224", | ||
42 | "password": "e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4", | ||
43 | "enabled": true, | ||
44 | "full": true, | ||
45 | "displayName": "Steve S", | ||
46 | "lastPasswordChangedAt": null, | ||
47 | "permissionDisplayName": "Steve S", | ||
48 | "permissionId": "56cf70a3-1ee0-4b09-8f40-297430eeeddf" | ||
49 | } | ||
50 | {{/code}} | ||
51 | |||
52 | |=((( | ||
53 | Property | ||
54 | )))|=((( | ||
55 | Type | ||
56 | )))|=((( | ||
57 | Description | ||
58 | ))) | ||
59 | |((( | ||
60 | {{{id}}} | ||
61 | )))|((( | ||
62 | String | ||
63 | )))|((( | ||
64 | Configuration id of the user. | ||
65 | ))) | ||
66 | |(% colspan="1" %)(% colspan="1" %) | ||
67 | ((( | ||
68 | username | ||
69 | )))|(% colspan="1" %)(% colspan="1" %) | ||
70 | ((( | ||
71 | String | ||
72 | )))|(% colspan="1" %)(% colspan="1" %) | ||
73 | ((( | ||
74 | Username of the user. | ||
75 | ))) | ||
76 | |(% colspan="1" %)(% colspan="1" %) | ||
77 | ((( | ||
78 | password | ||
79 | )))|(% colspan="1" %)(% colspan="1" %) | ||
80 | ((( | ||
81 | String | ||
82 | )))|(% colspan="1" %)(% colspan="1" %) | ||
83 | ((( | ||
84 | SHA-1 hash of the user's password. | ||
85 | ))) | ||
86 | |(% colspan="1" %)(% colspan="1" %) | ||
87 | ((( | ||
88 | enabled | ||
89 | )))|(% colspan="1" %)(% colspan="1" %) | ||
90 | ((( | ||
91 | Boolean | ||
92 | )))|(% colspan="1" %)(% colspan="1" %) | ||
93 | ((( | ||
94 | Flag specifying if the user is enabled. | ||
95 | ))) | ||
96 | |(% colspan="1" %)(% colspan="1" %) | ||
97 | ((( | ||
98 | full | ||
99 | )))|(% colspan="1" %)(% colspan="1" %) | ||
100 | ((( | ||
101 | Boolean | ||
102 | )))|(% colspan="1" %)(% colspan="1" %) | ||
103 | ((( | ||
104 | Flag specifying if the user is a full or lite user. | ||
105 | ))) | ||
106 | |(% colspan="1" %)(% colspan="1" %) | ||
107 | ((( | ||
108 | displayName | ||
109 | )))|(% colspan="1" %)(% colspan="1" %) | ||
110 | ((( | ||
111 | String | ||
112 | )))|(% colspan="1" %)(% colspan="1" %) | ||
113 | ((( | ||
114 | The display name for the user. | ||
115 | ))) | ||
116 | |(% colspan="1" %)(% colspan="1" %) | ||
117 | ((( | ||
118 | {{{lastPasswordChangedAt}}} | ||
119 | )))|(% colspan="1" %)(% colspan="1" %) | ||
120 | ((( | ||
121 | Long | ||
122 | )))|(% colspan="1" %)(% colspan="1" %) | ||
123 | ((( | ||
124 | The last time the user changed their password from the client interface. Represented as a Unix timestamp in milliseconds. Can be null. | ||
125 | ))) | ||
126 | |(% colspan="1" %)(% colspan="1" %) | ||
127 | ((( | ||
128 | {{{permissionDisplayName}}} | ||
129 | )))|(% colspan="1" %)(% colspan="1" %) | ||
130 | ((( | ||
131 | String | ||
132 | )))|(% colspan="1" %)(% colspan="1" %) | ||
133 | ((( | ||
134 | Display name of the user in the permission system. | ||
135 | ))) | ||
136 | |(% colspan="1" %)(% colspan="1" %) | ||
137 | ((( | ||
138 | {{{permissionId}}} | ||
139 | )))|(% colspan="1" %)(% colspan="1" %) | ||
140 | ((( | ||
141 | String | ||
142 | )))|(% colspan="1" %)(% colspan="1" %) | ||
143 | ((( | ||
144 | Permission id of the user. | ||
145 | ))) | ||
146 | |||
147 | = Resource Paths = | ||
148 | |||
149 | |=(% colspan="2" %)(% colspan="2" %) | ||
150 | ((( | ||
151 | {{{communication_manager/rest/config/core/{coreServerId}/userGroups/{userGroupId}/users}}} | ||
152 | ))) | ||
153 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
154 | ((( | ||
155 | **Description** | ||
156 | )))|((( | ||
157 | Accesses all the users in the specific user group. | ||
158 | ))) | ||
159 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
160 | ((( | ||
161 | **GET** | ||
162 | )))|((( | ||
163 | Gets all the users in the specific user group. | ||
164 | ))) | ||
165 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
166 | ((( | ||
167 | **POST | ||
168 | ** | ||
169 | )))|(% colspan="1" %)(% colspan="1" %) | ||
170 | ((( | ||
171 | Adds a user to the user group. | ||
172 | |||
173 | (% style="line-height: 1.42857;" %)**Errors:** | ||
174 | |||
175 | * 409 'A user with the given id already exists.': Returned if a user with the given id already exists. | ||
176 | * 409 'The specified user is already a member of this group.': Returned if the given user is already a member of the group. | ||
177 | ))) | ||
178 | |(% colspan="2" %)(% colspan="2" %) | ||
179 | ((( | ||
180 | |||
181 | ))) | ||
182 | |=(% colspan="2" %)(% colspan="2" %) | ||
183 | ((( | ||
184 | {{{communication_manager/rest/config/core/{coreServerId}/userGroups/{userGroupId}/users/{userId}}}} | ||
185 | ))) | ||
186 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
187 | ((( | ||
188 | **Description** | ||
189 | )))|((( | ||
190 | Accesses a specific user in a user group. | ||
191 | |||
192 | **Parameters:** | ||
193 | |||
194 | * userId: The configuration id of the user. | ||
195 | ))) | ||
196 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
197 | ((( | ||
198 | **DELETE** | ||
199 | )))|(% colspan="1" %)(% colspan="1" %) | ||
200 | ((( | ||
201 | Removes the user from the group. | ||
202 | |||
203 | **Errors:** | ||
204 | |||
205 | * 404 'A user with the given id does not exist': Returned if no user exists with the given id. | ||
206 | ))) | ||
207 | |||
208 | = Curl Examples = | ||
209 | |||
210 | === Get all users in a user group === | ||
211 | |||
212 | {{code language="bash"}} | ||
213 | curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/userGroups/56cf70a3-1ee0-4b09-8f40-297430eeeddf/users | ||
214 | {{/code}} | ||
215 | |||
216 | === Get the configuration for a specific user in a user group === | ||
217 | |||
218 | {{code language="bash"}} | ||
219 | curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/userGroups/56cf70a3-1ee0-4b09-8f40-297430eeeddf/users/a737ddc1-783b-4b69-8e1f-7fd7491f1c1c | ||
220 | {{/code}} | ||
221 | |||
222 | === Add a user to a group === | ||
223 | |||
224 | {{code language="bash"}} | ||
225 | curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"56cf70a3-1ee0-4b09-8f40-297430eeeddf","username":"4224","password":"mypassword","enabled":true,"full":true,"displayName":"Steve S","lastPasswordChangedAt":null,"permissionDisplayName":"Steve S","permissionId":"56cf70a3-1ee0-4b09-8f40-297430eeeddf"}' http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/userGroups/56cf70a3-1ee0-4b09-8f40-297430eeeddf/ | ||
226 | {{/code}} | ||
227 | |||
228 | === Remove a user from a group === | ||
229 | |||
230 | {{code language="bash"}} | ||
231 | curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/userGroups/56cf70a3-1ee0-4b09-8f40-297430eeeddf/users/a737ddc1-783b-4b69-8e1f-7fd7491f1c1c | ||
232 | {{/code}} | ||
233 | {{/layout-cell}} | ||
234 | {{/layout-section}} | ||
235 | {{/layout}} |