Bug 32030: Add missing additionalProperties to /erm/eholdings/local/titles/import
[srvgit] / 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       - eholdings
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       - $ref: "../swagger.yaml#/parameters/match"
148       - $ref: "../swagger.yaml#/parameters/order_by"
149       - $ref: "../swagger.yaml#/parameters/page"
150       - $ref: "../swagger.yaml#/parameters/per_page"
151       - $ref: "../swagger.yaml#/parameters/q_param"
152       - $ref: "../swagger.yaml#/parameters/q_body"
153       - $ref: "../swagger.yaml#/parameters/q_header"
154     responses:
155       200:
156         description: A list of eHoldings titles
157         schema:
158           items:
159             $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
160           type: array
161       400:
162         description: Bad request
163         schema:
164           $ref: "../swagger.yaml#/definitions/error"
165       403:
166         description: Access forbidden
167         schema:
168           $ref: "../swagger.yaml#/definitions/error"
169       500:
170         description: |-
171           Internal server error. Possible `error_code` attribute values:
172           * `internal_server_error`
173         schema:
174           $ref: "../swagger.yaml#/definitions/error"
175       503:
176         description: Under maintenance
177         schema:
178           $ref: "../swagger.yaml#/definitions/error"
179     x-koha-authorization:
180       permissions:
181         erm: 1
182   post:
183     x-mojo-to: ERM::EHoldings::Titles#add
184     operationId: addErmEHoldingsTitles
185     tags:
186       - eholdings
187     summary: Add eholding
188     consumes:
189       - application/json
190     produces:
191       - application/json
192     parameters:
193       - description: A JSON object containing information about the new title
194         in: body
195         name: body
196         required: true
197         schema:
198             $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
199     responses:
200       201:
201         description: A successfully created title
202         schema:
203           items:
204             $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
205       400:
206         description: Bad parameter
207         schema:
208           $ref: "../swagger.yaml#/definitions/error"
209       401:
210         description: Authentication required
211         schema:
212           $ref: "../swagger.yaml#/definitions/error"
213       403:
214         description: Access forbidden
215         schema:
216           $ref: "../swagger.yaml#/definitions/error"
217       404:
218         description: Ressource not found
219         schema:
220           $ref: "../swagger.yaml#/definitions/error"
221       409:
222         description: Conflict in creating resource
223         schema:
224           $ref: "../swagger.yaml#/definitions/error"
225       500:
226         description: |-
227           Internal server error. Possible `error_code` attribute values:
228           * `internal_server_error`
229         schema:
230           $ref: "../swagger.yaml#/definitions/error"
231       503:
232         description: Under maintenance
233         schema:
234           $ref: "../swagger.yaml#/definitions/error"
235     x-koha-authorization:
236       permissions:
237         erm: 1
238 "/erm/eholdings/{provider}/titles/{title_id}":
239   get:
240     x-mojo-to: ERM::EHoldings::Titles#get
241     operationId: getErmEHoldingsTitles
242     tags:
243       - eholdings
244     summary: Get titles
245     produces:
246       - application/json
247     parameters:
248       - description: Provider name
249         in: path
250         name: provider
251         required: true
252         type: string
253       - $ref: "../swagger.yaml#/parameters/eholdings_title_id_pp"
254     responses:
255       200:
256         description: An eHolding title
257         schema:
258           items:
259             $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
260       401:
261         description: Authentication required
262         schema:
263           $ref: "../swagger.yaml#/definitions/error"
264       403:
265         description: Access forbidden
266         schema:
267           $ref: "../swagger.yaml#/definitions/error"
268       404:
269         description: Ressource not found
270         schema:
271           $ref: "../swagger.yaml#/definitions/error"
272       500:
273         description: |-
274           Internal server error. Possible `error_code` attribute values:
275           * `internal_server_error`
276         schema:
277           $ref: "../swagger.yaml#/definitions/error"
278       503:
279         description: Under maintenance
280         schema:
281           $ref: "../swagger.yaml#/definitions/error"
282     x-koha-authorization:
283       permissions:
284         erm: 1
285     x-koha-embed:
286       - resources
287       - resources.package
288   put:
289     x-mojo-to: ERM::EHoldings::Titles#update
290     operationId: updateErmEHoldingsTitles
291     tags:
292       - eholdings
293     summary: Update titles
294     consumes:
295       - application/json
296     produces:
297       - application/json
298     parameters:
299       - $ref: "../swagger.yaml#/parameters/eholdings_title_id_pp"
300       - name: body
301         in: body
302         description: A JSON object containing new information about existing title
303         required: true
304         schema:
305           $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
306     responses:
307       200:
308         description: A successfully updated title
309         schema:
310           items:
311             $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
312       400:
313         description: Bad parameter
314         schema:
315           $ref: "../swagger.yaml#/definitions/error"
316       403:
317         description: Access forbidden
318         schema:
319           $ref: "../swagger.yaml#/definitions/error"
320       404:
321         description: Ressource not found
322         schema:
323           $ref: "../swagger.yaml#/definitions/error"
324       409:
325         description: Conflict in updating resource
326         schema:
327           $ref: "../swagger.yaml#/definitions/error"
328       500:
329         description: |-
330           Internal server error. Possible `error_code` attribute values:
331           * `internal_server_error`
332         schema:
333           $ref: "../swagger.yaml#/definitions/error"
334       503:
335         description: Under maintenance
336         schema:
337           $ref: "../swagger.yaml#/definitions/error"
338     x-koha-authorization:
339       permissions:
340         erm: 1
341     x-koha-embed:
342       - resources
343       - resources.package
344   delete:
345     x-mojo-to: ERM::EHoldings::Titles#delete
346     operationId: deleteErmEHoldingsTitles
347     tags:
348       - eholdings
349     summary: Delete eHolding title
350     produces:
351       - application/json
352     parameters:
353       - $ref: "../swagger.yaml#/parameters/eholdings_title_id_pp"
354     responses:
355       204:
356         description: title deleted
357       400:
358         description: title deletion failed
359         schema:
360           $ref: "../swagger.yaml#/definitions/error"
361       401:
362         description: Authentication required
363         schema:
364           $ref: "../swagger.yaml#/definitions/error"
365       403:
366         description: Access forbidden
367         schema:
368           $ref: "../swagger.yaml#/definitions/error"
369       404:
370         description: Ressource not found
371         schema:
372           $ref: "../swagger.yaml#/definitions/error"
373       409:
374         description: Conflict in deleting resource
375         schema:
376           $ref: "../swagger.yaml#/definitions/error"
377       500:
378         description: |-
379           Internal server error. Possible `error_code` attribute values:
380           * `internal_server_error`
381         schema:
382           $ref: "../swagger.yaml#/definitions/error"
383       503:
384         description: Under maintenance
385         schema:
386           $ref: "../swagger.yaml#/definitions/error"
387     x-koha-authorization:
388       permissions:
389         erm: 1
390
391 /erm/eholdings/local/titles/import:
392   post:
393     x-mojo-to: ERM::EHoldings::Titles#import_from_list
394     operationId: importErmEHoldingsTitles
395     tags:
396       - eholdings
397     summary: Import local titles
398     consumes:
399       - application/json
400     produces:
401       - application/json
402     parameters:
403       - description: The list_id of the list to import
404         in: body
405         name: body
406         required: true
407         schema:
408           type: object
409           properties:
410             list_id:
411               type: string
412             package_id:
413               type: string
414           additionalProperties: false
415     responses:
416       201:
417         description: Successfully enqueued the import job
418         schema:
419           type: object
420           properties:
421             job_id:
422               type: string
423           additionalProperties: false
424       400:
425         description: Bad parameter
426         schema:
427           $ref: "../swagger.yaml#/definitions/error"
428       401:
429         description: Authentication required
430         schema:
431           $ref: "../swagger.yaml#/definitions/error"
432       403:
433         description: Access forbidden
434         schema:
435           $ref: "../swagger.yaml#/definitions/error"
436       404:
437         description: Ressource not found
438         schema:
439           $ref: "../swagger.yaml#/definitions/error"
440       409:
441         description: Conflict in creating resource
442         schema:
443           $ref: "../swagger.yaml#/definitions/error"
444       500:
445         description: |-
446           Internal server error. Possible `error_code` attribute values:
447           * `internal_server_error`
448         schema:
449           $ref: "../swagger.yaml#/definitions/error"
450       503:
451         description: Under maintenance
452         schema:
453           $ref: "../swagger.yaml#/definitions/error"
454     x-koha-authorization:
455       permissions:
456         erm: 1