Line 0
Link Here
|
0 |
- |
1 |
{ |
|
|
2 |
"/biblios/{biblio_id}/volumes": { |
3 |
"get": { |
4 |
"x-mojo-to": "Biblios::Volumes#list", |
5 |
"operationId": "listVolumes", |
6 |
"tags": [ |
7 |
"volumes" |
8 |
], |
9 |
"parameters": [ |
10 |
{ |
11 |
"name": "biblio_id", |
12 |
"in": "path", |
13 |
"description": "Internal identifier for the parent bibliographic record", |
14 |
"required": true, |
15 |
"type": "string" |
16 |
}, |
17 |
{ |
18 |
"$ref": "../parameters.json#/match" |
19 |
}, |
20 |
{ |
21 |
"$ref": "../parameters.json#/order_by" |
22 |
}, |
23 |
{ |
24 |
"$ref": "../parameters.json#/page" |
25 |
}, |
26 |
{ |
27 |
"$ref": "../parameters.json#/per_page" |
28 |
} |
29 |
], |
30 |
"consumes": [ |
31 |
"application/json" |
32 |
], |
33 |
"produces": [ |
34 |
"application/json" |
35 |
], |
36 |
"responses": { |
37 |
"200": { |
38 |
"description": "A list of volumes", |
39 |
"schema": { |
40 |
"type": "array", |
41 |
"items": { |
42 |
"$ref": "../definitions.json#/volume" |
43 |
} |
44 |
} |
45 |
}, |
46 |
"401": { |
47 |
"description": "Authentication required", |
48 |
"schema": { |
49 |
"$ref": "../definitions.json#/error" |
50 |
} |
51 |
}, |
52 |
"403": { |
53 |
"description": "Access forbidden", |
54 |
"schema": { |
55 |
"$ref": "../definitions.json#/error" |
56 |
} |
57 |
}, |
58 |
"500": { |
59 |
"description": "Internal server error", |
60 |
"schema": { |
61 |
"$ref": "../definitions.json#/error" |
62 |
} |
63 |
}, |
64 |
"503": { |
65 |
"description": "Under maintenance", |
66 |
"schema": { |
67 |
"$ref": "../definitions.json#/error" |
68 |
} |
69 |
} |
70 |
}, |
71 |
"x-koha-authorization": { |
72 |
"permissions": { |
73 |
"catalogue": "1" |
74 |
} |
75 |
}, |
76 |
"x-koha-embed": [ |
77 |
"items" |
78 |
] |
79 |
}, |
80 |
"post": { |
81 |
"x-mojo-to": "Biblios::Volumes#add", |
82 |
"operationId": "addVolume", |
83 |
"tags": [ |
84 |
"volumes" |
85 |
], |
86 |
"parameters": [ |
87 |
{ |
88 |
"name": "biblio_id", |
89 |
"in": "path", |
90 |
"description": "Internal identifier for the parent bibliographic record", |
91 |
"required": true, |
92 |
"type": "string" |
93 |
}, |
94 |
{ |
95 |
"name": "body", |
96 |
"in": "body", |
97 |
"description": "A JSON object representing a volume", |
98 |
"required": true, |
99 |
"schema": { |
100 |
"type": "object", |
101 |
"properties": { |
102 |
"description": { |
103 |
"type": "string", |
104 |
"description": "Volume description" |
105 |
}, |
106 |
"display_order": { |
107 |
"type": "integer", |
108 |
"description": "Position in waiting queue" |
109 |
} |
110 |
} |
111 |
} |
112 |
} |
113 |
], |
114 |
"consumes": [ |
115 |
"application/json" |
116 |
], |
117 |
"produces": [ |
118 |
"application/json" |
119 |
], |
120 |
"responses": { |
121 |
"201": { |
122 |
"description": "A successfully created volume", |
123 |
"schema": { |
124 |
"$ref": "../definitions.json#/volume" |
125 |
} |
126 |
}, |
127 |
"400": { |
128 |
"description": "Bad parameter", |
129 |
"schema": { |
130 |
"$ref": "../definitions.json#/error" |
131 |
} |
132 |
}, |
133 |
"401": { |
134 |
"description": "Authentication required", |
135 |
"schema": { |
136 |
"$ref": "../definitions.json#/error" |
137 |
} |
138 |
}, |
139 |
"403": { |
140 |
"description": "Access forbidden", |
141 |
"schema": { |
142 |
"$ref": "../definitions.json#/error" |
143 |
} |
144 |
}, |
145 |
"404": { |
146 |
"description": "Resource not found", |
147 |
"schema": { |
148 |
"$ref": "../definitions.json#/error" |
149 |
} |
150 |
}, |
151 |
"409": { |
152 |
"description": "Conflict in creating resource", |
153 |
"schema": { |
154 |
"$ref": "../definitions.json#/error" |
155 |
} |
156 |
}, |
157 |
"500": { |
158 |
"description": "Internal server error", |
159 |
"schema": { |
160 |
"$ref": "../definitions.json#/error" |
161 |
} |
162 |
}, |
163 |
"503": { |
164 |
"description": "Under maintenance", |
165 |
"schema": { |
166 |
"$ref": "../definitions.json#/error" |
167 |
} |
168 |
} |
169 |
}, |
170 |
"x-koha-authorization": { |
171 |
"permissions": { |
172 |
"catalogue": "1" |
173 |
} |
174 |
} |
175 |
} |
176 |
}, |
177 |
"/biblios/{biblio_id}/volumes/{volume_id}": { |
178 |
"get": { |
179 |
"x-mojo-to": "Biblios::Volumes#get", |
180 |
"operationId": "getVolume", |
181 |
"tags": [ |
182 |
"volumes" |
183 |
], |
184 |
"parameters": [ |
185 |
{ |
186 |
"name": "biblio_id", |
187 |
"in": "path", |
188 |
"description": "Internal identifier for the parent bibliographic record", |
189 |
"required": true, |
190 |
"type": "string" |
191 |
}, |
192 |
{ |
193 |
"name": "volume_id", |
194 |
"in": "path", |
195 |
"description": "Internal identifier for the volume", |
196 |
"required": true, |
197 |
"type": "string" |
198 |
} |
199 |
], |
200 |
"consumes": [ |
201 |
"application/json" |
202 |
], |
203 |
"produces": [ |
204 |
"application/json" |
205 |
], |
206 |
"responses": { |
207 |
"200": { |
208 |
"description": "A volume", |
209 |
"schema": { |
210 |
"$ref": "../definitions.json#/volume" |
211 |
} |
212 |
}, |
213 |
"400": { |
214 |
"description": "Missing or wrong parameters", |
215 |
"schema": { |
216 |
"$ref": "../definitions.json#/error" |
217 |
} |
218 |
}, |
219 |
"404": { |
220 |
"description": "Volume not found", |
221 |
"schema": { |
222 |
"$ref": "../definitions.json#/error" |
223 |
} |
224 |
}, |
225 |
"500": { |
226 |
"description": "Internal server error", |
227 |
"schema": { |
228 |
"$ref": "../definitions.json#/error" |
229 |
} |
230 |
}, |
231 |
"503": { |
232 |
"description": "Under maintenance", |
233 |
"schema": { |
234 |
"$ref": "../definitions.json#/error" |
235 |
} |
236 |
} |
237 |
}, |
238 |
"x-koha-embed": [ |
239 |
"items" |
240 |
], |
241 |
"x-koha-authorization": { |
242 |
"permissions": { |
243 |
"catalogue": "1" |
244 |
} |
245 |
} |
246 |
}, |
247 |
"put": { |
248 |
"x-mojo-to": "Biblios::Volumes#update", |
249 |
"operationId": "updateVolume", |
250 |
"tags": [ |
251 |
"volumes" |
252 |
], |
253 |
"parameters": [ |
254 |
{ |
255 |
"name": "biblio_id", |
256 |
"in": "path", |
257 |
"description": "Internal identifier for the parent bibliographic record", |
258 |
"required": true, |
259 |
"type": "string" |
260 |
}, |
261 |
{ |
262 |
"name": "volume_id", |
263 |
"in": "path", |
264 |
"description": "Internal identifier for the volume", |
265 |
"required": true, |
266 |
"type": "string" |
267 |
}, |
268 |
{ |
269 |
"name": "body", |
270 |
"in": "body", |
271 |
"description": "A JSON object with the new values for the volume", |
272 |
"required": true, |
273 |
"schema": { |
274 |
"type": "object", |
275 |
"properties": { |
276 |
"description": { |
277 |
"type": "string", |
278 |
"description": "Volume description" |
279 |
}, |
280 |
"display_order": { |
281 |
"type": "integer", |
282 |
"description": "Position in waiting queue" |
283 |
} |
284 |
} |
285 |
} |
286 |
} |
287 |
], |
288 |
"consumes": [ |
289 |
"application/json" |
290 |
], |
291 |
"produces": [ |
292 |
"application/json" |
293 |
], |
294 |
"responses": { |
295 |
"200": { |
296 |
"description": "The updated volume", |
297 |
"schema": { |
298 |
"$ref": "../definitions.json#/volume" |
299 |
} |
300 |
}, |
301 |
"400": { |
302 |
"description": "Bad request", |
303 |
"schema": { |
304 |
"$ref": "../definitions.json#/error" |
305 |
} |
306 |
}, |
307 |
"401": { |
308 |
"description": "Authentication required", |
309 |
"schema": { |
310 |
"$ref": "../definitions.json#/error" |
311 |
} |
312 |
}, |
313 |
"403": { |
314 |
"description": "Access forbidden", |
315 |
"schema": { |
316 |
"$ref": "../definitions.json#/error" |
317 |
} |
318 |
}, |
319 |
"404": { |
320 |
"description": "Volume not found", |
321 |
"schema": { |
322 |
"$ref": "../definitions.json#/error" |
323 |
} |
324 |
}, |
325 |
"500": { |
326 |
"description": "Internal error", |
327 |
"schema": { |
328 |
"$ref": "../definitions.json#/error" |
329 |
} |
330 |
}, |
331 |
"503": { |
332 |
"description": "Under maintenance", |
333 |
"schema": { |
334 |
"$ref": "../definitions.json#/error" |
335 |
} |
336 |
} |
337 |
}, |
338 |
"x-koha-authorization": { |
339 |
"permissions": { |
340 |
"catalogue": "1" |
341 |
} |
342 |
}, |
343 |
"x-koha-embed": [ |
344 |
"items" |
345 |
] |
346 |
}, |
347 |
"delete": { |
348 |
"x-mojo-to": "Biblios::Volumes#delete", |
349 |
"operationId": "deleteVolume", |
350 |
"tags": [ |
351 |
"volumes" |
352 |
], |
353 |
"parameters": [ |
354 |
{ |
355 |
"name": "biblio_id", |
356 |
"in": "path", |
357 |
"description": "Internal identifier for the parent bibliographic record", |
358 |
"required": true, |
359 |
"type": "string" |
360 |
}, |
361 |
{ |
362 |
"name": "volume_id", |
363 |
"in": "path", |
364 |
"description": "Internal identifier for the volume", |
365 |
"required": true, |
366 |
"type": "string" |
367 |
} |
368 |
], |
369 |
"produces": [ |
370 |
"application/json" |
371 |
], |
372 |
"responses": { |
373 |
"204": { |
374 |
"description": "Volume deleted", |
375 |
"schema": { |
376 |
"type": "string" |
377 |
} |
378 |
}, |
379 |
"401": { |
380 |
"description": "Authentication required", |
381 |
"schema": { |
382 |
"$ref": "../definitions.json#/error" |
383 |
} |
384 |
}, |
385 |
"403": { |
386 |
"description": "Access forbidden", |
387 |
"schema": { |
388 |
"$ref": "../definitions.json#/error" |
389 |
} |
390 |
}, |
391 |
"404": { |
392 |
"description": "Volume not found", |
393 |
"schema": { |
394 |
"$ref": "../definitions.json#/error" |
395 |
} |
396 |
}, |
397 |
"500": { |
398 |
"description": "Internal error", |
399 |
"schema": { |
400 |
"$ref": "../definitions.json#/error" |
401 |
} |
402 |
}, |
403 |
"503": { |
404 |
"description": "Under maintenance", |
405 |
"schema": { |
406 |
"$ref": "../definitions.json#/error" |
407 |
} |
408 |
} |
409 |
}, |
410 |
"x-koha-authorization": { |
411 |
"permissions": { |
412 |
"catalogue": "1" |
413 |
} |
414 |
} |
415 |
} |
416 |
}, |
417 |
"/biblios/{biblio_id}/volumes/{volume_id}/items": { |
418 |
"post": { |
419 |
"x-mojo-to": "Biblios::Volumes::Items#add", |
420 |
"operationId": "addVolumeItem", |
421 |
"tags": [ |
422 |
"volumes" |
423 |
], |
424 |
"parameters": [ |
425 |
{ |
426 |
"name": "biblio_id", |
427 |
"in": "path", |
428 |
"description": "Internal identifier for the parent bibliographic record", |
429 |
"required": true, |
430 |
"type": "string" |
431 |
}, |
432 |
{ |
433 |
"name": "volume_id", |
434 |
"in": "path", |
435 |
"description": "Internal identifier for the volume", |
436 |
"required": true, |
437 |
"type": "string" |
438 |
}, |
439 |
{ |
440 |
"name": "body", |
441 |
"in": "body", |
442 |
"description": "A JSON object containing an item_id", |
443 |
"required": true, |
444 |
"schema": { |
445 |
"type": "object", |
446 |
"properties": { |
447 |
"item_id": { |
448 |
"type": "integer", |
449 |
"description": "Internal identifier for an item to be linked" |
450 |
} |
451 |
} |
452 |
} |
453 |
} |
454 |
], |
455 |
"consumes": [ |
456 |
"application/json" |
457 |
], |
458 |
"produces": [ |
459 |
"application/json" |
460 |
], |
461 |
"responses": { |
462 |
"201": { |
463 |
"description": "Item linked to volume" |
464 |
}, |
465 |
"400": { |
466 |
"description": "Bad request", |
467 |
"schema": { |
468 |
"$ref": "../definitions.json#/error" |
469 |
} |
470 |
}, |
471 |
"401": { |
472 |
"description": "Authentication required", |
473 |
"schema": { |
474 |
"$ref": "../definitions.json#/error" |
475 |
} |
476 |
}, |
477 |
"403": { |
478 |
"description": "Access forbidden", |
479 |
"schema": { |
480 |
"$ref": "../definitions.json#/error" |
481 |
} |
482 |
}, |
483 |
"409": { |
484 |
"description": "Request conflicts", |
485 |
"schema": { |
486 |
"$ref": "../definitions.json#/error" |
487 |
} |
488 |
}, |
489 |
"500": { |
490 |
"description": "Internal error", |
491 |
"schema": { |
492 |
"$ref": "../definitions.json#/error" |
493 |
} |
494 |
}, |
495 |
"503": { |
496 |
"description": "Under maintenance", |
497 |
"schema": { |
498 |
"$ref": "../definitions.json#/error" |
499 |
} |
500 |
} |
501 |
}, |
502 |
"x-koha-authorization": { |
503 |
"permissions": { |
504 |
"catalogue": "1" |
505 |
} |
506 |
}, |
507 |
"x-koha-embed": [ |
508 |
"items" |
509 |
] |
510 |
} |
511 |
}, |
512 |
"/biblios/{biblio_id}/volumes/{volume_id}/items/{item_id}": { |
513 |
"delete": { |
514 |
"x-mojo-to": "Biblios::Volumes::Items#delete", |
515 |
"operationId": "deleteVolumeItems", |
516 |
"tags": [ |
517 |
"volumes" |
518 |
], |
519 |
"parameters": [ |
520 |
{ |
521 |
"name": "biblio_id", |
522 |
"in": "path", |
523 |
"description": "Internal identifier for the parent bibliographic record", |
524 |
"required": true, |
525 |
"type": "string" |
526 |
}, |
527 |
{ |
528 |
"name": "volume_id", |
529 |
"in": "path", |
530 |
"description": "Internal identifier for the volume", |
531 |
"required": true, |
532 |
"type": "string" |
533 |
}, |
534 |
{ |
535 |
"name": "item_id", |
536 |
"in": "path", |
537 |
"description": "Internal identifier for the item", |
538 |
"required": true, |
539 |
"type": "string" |
540 |
} |
541 |
], |
542 |
"consumes": [ |
543 |
"application/json" |
544 |
], |
545 |
"produces": [ |
546 |
"application/json" |
547 |
], |
548 |
"responses": { |
549 |
"204": { |
550 |
"description": "Item unlinked from volume", |
551 |
"schema": { |
552 |
"type": "string" |
553 |
} |
554 |
}, |
555 |
"401": { |
556 |
"description": "Authentication required", |
557 |
"schema": { |
558 |
"$ref": "../definitions.json#/error" |
559 |
} |
560 |
}, |
561 |
"403": { |
562 |
"description": "Access forbidden", |
563 |
"schema": { |
564 |
"$ref": "../definitions.json#/error" |
565 |
} |
566 |
}, |
567 |
"404": { |
568 |
"description": "Item not linked to volume", |
569 |
"schema": { |
570 |
"$ref": "../definitions.json#/error" |
571 |
} |
572 |
}, |
573 |
"500": { |
574 |
"description": "Internal error", |
575 |
"schema": { |
576 |
"$ref": "../definitions.json#/error" |
577 |
} |
578 |
}, |
579 |
"503": { |
580 |
"description": "Under maintenance", |
581 |
"schema": { |
582 |
"$ref": "../definitions.json#/error" |
583 |
} |
584 |
} |
585 |
}, |
586 |
"x-koha-authorization": { |
587 |
"permissions": { |
588 |
"catalogue": "1" |
589 |
} |
590 |
} |
591 |
} |
592 |
} |
593 |
} |