Line 0
Link Here
|
0 |
- |
1 |
{ |
|
|
2 |
"/config/smtp_servers": { |
3 |
"get": { |
4 |
"x-mojo-to": "Config::SMTP::Servers#list", |
5 |
"operationId": "listSMTPServers", |
6 |
"tags": [ |
7 |
"config", |
8 |
"smtp" |
9 |
], |
10 |
"produces": [ |
11 |
"application/json" |
12 |
], |
13 |
"parameters": [ |
14 |
{ |
15 |
"$ref": "../parameters.json#/match" |
16 |
}, |
17 |
{ |
18 |
"$ref": "../parameters.json#/order_by" |
19 |
}, |
20 |
{ |
21 |
"$ref": "../parameters.json#/page" |
22 |
}, |
23 |
{ |
24 |
"$ref": "../parameters.json#/per_page" |
25 |
}, |
26 |
{ |
27 |
"$ref": "../parameters.json#/q_param" |
28 |
}, |
29 |
{ |
30 |
"$ref": "../parameters.json#/q_body" |
31 |
}, |
32 |
{ |
33 |
"$ref": "../parameters.json#/q_header" |
34 |
} |
35 |
], |
36 |
"responses": { |
37 |
"200": { |
38 |
"description": "A list of SMTP servers", |
39 |
"schema": { |
40 |
"type": "array", |
41 |
"items": { |
42 |
"$ref": "../definitions.json#/smtp_server" |
43 |
} |
44 |
} |
45 |
}, |
46 |
"403": { |
47 |
"description": "Access forbidden", |
48 |
"schema": { |
49 |
"$ref": "../definitions.json#/error" |
50 |
} |
51 |
}, |
52 |
"500": { |
53 |
"description": "Internal error", |
54 |
"schema": { |
55 |
"$ref": "../definitions.json#/error" |
56 |
} |
57 |
}, |
58 |
"503": { |
59 |
"description": "Under maintenance", |
60 |
"schema": { |
61 |
"$ref": "../definitions.json#/error" |
62 |
} |
63 |
} |
64 |
}, |
65 |
"x-koha-authorization": { |
66 |
"permissions": { |
67 |
"parameters": "1" |
68 |
} |
69 |
}, |
70 |
"x-koha-embed": [ |
71 |
"library" |
72 |
] |
73 |
}, |
74 |
"post": { |
75 |
"x-mojo-to": "Config::SMTP::Servers#add", |
76 |
"operationId": "addSMTPServer", |
77 |
"tags": [ |
78 |
"config", |
79 |
"smtp" |
80 |
], |
81 |
"parameters": [ |
82 |
{ |
83 |
"name": "body", |
84 |
"in": "body", |
85 |
"description": "A JSON object representing a new SMTP server configuration", |
86 |
"required": true, |
87 |
"schema": { |
88 |
"$ref": "../definitions.json#/smtp_server" |
89 |
} |
90 |
} |
91 |
], |
92 |
"produces": [ |
93 |
"application/json" |
94 |
], |
95 |
"responses": { |
96 |
"201": { |
97 |
"description": "An SMTP server object", |
98 |
"schema": { |
99 |
"$ref": "../definitions.json#/smtp_server" |
100 |
} |
101 |
}, |
102 |
"401": { |
103 |
"description": "Authentication required", |
104 |
"schema": { |
105 |
"$ref": "../definitions.json#/error" |
106 |
} |
107 |
}, |
108 |
"403": { |
109 |
"description": "Access forbidden", |
110 |
"schema": { |
111 |
"$ref": "../definitions.json#/error" |
112 |
} |
113 |
}, |
114 |
"409": { |
115 |
"description": "Conflict in creating resource", |
116 |
"schema": { |
117 |
"$ref": "../definitions.json#/error" |
118 |
} |
119 |
}, |
120 |
"500": { |
121 |
"description": "Internal error", |
122 |
"schema": { |
123 |
"$ref": "../definitions.json#/error" |
124 |
} |
125 |
}, |
126 |
"503": { |
127 |
"description": "Under maintenance", |
128 |
"schema": { |
129 |
"$ref": "../definitions.json#/error" |
130 |
} |
131 |
} |
132 |
}, |
133 |
"x-koha-authorization": { |
134 |
"permissions": { |
135 |
"parameters": "1" |
136 |
} |
137 |
} |
138 |
} |
139 |
}, |
140 |
"/config/smtp_servers/{smtp_server_id}": { |
141 |
"get": { |
142 |
"x-mojo-to": "Config::SMTP::Servers#get", |
143 |
"operationId": "getSMTPServer", |
144 |
"tags": [ |
145 |
"config", |
146 |
"smtp" |
147 |
], |
148 |
"parameters": [ |
149 |
{ |
150 |
"$ref": "../parameters.json#/smtp_server_id_pp" |
151 |
} |
152 |
], |
153 |
"produces": [ |
154 |
"application/json" |
155 |
], |
156 |
"responses": { |
157 |
"200": { |
158 |
"description": "An SMTP server object", |
159 |
"schema": { |
160 |
"$ref": "../definitions.json#/smtp_server" |
161 |
} |
162 |
}, |
163 |
"404": { |
164 |
"description": "Object not found", |
165 |
"schema": { |
166 |
"$ref": "../definitions.json#/error" |
167 |
} |
168 |
}, |
169 |
"409": { |
170 |
"description": "Conflict updating resource", |
171 |
"schema": { |
172 |
"$ref": "../definitions.json#/error" |
173 |
} |
174 |
}, |
175 |
"500": { |
176 |
"description": "Internal error", |
177 |
"schema": { |
178 |
"$ref": "../definitions.json#/error" |
179 |
} |
180 |
}, |
181 |
"503": { |
182 |
"description": "Under maintenance", |
183 |
"schema": { |
184 |
"$ref": "../definitions.json#/error" |
185 |
} |
186 |
} |
187 |
}, |
188 |
"x-koha-authorization": { |
189 |
"permissions": { |
190 |
"parameters": "1" |
191 |
} |
192 |
} |
193 |
}, |
194 |
"put": { |
195 |
"x-mojo-to": "Config::SMTP::Servers#update", |
196 |
"operationId": "updateSMTPServer", |
197 |
"tags": [ |
198 |
"config", |
199 |
"smtp" |
200 |
], |
201 |
"parameters": [ |
202 |
{ |
203 |
"$ref": "../parameters.json#/smtp_server_id_pp" |
204 |
}, |
205 |
{ |
206 |
"name": "body", |
207 |
"in": "body", |
208 |
"description": "An SMTP server object", |
209 |
"required": true, |
210 |
"schema": { |
211 |
"$ref": "../definitions.json#/smtp_server" |
212 |
} |
213 |
} |
214 |
], |
215 |
"produces": [ |
216 |
"application/json" |
217 |
], |
218 |
"responses": { |
219 |
"200": { |
220 |
"description": "An SMTP server object", |
221 |
"schema": { |
222 |
"$ref": "../definitions.json#/smtp_server" |
223 |
} |
224 |
}, |
225 |
"401": { |
226 |
"description": "Authentication required", |
227 |
"schema": { |
228 |
"$ref": "../definitions.json#/error" |
229 |
} |
230 |
}, |
231 |
"403": { |
232 |
"description": "Access forbidden", |
233 |
"schema": { |
234 |
"$ref": "../definitions.json#/error" |
235 |
} |
236 |
}, |
237 |
"404": { |
238 |
"description": "Object not found", |
239 |
"schema": { |
240 |
"$ref": "../definitions.json#/error" |
241 |
} |
242 |
}, |
243 |
"500": { |
244 |
"description": "Internal error", |
245 |
"schema": { |
246 |
"$ref": "../definitions.json#/error" |
247 |
} |
248 |
}, |
249 |
"503": { |
250 |
"description": "Under maintenance", |
251 |
"schema": { |
252 |
"$ref": "../definitions.json#/error" |
253 |
} |
254 |
} |
255 |
}, |
256 |
"x-koha-authorization": { |
257 |
"permissions": { |
258 |
"parameters": "1" |
259 |
} |
260 |
} |
261 |
}, |
262 |
"delete": { |
263 |
"x-mojo-to": "Config::SMTP::Servers#delete", |
264 |
"operationId": "deleteSMTPServer", |
265 |
"tags": [ |
266 |
"config", |
267 |
"smtp" |
268 |
], |
269 |
"parameters": [ |
270 |
{ |
271 |
"$ref": "../parameters.json#/smtp_server_id_pp" |
272 |
} |
273 |
], |
274 |
"produces": [ |
275 |
"application/json" |
276 |
], |
277 |
"responses": { |
278 |
"204": { |
279 |
"description": "SMTP server deleted" |
280 |
}, |
281 |
"401": { |
282 |
"description": "Authentication required", |
283 |
"schema": { |
284 |
"$ref": "../definitions.json#/error" |
285 |
} |
286 |
}, |
287 |
"403": { |
288 |
"description": "Access forbidden", |
289 |
"schema": { |
290 |
"$ref": "../definitions.json#/error" |
291 |
} |
292 |
}, |
293 |
"404": { |
294 |
"description": "Object not found", |
295 |
"schema": { |
296 |
"$ref": "../definitions.json#/error" |
297 |
} |
298 |
}, |
299 |
"500": { |
300 |
"description": "Internal error", |
301 |
"schema": { |
302 |
"$ref": "../definitions.json#/error" |
303 |
} |
304 |
}, |
305 |
"503": { |
306 |
"description": "Under maintenance", |
307 |
"schema": { |
308 |
"$ref": "../definitions.json#/error" |
309 |
} |
310 |
} |
311 |
}, |
312 |
"x-koha-authorization": { |
313 |
"permissions": { |
314 |
"parameters": "1" |
315 |
} |
316 |
} |
317 |
} |
318 |
} |
319 |
} |