Line 0
Link Here
|
|
|
1 |
--- |
2 |
/preservation/trains: |
3 |
get: |
4 |
x-mojo-to: Preservation::Trains#list |
5 |
operationId: listPreservationTrains |
6 |
tags: |
7 |
- preservation_train |
8 |
summary: List trains |
9 |
produces: |
10 |
- application/json |
11 |
parameters: |
12 |
- description: Case insensitive search on train id |
13 |
in: query |
14 |
name: train_id |
15 |
required: false |
16 |
type: integer |
17 |
- description: Case insensitive search on train name |
18 |
in: query |
19 |
name: name |
20 |
required: false |
21 |
type: string |
22 |
- description: Case insensitive search on train description |
23 |
in: query |
24 |
name: description |
25 |
required: false |
26 |
type: string |
27 |
- description: Case insensitive search on not for loan value |
28 |
in: query |
29 |
name: not_for_loan |
30 |
required: false |
31 |
type: string |
32 |
- description: Case insensitive search on train creation date |
33 |
in: query |
34 |
name: created_on |
35 |
required: false |
36 |
type: string |
37 |
- description: Case insensitive search on train closing date |
38 |
in: query |
39 |
name: closed_on |
40 |
required: false |
41 |
type: string |
42 |
- description: Case insensitive search on train sent date |
43 |
in: query |
44 |
name: sent_on |
45 |
required: false |
46 |
type: string |
47 |
- description: Case insensitive search on train receiving date |
48 |
in: query |
49 |
name: received_on |
50 |
required: false |
51 |
type: string |
52 |
- $ref: "../swagger.yaml#/parameters/match" |
53 |
- $ref: "../swagger.yaml#/parameters/order_by" |
54 |
- $ref: "../swagger.yaml#/parameters/page" |
55 |
- $ref: "../swagger.yaml#/parameters/per_page" |
56 |
- $ref: "../swagger.yaml#/parameters/q_param" |
57 |
- $ref: "../swagger.yaml#/parameters/q_body" |
58 |
- $ref: "../swagger.yaml#/parameters/q_header" |
59 |
responses: |
60 |
200: |
61 |
description: A list of trains |
62 |
schema: |
63 |
items: |
64 |
$ref: "../swagger.yaml#/definitions/preservation_train" |
65 |
type: array |
66 |
400: |
67 |
description: Bad request |
68 |
schema: |
69 |
$ref: "../swagger.yaml#/definitions/error" |
70 |
403: |
71 |
description: Access forbidden |
72 |
schema: |
73 |
$ref: "../swagger.yaml#/definitions/error" |
74 |
500: |
75 |
description: |- |
76 |
Internal server error. Possible `error_code` attribute values: |
77 |
* `internal_server_error` |
78 |
schema: |
79 |
$ref: "../swagger.yaml#/definitions/error" |
80 |
503: |
81 |
description: Under maintenance |
82 |
schema: |
83 |
$ref: "../swagger.yaml#/definitions/error" |
84 |
x-koha-authorization: |
85 |
permissions: |
86 |
preservation: 1 |
87 |
post: |
88 |
x-mojo-to: Preservation::Trains#add |
89 |
operationId: addPreservationTrains |
90 |
tags: |
91 |
- preservation_train |
92 |
summary: Add train |
93 |
consumes: |
94 |
- application/json |
95 |
produces: |
96 |
- application/json |
97 |
parameters: |
98 |
- description: A JSON object containing information about the new train |
99 |
in: body |
100 |
name: body |
101 |
required: true |
102 |
schema: |
103 |
$ref: "../swagger.yaml#/definitions/preservation_train" |
104 |
responses: |
105 |
201: |
106 |
description: A successfully created train |
107 |
schema: |
108 |
items: |
109 |
$ref: "../swagger.yaml#/definitions/preservation_train" |
110 |
400: |
111 |
description: Bad parameter |
112 |
schema: |
113 |
$ref: "../swagger.yaml#/definitions/error" |
114 |
401: |
115 |
description: Authentication required |
116 |
schema: |
117 |
$ref: "../swagger.yaml#/definitions/error" |
118 |
403: |
119 |
description: Access forbidden |
120 |
schema: |
121 |
$ref: "../swagger.yaml#/definitions/error" |
122 |
404: |
123 |
description: Ressource not found |
124 |
schema: |
125 |
$ref: "../swagger.yaml#/definitions/error" |
126 |
409: |
127 |
description: Conflict in creating resource |
128 |
schema: |
129 |
$ref: "../swagger.yaml#/definitions/error" |
130 |
413: |
131 |
description: Payload too large |
132 |
schema: |
133 |
$ref: "../swagger.yaml#/definitions/error" |
134 |
500: |
135 |
description: |- |
136 |
Internal server error. Possible `error_code` attribute values: |
137 |
* `internal_server_error` |
138 |
schema: |
139 |
$ref: "../swagger.yaml#/definitions/error" |
140 |
503: |
141 |
description: Under maintenance |
142 |
schema: |
143 |
$ref: "../swagger.yaml#/definitions/error" |
144 |
x-koha-authorization: |
145 |
permissions: |
146 |
preservation: 1 |
147 |
"/preservation/trains/{train_id}": |
148 |
get: |
149 |
x-mojo-to: Preservation::Trains#get |
150 |
operationId: getPreservationTrains |
151 |
tags: |
152 |
- preservation_train |
153 |
summary: Get train |
154 |
produces: |
155 |
- application/json |
156 |
parameters: |
157 |
- $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" |
158 |
- name: x-koha-embed |
159 |
in: header |
160 |
required: false |
161 |
description: Embed list sent as a request header |
162 |
type: array |
163 |
items: |
164 |
type: string |
165 |
enum: |
166 |
- items |
167 |
- items.attributes |
168 |
- items.attributes.processing_attribute |
169 |
- default_processing |
170 |
- default_processing.attributes |
171 |
collectionFormat: csv |
172 |
responses: |
173 |
200: |
174 |
description: A train |
175 |
schema: |
176 |
items: |
177 |
$ref: "../swagger.yaml#/definitions/preservation_train" |
178 |
401: |
179 |
description: Authentication required |
180 |
schema: |
181 |
$ref: "../swagger.yaml#/definitions/error" |
182 |
403: |
183 |
description: Access forbidden |
184 |
schema: |
185 |
$ref: "../swagger.yaml#/definitions/error" |
186 |
404: |
187 |
description: Ressource not found |
188 |
schema: |
189 |
$ref: "../swagger.yaml#/definitions/error" |
190 |
500: |
191 |
description: |- |
192 |
Internal server error. Possible `error_code` attribute values: |
193 |
* `internal_server_error` |
194 |
schema: |
195 |
$ref: "../swagger.yaml#/definitions/error" |
196 |
503: |
197 |
description: Under maintenance |
198 |
schema: |
199 |
$ref: "../swagger.yaml#/definitions/error" |
200 |
x-koha-authorization: |
201 |
permissions: |
202 |
preservation: 1 |
203 |
put: |
204 |
x-mojo-to: Preservation::Trains#update |
205 |
operationId: updatePreservationTrains |
206 |
tags: |
207 |
- preservation_train |
208 |
summary: Update train |
209 |
consumes: |
210 |
- application/json |
211 |
produces: |
212 |
- application/json |
213 |
parameters: |
214 |
- $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" |
215 |
- name: body |
216 |
in: body |
217 |
description: A JSON object containing new information about existing train |
218 |
required: true |
219 |
schema: |
220 |
$ref: "../swagger.yaml#/definitions/preservation_train" |
221 |
responses: |
222 |
200: |
223 |
description: A successfully updated train |
224 |
schema: |
225 |
items: |
226 |
$ref: "../swagger.yaml#/definitions/preservation_train" |
227 |
400: |
228 |
description: Bad parameter |
229 |
schema: |
230 |
$ref: "../swagger.yaml#/definitions/error" |
231 |
403: |
232 |
description: Access forbidden |
233 |
schema: |
234 |
$ref: "../swagger.yaml#/definitions/error" |
235 |
404: |
236 |
description: Ressource not found |
237 |
schema: |
238 |
$ref: "../swagger.yaml#/definitions/error" |
239 |
409: |
240 |
description: Conflict in updating resource |
241 |
schema: |
242 |
$ref: "../swagger.yaml#/definitions/error" |
243 |
413: |
244 |
description: Payload too large |
245 |
schema: |
246 |
$ref: "../swagger.yaml#/definitions/error" |
247 |
500: |
248 |
description: |- |
249 |
Internal server error. Possible `error_code` attribute values: |
250 |
* `internal_server_error` |
251 |
schema: |
252 |
$ref: "../swagger.yaml#/definitions/error" |
253 |
503: |
254 |
description: Under maintenance |
255 |
schema: |
256 |
$ref: "../swagger.yaml#/definitions/error" |
257 |
x-koha-authorization: |
258 |
permissions: |
259 |
preservation: 1 |
260 |
delete: |
261 |
x-mojo-to: Preservation::Trains#delete |
262 |
operationId: deletePreservationTrains |
263 |
tags: |
264 |
- preservation_train |
265 |
summary: Delete train |
266 |
produces: |
267 |
- application/json |
268 |
parameters: |
269 |
- $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" |
270 |
responses: |
271 |
204: |
272 |
description: Train deleted |
273 |
400: |
274 |
description: Train deletion failed |
275 |
schema: |
276 |
$ref: "../swagger.yaml#/definitions/error" |
277 |
401: |
278 |
description: Authentication required |
279 |
schema: |
280 |
$ref: "../swagger.yaml#/definitions/error" |
281 |
403: |
282 |
description: Access forbidden |
283 |
schema: |
284 |
$ref: "../swagger.yaml#/definitions/error" |
285 |
404: |
286 |
description: Ressource not found |
287 |
schema: |
288 |
$ref: "../swagger.yaml#/definitions/error" |
289 |
409: |
290 |
description: Conflict in deleting resource |
291 |
schema: |
292 |
$ref: "../swagger.yaml#/definitions/error" |
293 |
500: |
294 |
description: |- |
295 |
Internal server error. Possible `error_code` attribute values: |
296 |
* `internal_server_error` |
297 |
schema: |
298 |
$ref: "../swagger.yaml#/definitions/error" |
299 |
503: |
300 |
description: Under maintenance |
301 |
schema: |
302 |
$ref: "../swagger.yaml#/definitions/error" |
303 |
x-koha-authorization: |
304 |
permissions: |
305 |
preservation: 1 |
306 |
"/preservation/trains/{train_id}/items": |
307 |
post: |
308 |
x-mojo-to: Preservation::Trains#add_item |
309 |
operationId: addItemToTrain |
310 |
tags: |
311 |
- preservation_train |
312 |
summary: Add item to train |
313 |
consumes: |
314 |
- application/json |
315 |
produces: |
316 |
- application/json |
317 |
parameters: |
318 |
- $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" |
319 |
- description: An item |
320 |
in: body |
321 |
name: body |
322 |
required: true |
323 |
schema: |
324 |
type: object |
325 |
responses: |
326 |
201: |
327 |
description: A successfully added item |
328 |
schema: |
329 |
type: object |
330 |
400: |
331 |
description: Bad parameter |
332 |
schema: |
333 |
$ref: "../swagger.yaml#/definitions/error" |
334 |
401: |
335 |
description: Authentication required |
336 |
schema: |
337 |
$ref: "../swagger.yaml#/definitions/error" |
338 |
403: |
339 |
description: Access forbidden |
340 |
schema: |
341 |
$ref: "../swagger.yaml#/definitions/error" |
342 |
404: |
343 |
description: Ressource not found |
344 |
schema: |
345 |
$ref: "../swagger.yaml#/definitions/error" |
346 |
409: |
347 |
description: Conflict in creating resource |
348 |
schema: |
349 |
$ref: "../swagger.yaml#/definitions/error" |
350 |
413: |
351 |
description: Payload too large |
352 |
schema: |
353 |
$ref: "../swagger.yaml#/definitions/error" |
354 |
500: |
355 |
description: |- |
356 |
Internal server error. Possible `error_code` attribute values: |
357 |
* `internal_server_error` |
358 |
schema: |
359 |
$ref: "../swagger.yaml#/definitions/error" |
360 |
503: |
361 |
description: Under maintenance |
362 |
schema: |
363 |
$ref: "../swagger.yaml#/definitions/error" |
364 |
x-koha-authorization: |
365 |
permissions: |
366 |
preservation: 1 |
367 |
description: |- |
368 |
Internal server error. Possible `error_code` attribute values: |
369 |
* `internal_server_error` |
370 |
schema: |
371 |
$ref: "../swagger.yaml#/definitions/error" |
372 |
503: |
373 |
description: Under maintenance |
374 |
schema: |
375 |
$ref: "../swagger.yaml#/definitions/error" |
376 |
x-koha-authorization: |
377 |
permissions: |
378 |
preservation: 1 |
379 |
"/preservation/trains/{train_id}/items/{train_item_id}": |
380 |
put: |
381 |
x-mojo-to: Preservation::Trains#update_item |
382 |
operationId: updateItemFromTrain |
383 |
tags: |
384 |
- preservation_train |
385 |
summary: Update item from train |
386 |
consumes: |
387 |
- application/json |
388 |
produces: |
389 |
- application/json |
390 |
parameters: |
391 |
- $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" |
392 |
- $ref: "../swagger.yaml#/parameters/preservation_train_item_id_pp" |
393 |
- description: An item |
394 |
in: body |
395 |
name: body |
396 |
required: true |
397 |
schema: |
398 |
type: object |
399 |
- name: x-koha-embed |
400 |
in: header |
401 |
required: false |
402 |
description: Embed list sent as a request header |
403 |
type: array |
404 |
items: |
405 |
type: string |
406 |
enum: |
407 |
- attributes |
408 |
collectionFormat: csv |
409 |
responses: |
410 |
200: |
411 |
description: A successfully updated item |
412 |
schema: |
413 |
type: object |
414 |
400: |
415 |
description: Bad parameter |
416 |
schema: |
417 |
$ref: "../swagger.yaml#/definitions/error" |
418 |
403: |
419 |
description: Access forbidden |
420 |
schema: |
421 |
$ref: "../swagger.yaml#/definitions/error" |
422 |
404: |
423 |
description: Ressource not found |
424 |
schema: |
425 |
$ref: "../swagger.yaml#/definitions/error" |
426 |
409: |
427 |
description: Conflict in updating resource |
428 |
schema: |
429 |
$ref: "../swagger.yaml#/definitions/error" |
430 |
413: |
431 |
description: Payload too large |
432 |
schema: |
433 |
$ref: "../swagger.yaml#/definitions/error" |
434 |
500: |
435 |
description: |- |
436 |
Internal server error. Possible `error_code` attribute values: |
437 |
* `internal_server_error` |
438 |
schema: |
439 |
$ref: "../swagger.yaml#/definitions/error" |
440 |
503: |
441 |
description: Under maintenance |
442 |
schema: |
443 |
$ref: "../swagger.yaml#/definitions/error" |
444 |
x-koha-authorization: |
445 |
permissions: |
446 |
preservation: 1 |
447 |
delete: |
448 |
x-mojo-to: Preservation::Trains#remove_item |
449 |
operationId: removeItemFromTrain |
450 |
tags: |
451 |
- preservation_train |
452 |
summary: Remove item from train |
453 |
parameters: |
454 |
- $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" |
455 |
- $ref: "../swagger.yaml#/parameters/preservation_train_item_id_pp" |
456 |
produces: |
457 |
- application/json |
458 |
responses: |
459 |
"204": |
460 |
description: Item removed |
461 |
"400": |
462 |
description: Item removal failed |
463 |
schema: |
464 |
$ref: "../swagger.yaml#/definitions/error" |
465 |
"401": |
466 |
description: Authentication required |
467 |
schema: |
468 |
$ref: "../swagger.yaml#/definitions/error" |
469 |
"403": |
470 |
description: Access forbidden |
471 |
schema: |
472 |
$ref: "../swagger.yaml#/definitions/error" |
473 |
"404": |
474 |
description: Item not found |
475 |
schema: |
476 |
$ref: "../swagger.yaml#/definitions/error" |
477 |
"500": |
478 |
description: | |
479 |
Internal server error. Possible `error_code` attribute values: |
480 |
|
481 |
* `internal_server_error` |
482 |
schema: |
483 |
$ref: "../swagger.yaml#/definitions/error" |
484 |
"503": |
485 |
description: Under maintenance |
486 |
schema: |
487 |
$ref: "../swagger.yaml#/definitions/error" |
488 |
x-koha-authorization: |
489 |
permissions: |
490 |
preservation: 1 |
491 |
get: |
492 |
x-mojo-to: Preservation::Trains#get_item |
493 |
operationId: getItemFromPreservationTrains |
494 |
tags: |
495 |
- preservation_train |
496 |
summary: Get item from train |
497 |
produces: |
498 |
- application/json |
499 |
parameters: |
500 |
- $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" |
501 |
- $ref: "../swagger.yaml#/parameters/preservation_train_item_id_pp" |
502 |
- name: x-koha-embed |
503 |
in: header |
504 |
required: false |
505 |
description: Embed list sent as a request header |
506 |
type: array |
507 |
items: |
508 |
type: string |
509 |
enum: |
510 |
- attributes |
511 |
- catalogue_item |
512 |
- catalogue_item.biblio |
513 |
collectionFormat: csv |
514 |
responses: |
515 |
200: |
516 |
description: An item in train |
517 |
schema: |
518 |
type: object |
519 |
401: |
520 |
description: Authentication required |
521 |
schema: |
522 |
$ref: "../swagger.yaml#/definitions/error" |
523 |
403: |
524 |
description: Access forbidden |
525 |
schema: |
526 |
$ref: "../swagger.yaml#/definitions/error" |
527 |
404: |
528 |
description: Ressource not found |
529 |
schema: |
530 |
$ref: "../swagger.yaml#/definitions/error" |
531 |
500: |
532 |
description: |- |
533 |
Internal server error. Possible `error_code` attribute values: |
534 |
* `internal_server_error` |
535 |
schema: |
536 |
$ref: "../swagger.yaml#/definitions/error" |
537 |
503: |
538 |
description: Under maintenance |
539 |
schema: |
540 |
$ref: "../swagger.yaml#/definitions/error" |
541 |
x-koha-authorization: |
542 |
permissions: |
543 |
preservation: 1 |