Wiki source code of Asterisk Parking Lot Configuration
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 Asterisk parking lot REST resource allows access to the configuration for parking lots in the system. This resource allows adding, removing, and updating of parking lots 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/asterisk/{coreServerId}/parkingLots | ||
34 | {{/code}} | ||
35 | |||
36 | = JSON Representation = | ||
37 | |||
38 | {{code}} | ||
39 | { | ||
40 | "id": "ce87c947-81a4-4c10-80ec-0a3f4d67a460", | ||
41 | "name": "Main", | ||
42 | "identifier": "default", | ||
43 | "destinationExtension": "70", | ||
44 | "destinationContext": "from-internal", | ||
45 | "permissionDisplayName": "Main <default>", | ||
46 | "permissionId": "ce87c947-81a4-4c10-80ec-0a3f4d67a460" | ||
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 parking lot. | ||
63 | ))) | ||
64 | |(% colspan="1" %)(% colspan="1" %) | ||
65 | ((( | ||
66 | {{{name}}} | ||
67 | )))|(% colspan="1" %)(% colspan="1" %) | ||
68 | ((( | ||
69 | String | ||
70 | )))|(% colspan="1" %)(% colspan="1" %) | ||
71 | ((( | ||
72 | The display name of the parking lot. | ||
73 | ))) | ||
74 | |(% colspan="1" %)(% colspan="1" %) | ||
75 | ((( | ||
76 | identifier | ||
77 | )))|(% colspan="1" %)(% colspan="1" %) | ||
78 | ((( | ||
79 | String | ||
80 | )))|(% colspan="1" %)(% colspan="1" %) | ||
81 | ((( | ||
82 | The Asterisk identifier of the parking lot. | ||
83 | ))) | ||
84 | |(% colspan="1" %)(% colspan="1" %) | ||
85 | ((( | ||
86 | {{{destinationExtension}}} | ||
87 | )))|(% colspan="1" %)(% colspan="1" %) | ||
88 | ((( | ||
89 | String | ||
90 | )))|(% colspan="1" %)(% colspan="1" %) | ||
91 | ((( | ||
92 | The extension used to call the parking lot from the panel. | ||
93 | ))) | ||
94 | |(% colspan="1" %)(% colspan="1" %) | ||
95 | ((( | ||
96 | {{{destinationContext}}} | ||
97 | )))|(% colspan="1" %)(% colspan="1" %) | ||
98 | ((( | ||
99 | String | ||
100 | )))|(% colspan="1" %)(% colspan="1" %) | ||
101 | ((( | ||
102 | The context used to call the parking lot from the panel. | ||
103 | ))) | ||
104 | |(% colspan="1" %)(% colspan="1" %) | ||
105 | ((( | ||
106 | {{{permissionDisplayName}}} | ||
107 | )))|(% colspan="1" %)(% colspan="1" %) | ||
108 | ((( | ||
109 | String | ||
110 | )))|(% colspan="1" %)(% colspan="1" %) | ||
111 | ((( | ||
112 | Display name of the parking lot in the permission system. | ||
113 | ))) | ||
114 | |(% colspan="1" %)(% colspan="1" %) | ||
115 | ((( | ||
116 | {{{permissionId}}} | ||
117 | )))|(% colspan="1" %)(% colspan="1" %) | ||
118 | ((( | ||
119 | String | ||
120 | )))|(% colspan="1" %)(% colspan="1" %) | ||
121 | ((( | ||
122 | Permission id of the parking lot. | ||
123 | ))) | ||
124 | |||
125 | = Resource Paths = | ||
126 | |||
127 | |=(% colspan="2" %)(% colspan="2" %) | ||
128 | ((( | ||
129 | {{{communication_manager/rest/config/asterisk/{coreServerId}/parkingLots}}} | ||
130 | ))) | ||
131 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
132 | ((( | ||
133 | **Description** | ||
134 | )))|((( | ||
135 | Accesses all the parking lots in the core server. | ||
136 | ))) | ||
137 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
138 | ((( | ||
139 | **GET** | ||
140 | )))|((( | ||
141 | Gets all the configuration for all the parking lot in the system. | ||
142 | ))) | ||
143 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
144 | ((( | ||
145 | **POST | ||
146 | ** | ||
147 | )))|(% colspan="1" %)(% colspan="1" %) | ||
148 | ((( | ||
149 | Adds a parking lot to the configuration. | ||
150 | |||
151 | (% style="line-height: 1.42857;" %)**Errors:** | ||
152 | |||
153 | * 409 'A parkingLot with the given id already exists.': Returned if a parking lot with the given id already exists. | ||
154 | * 409 'A parkingLot with the given identifier already exists.': Returned if a parking lot with the given identifier already exists. | ||
155 | * 412 'No identifier provided.': Returned if no identifier was provided. | ||
156 | * 412 'No displayName provided.': Returned if no display name was provided. | ||
157 | * 412 'No destinationContext provided.': Returned if no destination context was provided. | ||
158 | * 412 'No destinationExtension provided.': Returned if no destination extension was provided. | ||
159 | ))) | ||
160 | |(% colspan="2" %)(% colspan="2" %) | ||
161 | ((( | ||
162 | |||
163 | ))) | ||
164 | |=(% colspan="2" %)(% colspan="2" %) | ||
165 | ((( | ||
166 | {{{communication_manager/rest/config/asterisk/{coreServerId}/parkingLots/{parkingLotId}}}} | ||
167 | ))) | ||
168 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
169 | ((( | ||
170 | **Description** | ||
171 | )))|((( | ||
172 | Accesses the configuration of a specific parking lot. | ||
173 | |||
174 | **Parameters:** | ||
175 | |||
176 | * parkingLotId: The configuration id of the parking lot. | ||
177 | ))) | ||
178 | |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %) | ||
179 | ((( | ||
180 | **GET** | ||
181 | )))|((( | ||
182 | Gets the configuration of the specified parking lot. | ||
183 | |||
184 | **Errors:** | ||
185 | |||
186 | * 404 'A parking lot with the given id does not exist': Returned if no parking lot exists with the given id. | ||
187 | ))) | ||
188 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
189 | ((( | ||
190 | **PUT** | ||
191 | )))|(% colspan="1" %)(% colspan="1" %) | ||
192 | ((( | ||
193 | Updates the specified parking lot configuration. | ||
194 | |||
195 | **Errors:** | ||
196 | |||
197 | * 404 'A parkingLot with the given id does not exist': Returned if no parking lot exists with the given id. | ||
198 | * 409 'A parkingLot with the given identifier already exists.': Returned if a parking lot with the given identifier already exists. | ||
199 | * 412 'No identifier provided.': Returned if no identifier was provided. | ||
200 | * 412 'No displayName provided.': Returned if no display name was provided. | ||
201 | * 412 'No destinationContext provided.': Returned if no destination context was provided. | ||
202 | * 412 'No destinationExtension provided.': Returned if no destination extension was provided. | ||
203 | ))) | ||
204 | |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %) | ||
205 | ((( | ||
206 | **DELETE** | ||
207 | )))|(% colspan="1" %)(% colspan="1" %) | ||
208 | ((( | ||
209 | Deletes the specified parking lot. | ||
210 | |||
211 | **Errors:** | ||
212 | |||
213 | * 404 'A ParkingLot with the given id does not exist': Returned if no parking lot exists with the given id. | ||
214 | ))) | ||
215 | |||
216 | = Curl Examples = | ||
217 | |||
218 | === Get all parking lots in a core server === | ||
219 | |||
220 | {{code language="bash"}} | ||
221 | curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/parkingLots | ||
222 | {{/code}} | ||
223 | |||
224 | === Get the configuration for a specific parking lot === | ||
225 | |||
226 | {{code language="bash"}} | ||
227 | curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/parkingLots/56cf70a3-1ee0-4b09-8f40-297430eeeddf | ||
228 | {{/code}} | ||
229 | |||
230 | === Add a new parking lot === | ||
231 | |||
232 | {{code language="bash"}} | ||
233 | curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"ce87c947-81a4-4c10-80ec-0a3f4d67a460","name":"Main","identifier":"default","destinationExtension":"70","destinationContext":"from-internal"}' http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/parkingLots | ||
234 | {{/code}} | ||
235 | |||
236 | === Delete a parking lot === | ||
237 | |||
238 | {{code language="bash"}} | ||
239 | curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/parkingLots/56cf70a3-1ee0-4b09-8f40-297430eeeddf | ||
240 | {{/code}} | ||
241 | |||
242 | === Update a parking lot === | ||
243 | |||
244 | {{code language="bash"}} | ||
245 | curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"ce87c947-81a4-4c10-80ec-0a3f4d67a460","name":"Main New","identifier":"default","destinationExtension":"70","destinationContext":"from-internal"}' http://localhost:58080/communication_manager/rest/config/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/parkingLots/ce87c947-81a4-4c10-80ec-0a3f4d67a460 | ||
246 | {{/code}} | ||
247 | {{/layout-cell}} | ||
248 | {{/layout-section}} | ||
249 | {{/layout}} |