Bug 29032: Pre-load ILL backends to speed up response
[koha.git] / api / v1 / swagger / paths / biblios.json
1 {
2   "/biblios/{biblio_id}": {
3     "get": {
4       "x-mojo-to": "Biblios#get",
5       "operationId": "getBiblio",
6       "tags": [ "biblios" ],
7       "summary": "Get biblio",
8       "parameters": [
9         {
10           "$ref": "../parameters.json#/biblio_id_pp"
11         }
12       ],
13       "produces": [
14         "application/json",
15         "application/marcxml+xml",
16         "application/marc-in-json",
17         "application/marc",
18         "text/plain"
19       ],
20       "responses": {
21         "200": {
22           "description": "A biblio"
23         },
24         "401": {
25           "description": "Authentication required",
26           "schema": {
27             "$ref": "../definitions.json#/error"
28           }
29         },
30         "403": {
31           "description": "Access forbidden",
32           "schema": {
33             "$ref": "../definitions.json#/error"
34           }
35         },
36         "404": {
37           "description": "Biblio not found",
38           "schema": {
39             "$ref": "../definitions.json#/error"
40           }
41         },
42         "406": {
43           "description": "Not acceptable",
44           "schema": {
45             "type": "array",
46             "description": "Accepted content-types",
47             "items": {
48                 "type": "string"
49             }
50           }
51         },
52         "500": {
53           "description": "Internal server 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             "catalogue": "1"
68         }
69       }
70     },
71     "delete": {
72       "x-mojo-to": "Biblios#delete",
73       "operationId": "deleteBiblio",
74       "tags": [ "biblios" ],
75       "summary": "Delete biblio",
76       "parameters": [
77         {
78           "$ref": "../parameters.json#/biblio_id_pp"
79         }
80       ],
81       "produces": [
82         "application/json"
83       ],
84       "responses": {
85         "204": {
86           "description": "Biblio deleted",
87           "schema": {
88             "type": "string"
89           }
90         },
91         "401": {
92           "description": "Authentication required",
93           "schema": {
94             "$ref": "../definitions.json#/error"
95           }
96         },
97         "403": {
98           "description": "Access forbidden",
99           "schema": {
100             "$ref": "../definitions.json#/error"
101           }
102         },
103         "404": {
104           "description": "Biblio not found",
105           "schema": {
106             "$ref": "../definitions.json#/error"
107           }
108         },
109         "409": {
110           "description": "Unable to perform action on biblio",
111           "schema": {
112             "$ref": "../definitions.json#/error"
113           }
114         },
115         "500": {
116           "description": "Internal error",
117           "schema": {
118             "$ref": "../definitions.json#/error"
119           }
120         },
121         "503": {
122           "description": "Under maintenance",
123           "schema": {
124             "$ref": "../definitions.json#/error"
125           }
126         }
127       },
128       "x-koha-authorization": {
129         "permissions": {
130           "editcatalogue": "edit_catalogue"
131         }
132       }
133     }
134   },
135   "/biblios/{biblio_id}/items": {
136     "get": {
137       "x-mojo-to": "Biblios#get_items",
138       "operationId": "getBiblioItems",
139       "tags": [
140         "biblios"
141       ],
142       "summary": "Get items for a biblio",
143       "parameters": [
144         {
145           "$ref": "../parameters.json#/biblio_id_pp"
146         },
147         {
148           "$ref": "../parameters.json#/match"
149         },
150         {
151           "$ref": "../parameters.json#/order_by"
152         },
153         {
154           "$ref": "../parameters.json#/page"
155         },
156         {
157           "$ref": "../parameters.json#/per_page"
158         },
159         {
160           "$ref": "../parameters.json#/q_param"
161         },
162         {
163           "$ref": "../parameters.json#/q_body"
164         },
165         {
166           "$ref": "../parameters.json#/q_header"
167         }
168       ],
169       "consumes": [
170         "application/json"
171       ],
172       "produces": [
173         "application/json"
174       ],
175       "responses": {
176         "200": {
177           "description": "A list of the items attached to the record",
178           "schema": {
179             "type": "array",
180             "items": {
181               "$ref": "../definitions.json#/item"
182             }
183           }
184         },
185         "401": {
186           "description": "Authentication required",
187           "schema": {
188             "$ref": "../definitions.json#/error"
189           }
190         },
191         "403": {
192           "description": "Access forbidden",
193           "schema": {
194             "$ref": "../definitions.json#/error"
195           }
196         },
197         "404": {
198           "description": "Biblio not found",
199           "schema": {
200             "$ref": "../definitions.json#/error"
201           }
202         },
203         "406": {
204           "description": "Not acceptable",
205           "schema": {
206             "type": "array",
207             "description": "Accepted content-types",
208             "items": {
209                 "type": "string"
210             }
211           }
212         },
213         "500": {
214           "description": "Internal server error",
215           "schema": {
216             "$ref": "../definitions.json#/error"
217           }
218         },
219         "503": {
220           "description": "Under maintenance",
221           "schema": {
222             "$ref": "../definitions.json#/error"
223           }
224         }
225       },
226       "x-koha-authorization": {
227         "permissions": {
228             "catalogue": "1"
229         }
230       }
231     }
232   },
233   "/biblios/{biblio_id}/pickup_locations": {
234     "get": {
235       "x-mojo-to": "Biblios#pickup_locations",
236       "operationId": "getBiblioPickupLocations",
237       "tags": [
238         "biblios"
239       ],
240       "summary": "Get valid pickup locations for a biblio",
241       "parameters": [
242         {
243           "$ref": "../parameters.json#/biblio_id_pp"
244         },
245         {
246           "name": "patron_id",
247           "in": "query",
248           "description": "Internal patron identifier",
249           "required": true,
250           "type": "integer"
251         },
252         {
253           "$ref": "../parameters.json#/match"
254         },
255         {
256           "$ref": "../parameters.json#/order_by"
257         },
258         {
259           "$ref": "../parameters.json#/page"
260         },
261         {
262           "$ref": "../parameters.json#/per_page"
263         },
264         {
265           "$ref": "../parameters.json#/q_param"
266         },
267         {
268           "$ref": "../parameters.json#/q_body"
269         },
270         {
271           "$ref": "../parameters.json#/q_header"
272         }
273       ],
274       "consumes": [
275         "application/json"
276       ],
277       "produces": [
278         "application/json"
279       ],
280       "responses": {
281         "200": {
282           "description": "Biblio pickup locations",
283           "schema": {
284             "type": "array",
285             "items": {
286               "$ref": "../definitions.json#/library"
287             }
288           }
289         },
290         "400": {
291           "description": "Missing or wrong parameters",
292           "schema": {
293             "$ref": "../definitions.json#/error"
294           }
295         },
296         "401": {
297           "description": "Authentication required",
298           "schema": {
299             "$ref": "../definitions.json#/error"
300           }
301         },
302         "403": {
303           "description": "Access forbidden",
304           "schema": {
305             "$ref": "../definitions.json#/error"
306           }
307         },
308         "404": {
309           "description": "Biblio not found",
310           "schema": {
311             "$ref": "../definitions.json#/error"
312           }
313         },
314         "500": {
315           "description": "Internal server error",
316           "schema": {
317             "$ref": "../definitions.json#/error"
318           }
319         },
320         "503": {
321           "description": "Under maintenance",
322           "schema": {
323             "$ref": "../definitions.json#/error"
324           }
325         }
326       },
327       "x-koha-authorization": {
328         "permissions": {
329           "reserveforothers": "place_holds"
330         }
331       }
332     }
333   },
334   "/public/biblios/{biblio_id}": {
335     "get": {
336       "x-mojo-to": "Biblios#get_public",
337       "operationId": "getBiblioPublic",
338       "tags": [
339         "biblios"
340       ],
341       "summary": "Get biblio (public)",
342       "parameters": [
343         {
344           "$ref": "../parameters.json#/biblio_id_pp"
345         }
346       ],
347       "produces": [
348         "application/marcxml+xml",
349         "application/marc-in-json",
350         "application/marc",
351         "text/plain"
352       ],
353       "responses": {
354         "200": {
355           "description": "A biblio"
356         },
357         "401": {
358           "description": "Authentication required",
359           "schema": {
360             "$ref": "../definitions.json#/error"
361           }
362         },
363         "403": {
364           "description": "Access forbidden",
365           "schema": {
366             "$ref": "../definitions.json#/error"
367           }
368         },
369         "404": {
370           "description": "Biblio not found",
371           "schema": {
372             "$ref": "../definitions.json#/error"
373           }
374         },
375         "406": {
376           "description": "Not acceptable",
377           "schema": {
378             "type": "array",
379             "description": "Accepted content-types",
380             "items": {
381                 "type": "string"
382             }
383           }
384         },
385         "500": {
386           "description": "Internal server error",
387           "schema": {
388             "$ref": "../definitions.json#/error"
389           }
390         },
391         "503": {
392           "description": "Under maintenance",
393           "schema": {
394             "$ref": "../definitions.json#/error"
395           }
396         }
397       }
398     }
399   }
400 }