Bug 34387: Improve API docs naming consistency
[koha.git] / api / v1 / swagger / paths / erm_eholdings_titles.yaml
1 ---
2 /erm/eholdings/{provider}/titles:
3   get:
4     x-mojo-to: ERM::EHoldings::Titles#list
5     operationId: listErmEHoldingsTitles
6     tags:
7       - erm_eholdings_titles
8     summary: List eholdings titles
9     produces:
10       - application/json
11     parameters:
12       - description: Provider name
13         in: path
14         name: provider
15         required: true
16         type: string
17       - description: Case insensitive search on title title_id
18         in: query
19         name: title_id
20         required: false
21         type: integer
22       - description: Case insensitive search on title publication_title
23         in: query
24         name: publication_title
25         required: false
26         type: string
27       - description: Case insensitive search on title external_id
28         in: query
29         name: external_id
30         required: false
31         type: string
32       - description: Case insensitive search on title print_identifier
33         in: query
34         name: print_identifier
35         required: false
36         type: string
37       - description: Case insensitive search on title online_identifier
38         in: query
39         name: online_identifier
40         required: false
41         type: string
42       - description: Case insensitive search on title date_first_issue_online
43         in: query
44         name: date_first_issue_online
45         required: false
46         type: string
47       - description: Case insensitive search on title num_first_vol_online
48         in: query
49         name: num_first_vol_online
50         required: false
51         type: string
52       - description: Case insensitive search on title num_first_issue_online
53         in: query
54         name: num_first_issue_online
55         required: false
56         type: string
57       - description: Case insensitive search on title date_last_issue_online
58         in: query
59         name: date_last_issue_online
60         required: false
61         type: string
62       - description: Case insensitive search on title num_last_vol_online
63         in: query
64         name: num_last_vol_online
65         required: false
66         type: string
67       - description: Case insensitive search on title num_last_issue_online
68         in: query
69         name: num_last_issue_online
70         required: false
71         type: string
72       - description: Case insensitive search on title title_url
73         in: query
74         name: title_url
75         required: false
76         type: string
77       - description: Case insensitive search on title first_author
78         in: query
79         name: first_author
80         required: false
81         type: string
82       - description: Case insensitive search on title embargo_info
83         in: query
84         name: embargo_info
85         required: false
86         type: string
87       - description: Case insensitive search on title coverage_depth
88         in: query
89         name: coverage_depth
90         required: false
91         type: string
92       - description: Case insensitive search on title notes
93         in: query
94         name: notes
95         required: false
96         type: string
97       - description: Case insensitive search on title publisher_name
98         in: query
99         name: publisher_name
100         required: false
101         type: string
102       - description: Case insensitive search on title publication_type
103         in: query
104         name: publication_type
105         required: false
106         type: string
107       - description: Case insensitive search on title date_monograph_published_print
108         in: query
109         name: date_monograph_published_print
110         required: false
111         type: string
112       - description: Case insensitive search on title date_monograph_published_online
113         in: query
114         name: date_monograph_published_online
115         required: false
116         type: string
117       - description: Case insensitive search on title monograph_volume
118         in: query
119         name: monograph_volume
120         required: false
121         type: string
122       - description: Case insensitive search on title monograph_edition
123         in: query
124         name: monograph_edition
125         required: false
126         type: string
127       - description: Case insensitive search on title first_editor
128         in: query
129         name: first_editor
130         required: false
131         type: string
132       - description: Case insensitive search on title parent_publication_title_id
133         in: query
134         name: parent_publication_title_id
135         required: false
136         type: string
137       - description: Case insensitive search on title preceeding_publication_title_id
138         in: query
139         name: preceeding_publication_title_id
140         required: false
141         type: string
142       - description: Case insensitive search on title access_type
143         in: query
144         name: access_type
145         required: false
146         type: string
147       - name: x-koha-embed
148         in: header
149         required: false
150         description: Embed list sent as a request header
151         type: array
152         items:
153           type: string
154           enum:
155             - resources.package
156         collectionFormat: csv
157       - $ref: "../swagger.yaml#/parameters/match"
158       - $ref: "../swagger.yaml#/parameters/order_by"
159       - $ref: "../swagger.yaml#/parameters/page"
160       - $ref: "../swagger.yaml#/parameters/per_page"
161       - $ref: "../swagger.yaml#/parameters/q_param"
162       - $ref: "../swagger.yaml#/parameters/q_body"
163     responses:
164       200:
165         description: A list of eHoldings titles
166         schema:
167           items:
168             $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
169           type: array
170       400:
171         description: Bad request
172         schema:
173           $ref: "../swagger.yaml#/definitions/error"
174       403:
175         description: Access forbidden
176         schema:
177           $ref: "../swagger.yaml#/definitions/error"
178       500:
179         description: |-
180           Internal server error. Possible `error_code` attribute values:
181           * `internal_server_error`
182         schema:
183           $ref: "../swagger.yaml#/definitions/error"
184       503:
185         description: Under maintenance
186         schema:
187           $ref: "../swagger.yaml#/definitions/error"
188     x-koha-authorization:
189       permissions:
190         erm: 1
191   post:
192     x-mojo-to: ERM::EHoldings::Titles#add
193     operationId: addErmEHoldingsTitles
194     tags:
195       - erm_eholdings_titles
196     summary: Add eholding
197     consumes:
198       - application/json
199     produces:
200       - application/json
201     parameters:
202       - description: Provider name
203         in: path
204         name: provider
205         required: true
206         type: string
207       - description: A JSON object containing information about the new title
208         in: body
209         name: body
210         required: true
211         schema:
212             $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
213     responses:
214       201:
215         description: A successfully created title
216         schema:
217           items:
218             $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
219       400:
220         description: Bad parameter
221         schema:
222           $ref: "../swagger.yaml#/definitions/error"
223       401:
224         description: Authentication required
225         schema:
226           $ref: "../swagger.yaml#/definitions/error"
227       403:
228         description: Access forbidden
229         schema:
230           $ref: "../swagger.yaml#/definitions/error"
231       404:
232         description: Ressource not found
233         schema:
234           $ref: "../swagger.yaml#/definitions/error"
235       409:
236         description: Conflict in creating resource
237         schema:
238           $ref: "../swagger.yaml#/definitions/error"
239       500:
240         description: |-
241           Internal server error. Possible `error_code` attribute values:
242           * `internal_server_error`
243         schema:
244           $ref: "../swagger.yaml#/definitions/error"
245       503:
246         description: Under maintenance
247         schema:
248           $ref: "../swagger.yaml#/definitions/error"
249     x-koha-authorization:
250       permissions:
251         erm: 1
252 "/erm/eholdings/{provider}/titles/{title_id}":
253   get:
254     x-mojo-to: ERM::EHoldings::Titles#get
255     operationId: getErmEHoldingsTitles
256     tags:
257       - erm_eholdings_titles
258     summary: Get titles
259     produces:
260       - application/json
261     parameters:
262       - description: Provider name
263         in: path
264         name: provider
265         required: true
266         type: string
267       - $ref: "../swagger.yaml#/parameters/eholdings_title_id_pp"
268       - name: x-koha-embed
269         in: header
270         required: false
271         description: Embed list sent as a request header
272         type: array
273         items:
274           type: string
275           enum:
276             - resources
277             - resources.package
278         collectionFormat: csv
279     responses:
280       200:
281         description: An eHolding title
282         schema:
283           items:
284             $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
285       401:
286         description: Authentication required
287         schema:
288           $ref: "../swagger.yaml#/definitions/error"
289       403:
290         description: Access forbidden
291         schema:
292           $ref: "../swagger.yaml#/definitions/error"
293       404:
294         description: Ressource not found
295         schema:
296           $ref: "../swagger.yaml#/definitions/error"
297       500:
298         description: |-
299           Internal server error. Possible `error_code` attribute values:
300           * `internal_server_error`
301         schema:
302           $ref: "../swagger.yaml#/definitions/error"
303       503:
304         description: Under maintenance
305         schema:
306           $ref: "../swagger.yaml#/definitions/error"
307     x-koha-authorization:
308       permissions:
309         erm: 1
310   put:
311     x-mojo-to: ERM::EHoldings::Titles#update
312     operationId: updateErmEHoldingsTitles
313     tags:
314       - erm_eholdings_titles
315     summary: Update titles
316     consumes:
317       - application/json
318     produces:
319       - application/json
320     parameters:
321       - description: Provider name
322         in: path
323         name: provider
324         required: true
325         type: string
326       - $ref: "../swagger.yaml#/parameters/eholdings_title_id_pp"
327       - name: body
328         in: body
329         description: A JSON object containing new information about existing title
330         required: true
331         schema:
332           $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
333       - name: x-koha-embed
334         in: header
335         required: false
336         description: Embed list sent as a request header
337         type: array
338         items:
339           type: string
340           enum:
341             - resources
342             - resources.package
343         collectionFormat: csv
344     responses:
345       200:
346         description: A successfully updated title
347         schema:
348           items:
349             $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
350       400:
351         description: Bad parameter
352         schema:
353           $ref: "../swagger.yaml#/definitions/error"
354       403:
355         description: Access forbidden
356         schema:
357           $ref: "../swagger.yaml#/definitions/error"
358       404:
359         description: Ressource not found
360         schema:
361           $ref: "../swagger.yaml#/definitions/error"
362       409:
363         description: Conflict in updating resource
364         schema:
365           $ref: "../swagger.yaml#/definitions/error"
366       500:
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         erm: 1
379   delete:
380     x-mojo-to: ERM::EHoldings::Titles#delete
381     operationId: deleteErmEHoldingsTitles
382     tags:
383       - erm_eholdings_titles
384     summary: Delete eHolding title
385     produces:
386       - application/json
387     parameters:
388       - description: Provider name
389         in: path
390         name: provider
391         required: true
392         type: string
393       - $ref: "../swagger.yaml#/parameters/eholdings_title_id_pp"
394     responses:
395       204:
396         description: title deleted
397       400:
398         description: title deletion failed
399         schema:
400           $ref: "../swagger.yaml#/definitions/error"
401       401:
402         description: Authentication required
403         schema:
404           $ref: "../swagger.yaml#/definitions/error"
405       403:
406         description: Access forbidden
407         schema:
408           $ref: "../swagger.yaml#/definitions/error"
409       404:
410         description: Ressource not found
411         schema:
412           $ref: "../swagger.yaml#/definitions/error"
413       409:
414         description: Conflict in deleting resource
415         schema:
416           $ref: "../swagger.yaml#/definitions/error"
417       500:
418         description: |-
419           Internal server error. Possible `error_code` attribute values:
420           * `internal_server_error`
421         schema:
422           $ref: "../swagger.yaml#/definitions/error"
423       503:
424         description: Under maintenance
425         schema:
426           $ref: "../swagger.yaml#/definitions/error"
427     x-koha-authorization:
428       permissions:
429         erm: 1
430 /erm/eholdings/local/titles/import:
431   post:
432     x-mojo-to: ERM::EHoldings::Titles#import_from_list
433     operationId: importErmEHoldingsTitles
434     tags:
435       - erm_eholdings_titles
436     summary: Import local titles
437     consumes:
438       - application/json
439     produces:
440       - application/json
441     parameters:
442       - description: The list_id of the list to import
443         in: body
444         name: body
445         required: true
446         schema:
447           type: object
448           properties:
449             list_id:
450               type: string
451             package_id:
452               type: string
453           additionalProperties: false
454     responses:
455       201:
456         description: Successfully enqueued the import job
457         schema:
458           type: object
459           properties:
460             job_id:
461               type: string
462           additionalProperties: false
463       400:
464         description: Bad parameter
465         schema:
466           $ref: "../swagger.yaml#/definitions/error"
467       401:
468         description: Authentication required
469         schema:
470           $ref: "../swagger.yaml#/definitions/error"
471       403:
472         description: Access forbidden
473         schema:
474           $ref: "../swagger.yaml#/definitions/error"
475       404:
476         description: Ressource not found
477         schema:
478           $ref: "../swagger.yaml#/definitions/error"
479       409:
480         description: Conflict in creating resource
481         schema:
482           $ref: "../swagger.yaml#/definitions/error"
483       500:
484         description: |-
485           Internal server error. Possible `error_code` attribute values:
486           * `internal_server_error`
487         schema:
488           $ref: "../swagger.yaml#/definitions/error"
489       503:
490         description: Under maintenance
491         schema:
492           $ref: "../swagger.yaml#/definitions/error"
493     x-koha-authorization:
494       permissions:
495         erm: 1