Wiki source code of Asterisk Default Extension User
Last modified by ryanp 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 default extension user REST resource allows access to the user who has the parent extension set as their default extension. This resource allows you to set which user the extension is the default extension for. | ||
15 | {{/layout-cell}} | ||
16 | |||
17 | {{layout-cell}} | ||
18 | {{panel title="On this page:"}} | ||
19 | |||
20 | |||
21 | {{toc maxLevel="2" indent="1"/}} | ||
22 | {{/panel}} | ||
23 | {{/layout-cell}} | ||
24 | {{/layout-section}} | ||
25 | |||
26 | {{layout-section ac:type="single"}} | ||
27 | {{layout-cell}} | ||
28 | = (% style="color: rgb(0,0,0);" %)Root Resource Path(%%) = | ||
29 | |||
30 | {{code}} | ||
31 | communication_manager/rest/config/asterisk/{serverId}/extensions/{extensionId}/defaultExtensionUser | ||
32 | {{/code}} | ||
33 | |||
34 | = JSON Representation = | ||
35 | |||
36 | {{code}} | ||
37 | { | ||
38 | "id": "56cf70a3-1ee0-4b09-8f40-297430eeeddf", | ||
39 | "username": "4224", | ||
40 | "password": "e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4", | ||
41 | "enabled": true, | ||
42 | "full": true, | ||
43 | "displayName": "Steve S", | ||
44 | "lastPasswordChangedAt": null, | ||
45 | "permissionDisplayName": "Steve S", | ||
46 | "permissionId": "56cf70a3-1ee0-4b09-8f40-297430eeeddf" | ||
47 | } | ||
48 | {{/code}} | ||
49 | |||
50 | |=((( | ||
51 | Property | ||
52 | )))|=((( | ||
53 | Type | ||
54 | )))|=((( | ||
55 | Description | ||
56 | ))) | ||
57 | |((( | ||
58 | {{{id}}} | ||
59 | )))|((( | ||
60 | String | ||
61 | )))|((( | ||
62 | Configuration id of the user. | ||
63 | ))) | ||
64 | |(% colspan="1" %)(% colspan="1" %) | ||
65 | ((( | ||
66 | username | ||
67 | )))|(% colspan="1" %)(% colspan="1" %) | ||
68 | ((( | ||
69 | String | ||
70 | )))|(% colspan="1" %)(% colspan="1" %) | ||
71 | ((( | ||
72 | Username of the user. | ||
73 | ))) | ||
74 | |(% colspan="1" %)(% colspan="1" %) | ||
75 | ((( | ||
76 | password | ||
77 | )))|(% colspan="1" %)(% colspan="1" %) | ||
78 | ((( | ||
79 | String | ||
80 | )))|(% colspan="1" %)(% colspan="1" %) | ||
81 | ((( | ||
82 | SHA-1 hash of the user's password. | ||
83 | ))) | ||
84 | |(% colspan="1" %)(% colspan="1" %) | ||
85 | ((( | ||
86 | enabled | ||
87 | )))|(% colspan="1" %)(% colspan="1" %) | ||
88 | ((( | ||
89 | Boolean | ||
90 | )))|(% colspan="1" %)(% colspan="1" %) | ||
91 | ((( | ||
92 | Flag specifying if the user is enabled. | ||
93 | ))) | ||
94 | |(% colspan="1" %)(% colspan="1" %) | ||
95 | ((( | ||
96 | full | ||
97 | )))|(% colspan="1" %)(% colspan="1" %) | ||
98 | ((( | ||
99 | Boolean | ||
100 | )))|(% colspan="1" %)(% colspan="1" %) | ||
101 | ((( | ||
102 | Flag specifying if the user is a full or lite user. | ||
103 | ))) | ||
104 | |(% colspan="1" %)(% colspan="1" %) | ||
105 | ((( | ||
106 | displayName | ||
107 | )))|(% colspan="1" %)(% colspan="1" %) | ||
108 | ((( | ||
109 | String | ||
110 | )))|(% colspan="1" %)(% colspan="1" %) | ||
111 | ((( | ||
112 | The display name for the user. | ||
113 | ))) | ||
114 | |(% colspan="1" %)(% colspan="1" %) | ||
115 | ((( | ||
116 | {{{lastPasswordChangedAt}}} | ||
117 | )))|(% colspan="1" %)(% colspan="1" %) | ||
118 | ((( | ||
119 | Long | ||
120 | )))|(% colspan="1" %)(% colspan="1" %) | ||
121 | ((( | ||
122 | The last time the user changed their password from the client interface. Represented as a Unix timestamp in milliseconds. Can be null. | ||
123 | ))) | ||
124 | |(% colspan="1" %)(% colspan="1" %) | ||
125 | ((( | ||
126 | {{{permissionDisplayName}}} | ||
127 | )))|(% colspan="1" %)(% colspan="1" %) | ||
128 | ((( | ||
129 | String | ||
130 | )))|(% colspan="1" %)(% colspan="1" %) | ||
131 | ((( | ||
132 | Display name of the user in the permission system. | ||
133 | ))) | ||
134 | |(% colspan="1" %)(% colspan="1" %) | ||
135 | ((( | ||
136 | {{{permissionId}}} | ||
137 | )))|(% colspan="1" %)(% colspan="1" %) | ||
138 | ((( | ||
139 | String | ||
140 | )))|(% colspan="1" %)(% colspan="1" %) | ||
141 | ((( | ||
142 | Permission id of the user. | ||
143 | ))) | ||
144 | |||
145 | = Resource Paths = | ||
146 | |||
147 | |=(% colspan="2" %)(% colspan="2" %) | ||
148 | ((( | ||
149 | {{{communication_manager/rest/config/asterisk/{serverId}/extensions/{extensionId}/defaultExtensionUser}}} | ||
150 | ))) | ||
151 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
152 | ((( | ||
153 | **Description** | ||
154 | )))|((( | ||
155 | Accesses the user the extension is set as a default for. | ||
156 | ))) | ||
157 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
158 | ((( | ||
159 | **GET** | ||
160 | )))|((( | ||
161 | Gets the user the extension is set as a default for. | ||
162 | |||
163 | Errors: | ||
164 | |||
165 | * 404 'The extension's user does not have a default extension set': The extension does not have a default user set. | ||
166 | * 404 'The extension is not bound to a user': The extension is not currently bound to a user. The extension must be bound to the user before you can set it as the default extension of the user. | ||
167 | * 404 'This extension is not a default extension': The extension is not currently bound to any user. | ||
168 | ))) | ||
169 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
170 | ((( | ||
171 | **PUT | ||
172 | ** | ||
173 | )))|(% colspan="1" %)(% colspan="1" %) | ||
174 | ((( | ||
175 | Sets the extension as the default extension for the given user. | ||
176 | ))) | ||
177 | |||
178 | = Curl Examples = | ||
179 | |||
180 | === Gets the user the current extension is set as a default for === | ||
181 | |||
182 | {{code language="bash"}} | ||
183 | curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensions/56cf70a3-1ee0-4b09-8f40-297430eeeddf/defaultExtensionUser | ||
184 | {{/code}} | ||
185 | |||
186 | === Set the extension as the default extension for the given user === | ||
187 | |||
188 | {{code language="bash"}} | ||
189 | curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"ed38fe4d-13ad-4fd0-be25-d3404c421370","username":"4224","password":"60b6e3843f2b26d3a24c27c4f3f071861c2f14e4","enabled":true,"full":false,"displayName":"Michael Y (desk)","lastPasswordChangedAt":null,"permissionDisplayName":"Michael Y (desk)","permissionId":"ed38fe4d-13ad-4fd0-be25-d3404c421370"}' http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extension/56cf70a3-1ee0-4b09-8f40-297430eeeddf/defaultExtensionUser | ||
190 | {{/code}} | ||
191 | {{/layout-cell}} | ||
192 | {{/layout-section}} | ||
193 | {{/layout}} |