View | Details | Raw Unified | Return to bug 30708
Collapse All | Expand All

(-)a/api/v1/swagger/definitions/preservation_processing.yaml (+19 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  processing_id:
5
    type: integer
6
    description: internally assigned agreement identifier
7
    readOnly: true
8
  name:
9
    description: name of the processing
10
    type: string
11
  attributes:
12
    description: attributes of the processing
13
    items:
14
      $ref: preservation_processing_attribute.yaml
15
16
additionalProperties: false
17
required:
18
  - processing_id
19
  - name
(-)a/api/v1/swagger/definitions/preservation_processing_attribute.yaml (+22 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  processing_attribute_id:
5
    type: integer
6
    description: Internal processing attribute identifier
7
  processing_id:
8
    type: integer
9
    description: Internal processing identifier
10
  name:
11
    type: string
12
  type:
13
    type:
14
      - string
15
  option_source:
16
    type:
17
      - string
18
      - "null"
19
additionalProperties: false
20
required:
21
  - name
22
  - type
(-)a/api/v1/swagger/definitions/preservation_train.yaml (+55 lines)
Line 0 Link Here
1
---
2
type: object
3
properties:
4
  train_id:
5
    type: integer
6
    description: internally assigned agreement identifier
7
    readOnly: true
8
  name:
9
    description: name of the train
10
    type: string
11
  description:
12
    description: description of the train
13
    type:
14
      - string
15
      - "null"
16
  default_processing_id:
17
    description: foreign key to preservation_processings
18
    type:
19
      - integer
20
      - "null"
21
  not_for_loan:
22
    description: NOT_LOAN authorised value to apply to item added to this train
23
    type:
24
      - string
25
      - "null"
26
  created_on:
27
    description: creation date
28
    type:
29
      - string
30
      - "null"
31
  closed_on:
32
    description: closing date
33
    type:
34
      - string
35
      - "null"
36
  sent_on:
37
    description: sending date
38
    type:
39
      - string
40
      - "null"
41
  received_on:
42
    description: receiving date
43
    type:
44
      - string
45
      - "null"
46
  default_processing:
47
    description: the default processing
48
    type:
49
      - object
50
      - "null"
51
52
additionalProperties: false
53
required:
54
  - train_id
55
  - name
(-)a/api/v1/swagger/paths/preservation_processings.yaml (+272 lines)
Line 0 Link Here
1
---
2
/preservation/processings:
3
  get:
4
    x-mojo-to: Preservation::Processings#list
5
    operationId: listPreservationProcessings
6
    tags:
7
      - preservation_processing
8
    summary: List processings
9
    produces:
10
      - application/json
11
    parameters:
12
      - description: Case insensitive search on processing id
13
        in: query
14
        name: processing_id
15
        required: false
16
        type: integer
17
      - description: Case insensitive search on processing name
18
        in: query
19
        name: name
20
        required: false
21
        type: string
22
      - $ref: "../swagger.yaml#/parameters/match"
23
      - $ref: "../swagger.yaml#/parameters/order_by"
24
      - $ref: "../swagger.yaml#/parameters/page"
25
      - $ref: "../swagger.yaml#/parameters/per_page"
26
      - $ref: "../swagger.yaml#/parameters/q_param"
27
      - $ref: "../swagger.yaml#/parameters/q_body"
28
      - $ref: "../swagger.yaml#/parameters/q_header"
29
    responses:
30
      200:
31
        description: A list of processings
32
        schema:
33
          items:
34
            $ref: "../swagger.yaml#/definitions/preservation_processing"
35
          type: array
36
      400:
37
        description: Bad request
38
        schema:
39
          $ref: "../swagger.yaml#/definitions/error"
40
      403:
41
        description: Access forbidden
42
        schema:
43
          $ref: "../swagger.yaml#/definitions/error"
44
      500:
45
        description: |-
46
          Internal server error. Possible `error_code` attribute values:
47
          * `internal_server_error`
48
        schema:
49
          $ref: "../swagger.yaml#/definitions/error"
50
      503:
51
        description: Under maintenance
52
        schema:
53
          $ref: "../swagger.yaml#/definitions/error"
54
    x-koha-authorization:
55
      permissions:
56
        preservation: 1
57
  post:
58
    x-mojo-to: Preservation::Processings#add
59
    operationId: addPreservationProcessings
60
    tags:
61
      - preservation_processing
62
    summary: Add processing
63
    consumes:
64
      - application/json
65
    produces:
66
      - application/json
67
    parameters:
68
      - description: A JSON object containing information about the new processing
69
        in: body
70
        name: body
71
        required: true
72
        schema:
73
            $ref: "../swagger.yaml#/definitions/preservation_processing"
74
    responses:
75
      201:
76
        description: A successfully created processing
77
        schema:
78
          items:
79
            $ref: "../swagger.yaml#/definitions/preservation_processing"
80
      400:
81
        description: Bad parameter
82
        schema:
83
          $ref: "../swagger.yaml#/definitions/error"
84
      401:
85
        description: Authentication required
86
        schema:
87
          $ref: "../swagger.yaml#/definitions/error"
88
      403:
89
        description: Access forbidden
90
        schema:
91
          $ref: "../swagger.yaml#/definitions/error"
92
      404:
93
        description: Ressource not found
94
        schema:
95
          $ref: "../swagger.yaml#/definitions/error"
96
      409:
97
        description: Conflict in creating resource
98
        schema:
99
          $ref: "../swagger.yaml#/definitions/error"
100
      413:
101
        description: Payload too large
102
        schema:
103
          $ref: "../swagger.yaml#/definitions/error"
104
      500:
105
        description: |-
106
          Internal server error. Possible `error_code` attribute values:
107
          * `internal_server_error`
108
        schema:
109
          $ref: "../swagger.yaml#/definitions/error"
110
      503:
111
        description: Under maintenance
112
        schema:
113
          $ref: "../swagger.yaml#/definitions/error"
114
    x-koha-authorization:
115
      permissions:
116
        preservation: 1
117
"/preservation/processings/{processing_id}":
118
  get:
119
    x-mojo-to: Preservation::Processings#get
120
    operationId: getPreservationProcessings
121
    tags:
122
      - preservation_processing
123
    summary: Get processing
124
    produces:
125
      - application/json
126
    parameters:
127
      - $ref: "../swagger.yaml#/parameters/preservation_processing_id_pp"
128
      - name: x-koha-embed
129
        in: header
130
        required: false
131
        description: Embed list sent as a request header
132
        type: array
133
        items:
134
          type: string
135
          enum:
136
            - attributes
137
        collectionFormat: csv
138
    responses:
139
      200:
140
        description: A processing
141
        schema:
142
          items:
143
            $ref: "../swagger.yaml#/definitions/preservation_processing"
144
      401:
145
        description: Authentication required
146
        schema:
147
          $ref: "../swagger.yaml#/definitions/error"
148
      403:
149
        description: Access forbidden
150
        schema:
151
          $ref: "../swagger.yaml#/definitions/error"
152
      404:
153
        description: Ressource not found
154
        schema:
155
          $ref: "../swagger.yaml#/definitions/error"
156
      500:
157
        description: |-
158
          Internal server error. Possible `error_code` attribute values:
159
          * `internal_server_error`
160
        schema:
161
          $ref: "../swagger.yaml#/definitions/error"
162
      503:
163
        description: Under maintenance
164
        schema:
165
          $ref: "../swagger.yaml#/definitions/error"
166
    x-koha-authorization:
167
      permissions:
168
        preservation: 1
169
  put:
170
    x-mojo-to: Preservation::Processings#update
171
    operationId: updatePreservationProcessings
172
    tags:
173
      - preservation_processing
174
    summary: Update processing
175
    consumes:
176
      - application/json
177
    produces:
178
      - application/json
179
    parameters:
180
      - $ref: "../swagger.yaml#/parameters/preservation_processing_id_pp"
181
      - name: body
182
        in: body
183
        description: A JSON object containing new information about existing processing
184
        required: true
185
        schema:
186
          $ref: "../swagger.yaml#/definitions/preservation_processing"
187
188
    responses:
189
      200:
190
        description: A successfully updated processing
191
        schema:
192
          items:
193
            $ref: "../swagger.yaml#/definitions/preservation_processing"
194
      400:
195
        description: Bad parameter
196
        schema:
197
          $ref: "../swagger.yaml#/definitions/error"
198
      403:
199
        description: Access forbidden
200
        schema:
201
          $ref: "../swagger.yaml#/definitions/error"
202
      404:
203
        description: Ressource not found
204
        schema:
205
          $ref: "../swagger.yaml#/definitions/error"
206
      409:
207
        description: Conflict in updating resource
208
        schema:
209
          $ref: "../swagger.yaml#/definitions/error"
210
      413:
211
        description: Payload too large
212
        schema:
213
          $ref: "../swagger.yaml#/definitions/error"
214
      500:
215
        description: |-
216
          Internal server error. Possible `error_code` attribute values:
217
          * `internal_server_error`
218
        schema:
219
          $ref: "../swagger.yaml#/definitions/error"
220
      503:
221
        description: Under maintenance
222
        schema:
223
          $ref: "../swagger.yaml#/definitions/error"
224
    x-koha-authorization:
225
      permissions:
226
        preservation: 1
227
  delete:
228
    x-mojo-to: Preservation::Processings#delete
229
    operationId: deletePreservationProcessings
230
    tags:
231
      - preservation_processing
232
    summary: Delete processing
233
    produces:
234
      - application/json
235
    parameters:
236
      - $ref: "../swagger.yaml#/parameters/preservation_processing_id_pp"
237
    responses:
238
      204:
239
        description: processing deleted
240
      400:
241
        description: processing deletion failed
242
        schema:
243
          $ref: "../swagger.yaml#/definitions/error"
244
      401:
245
        description: Authentication required
246
        schema:
247
          $ref: "../swagger.yaml#/definitions/error"
248
      403:
249
        description: Access forbidden
250
        schema:
251
          $ref: "../swagger.yaml#/definitions/error"
252
      404:
253
        description: Ressource not found
254
        schema:
255
          $ref: "../swagger.yaml#/definitions/error"
256
      409:
257
        description: Conflict in deleting resource
258
        schema:
259
          $ref: "../swagger.yaml#/definitions/error"
260
      500:
261
        description: |-
262
          Internal server error. Possible `error_code` attribute values:
263
          * `internal_server_error`
264
        schema:
265
          $ref: "../swagger.yaml#/definitions/error"
266
      503:
267
        description: Under maintenance
268
        schema:
269
          $ref: "../swagger.yaml#/definitions/error"
270
    x-koha-authorization:
271
      permissions:
272
        preservation: 1
(-)a/api/v1/swagger/paths/preservation_trains.yaml (+543 lines)
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
(-)a/api/v1/swagger/paths/preservation_waiting_list.yaml (+188 lines)
Line 0 Link Here
1
---
2
/preservation/waiting-list/items:
3
  get:
4
    x-mojo-to: Preservation::WaitingList#list
5
    operationId: listItemsFromWaitingList
6
    tags:
7
      - waiting_list
8
    summary: List items from waiting list
9
    parameters:
10
      - name: external_id
11
        in: query
12
        description: Search on the item's barcode
13
        required: false
14
        type: string
15
      - name: x-koha-embed
16
        in: header
17
        required: false
18
        description: Embed list sent as a request header
19
        type: array
20
        items:
21
          type: string
22
          enum:
23
            - biblio
24
        collectionFormat: csv
25
      - $ref: "../swagger.yaml#/parameters/match"
26
      - $ref: "../swagger.yaml#/parameters/order_by"
27
      - $ref: "../swagger.yaml#/parameters/page"
28
      - $ref: "../swagger.yaml#/parameters/per_page"
29
      - $ref: "../swagger.yaml#/parameters/q_param"
30
      - $ref: "../swagger.yaml#/parameters/q_body"
31
      - $ref: "../swagger.yaml#/parameters/q_header"
32
      - $ref: "../swagger.yaml#/parameters/request_id_header"
33
    consumes:
34
      - application/json
35
    produces:
36
      - application/json
37
    responses:
38
      "200":
39
        description: A list of item
40
        schema:
41
          type: array
42
          items:
43
            $ref: "../swagger.yaml#/definitions/item"
44
      "400":
45
        description: Bad parameter
46
        schema:
47
          $ref: "../swagger.yaml#/definitions/error"
48
      "401":
49
        description: Authentication required
50
        schema:
51
          $ref: "../swagger.yaml#/definitions/error"
52
      "403":
53
        description: Access forbidden
54
        schema:
55
          $ref: "../swagger.yaml#/definitions/error"
56
      "500":
57
        description: |
58
          Internal server error. Possible `error_code` attribute values:
59
60
          * `internal_server_error`
61
        schema:
62
          $ref: "../swagger.yaml#/definitions/error"
63
      "503":
64
        description: Under maintenance
65
        schema:
66
          $ref: "../swagger.yaml#/definitions/error"
67
    x-koha-authorization:
68
      permissions:
69
        preservation: 1
70
  post:
71
    x-mojo-to: Preservation::WaitingList#add_items
72
    operationId: addItemsToWaitingList
73
    tags:
74
      - waiting_list
75
    summary: Add items to waiting list
76
    consumes:
77
      - application/json
78
    produces:
79
      - application/json
80
    parameters:
81
      - description: A list of itemnumbers or barcodes
82
        in: body
83
        name: body
84
        required: true
85
        schema:
86
          type: array
87
          items:
88
            type: object
89
    responses:
90
      201:
91
        description: A successfully added list of items
92
        schema:
93
          type: array
94
          items:
95
            type: object
96
      400:
97
        description: Bad parameter
98
        schema:
99
          $ref: "../swagger.yaml#/definitions/error"
100
      401:
101
        description: Authentication required
102
        schema:
103
          $ref: "../swagger.yaml#/definitions/error"
104
      403:
105
        description: Access forbidden
106
        schema:
107
          $ref: "../swagger.yaml#/definitions/error"
108
      404:
109
        description: Ressource not found
110
        schema:
111
          $ref: "../swagger.yaml#/definitions/error"
112
      409:
113
        description: Conflict in creating resource
114
        schema:
115
          $ref: "../swagger.yaml#/definitions/error"
116
      413:
117
        description: Payload too large
118
        schema:
119
          $ref: "../swagger.yaml#/definitions/error"
120
      500:
121
        description: |-
122
          Internal server error. Possible `error_code` attribute values:
123
          * `internal_server_error`
124
        schema:
125
          $ref: "../swagger.yaml#/definitions/error"
126
      503:
127
        description: Under maintenance
128
        schema:
129
          $ref: "../swagger.yaml#/definitions/error"
130
    x-koha-authorization:
131
      permissions:
132
        preservation: 1
133
        description: |-
134
          Internal server error. Possible `error_code` attribute values:
135
          * `internal_server_error`
136
        schema:
137
          $ref: "../swagger.yaml#/definitions/error"
138
      503:
139
        description: Under maintenance
140
        schema:
141
          $ref: "../swagger.yaml#/definitions/error"
142
    x-koha-authorization:
143
      permissions:
144
        preservation: 1
145
/preservation/waiting-list/items/{item_id}:
146
  delete:
147
    x-mojo-to: Preservation::WaitingList#remove_item
148
    operationId: removeItemFromWaitingList
149
    tags:
150
      - waiting_list
151
    summary: Remove item from waiting list
152
    parameters:
153
      - $ref: "../swagger.yaml#/parameters/item_id_pp"
154
    produces:
155
      - application/json
156
    responses:
157
      "204":
158
        description: Item removed
159
      "400":
160
        description: Item removal failed
161
        schema:
162
          $ref: "../swagger.yaml#/definitions/error"
163
      "401":
164
        description: Authentication required
165
        schema:
166
          $ref: "../swagger.yaml#/definitions/error"
167
      "403":
168
        description: Access forbidden
169
        schema:
170
          $ref: "../swagger.yaml#/definitions/error"
171
      "404":
172
        description: Item not found
173
        schema:
174
          $ref: "../swagger.yaml#/definitions/error"
175
      "500":
176
        description: |
177
          Internal server error. Possible `error_code` attribute values:
178
179
          * `internal_server_error`
180
        schema:
181
          $ref: "../swagger.yaml#/definitions/error"
182
      "503":
183
        description: Under maintenance
184
        schema:
185
          $ref: "../swagger.yaml#/definitions/error"
186
    x-koha-authorization:
187
      permissions:
188
        preservation: 1
(-)a/api/v1/swagger/swagger.yaml (-1 / +38 lines)
Lines 86-91 definitions: Link Here
86
    $ref: ./definitions/patron_balance.yaml
86
    $ref: ./definitions/patron_balance.yaml
87
  patron_extended_attribute:
87
  patron_extended_attribute:
88
    $ref: ./definitions/patron_extended_attribute.yaml
88
    $ref: ./definitions/patron_extended_attribute.yaml
89
  preservation_train:
90
    $ref: ./definitions/preservation_train.yaml
91
  preservation_processing:
92
    $ref: ./definitions/preservation_processing.yaml
89
  quote:
93
  quote:
90
    $ref: ./definitions/quote.yaml
94
    $ref: ./definitions/quote.yaml
91
  renewal:
95
  renewal:
Lines 305-310 paths: Link Here
305
    $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password"
309
    $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password"
306
  "/patrons/{patron_id}/password/expiration_date":
310
  "/patrons/{patron_id}/password/expiration_date":
307
    $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password~1expiration_date"
311
    $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password~1expiration_date"
312
  /preservation/trains:
313
    $ref: ./paths/preservation_trains.yaml#/~1preservation~1trains
314
  "/preservation/trains/{train_id}":
315
    $ref: "./paths/preservation_trains.yaml#/~1preservation~1trains~1{train_id}"
316
  "/preservation/trains/{train_id}/items":
317
    $ref: "./paths/preservation_trains.yaml#/~1preservation~1trains~1{train_id}~1items"
318
  "/preservation/trains/{train_id}/items/{train_item_id}":
319
    $ref: "./paths/preservation_trains.yaml#/~1preservation~1trains~1{train_id}~1items~1{train_item_id}"
320
  /preservation/processings:
321
    $ref: ./paths/preservation_processings.yaml#/~1preservation~1processings
322
  "/preservation/processings/{processing_id}":
323
    $ref: "./paths/preservation_processings.yaml#/~1preservation~1processings~1{processing_id}"
324
  /preservation/waiting-list/items:
325
    $ref: ./paths/preservation_waiting_list.yaml#/~1preservation~1waiting-list~1items
326
  "/preservation/waiting-list/items/{item_id}":
327
    $ref: "./paths/preservation_waiting_list.yaml#/~1preservation~1waiting-list~1items~1{item_id}"
308
  "/public/biblios/{biblio_id}":
328
  "/public/biblios/{biblio_id}":
309
    $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}"
329
    $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}"
310
  "/public/items":
330
  "/public/items":
Lines 588-593 parameters: Link Here
588
    name: _per_page
608
    name: _per_page
589
    required: false
609
    required: false
590
    type: integer
610
    type: integer
611
  preservation_processing_id_pp:
612
    description: processing internal identifier
613
    in: path
614
    name: processing_id
615
    required: true
616
    type: integer
617
  preservation_train_id_pp:
618
    description: train internal identifier
619
    in: path
620
    name: train_id
621
    required: true
622
    type: integer
623
  preservation_train_item_id_pp:
624
    description: train item internal identifier
625
    in: path
626
    name: train_item_id
627
    required: true
628
    type: integer
591
  q_body:
629
  q_body:
592
    description: Query filter sent through request"s body
630
    description: Query filter sent through request"s body
593
    in: body
631
    in: body
594
- 

Return to bug 30708