Bugzilla – Attachment 154170 Details for
Bug 30708
Creation of a new 'Preservation' module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30708: REST API specs
Bug-30708-REST-API-specs.patch (text/plain), 37.39 KB, created by
Jonathan Druart
on 2023-08-03 08:22:27 UTC
(
hide
)
Description:
Bug 30708: REST API specs
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-08-03 08:22:27 UTC
Size:
37.39 KB
patch
obsolete
>From 53ff12577f8a7e4e2e675497bd64666d7f6fe792 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 7 Apr 2023 14:48:43 +0200 >Subject: [PATCH] Bug 30708: REST API specs > >Sponsored-by: BULAC - http://www.bulac.fr/ >Signed-off-by: BULAC - http://www.bulac.fr/ >Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> >Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> >--- > .../definitions/preservation_processing.yaml | 19 + > .../preservation_processing_attribute.yaml | 22 + > .../definitions/preservation_train.yaml | 55 ++ > .../paths/preservation_processings.yaml | 272 +++++++++ > api/v1/swagger/paths/preservation_trains.yaml | 543 ++++++++++++++++++ > .../paths/preservation_waiting_list.yaml | 188 ++++++ > api/v1/swagger/swagger.yaml | 38 ++ > 7 files changed, 1137 insertions(+) > create mode 100644 api/v1/swagger/definitions/preservation_processing.yaml > create mode 100644 api/v1/swagger/definitions/preservation_processing_attribute.yaml > create mode 100644 api/v1/swagger/definitions/preservation_train.yaml > create mode 100644 api/v1/swagger/paths/preservation_processings.yaml > create mode 100644 api/v1/swagger/paths/preservation_trains.yaml > create mode 100644 api/v1/swagger/paths/preservation_waiting_list.yaml > >diff --git a/api/v1/swagger/definitions/preservation_processing.yaml b/api/v1/swagger/definitions/preservation_processing.yaml >new file mode 100644 >index 00000000000..62ef2d8a9a2 >--- /dev/null >+++ b/api/v1/swagger/definitions/preservation_processing.yaml >@@ -0,0 +1,19 @@ >+--- >+type: object >+properties: >+ processing_id: >+ type: integer >+ description: internally assigned agreement identifier >+ readOnly: true >+ name: >+ description: name of the processing >+ type: string >+ attributes: >+ description: attributes of the processing >+ items: >+ $ref: preservation_processing_attribute.yaml >+ >+additionalProperties: false >+required: >+ - processing_id >+ - name >diff --git a/api/v1/swagger/definitions/preservation_processing_attribute.yaml b/api/v1/swagger/definitions/preservation_processing_attribute.yaml >new file mode 100644 >index 00000000000..dc3e8a316eb >--- /dev/null >+++ b/api/v1/swagger/definitions/preservation_processing_attribute.yaml >@@ -0,0 +1,22 @@ >+--- >+type: object >+properties: >+ processing_attribute_id: >+ type: integer >+ description: Internal processing attribute identifier >+ processing_id: >+ type: integer >+ description: Internal processing identifier >+ name: >+ type: string >+ type: >+ type: >+ - string >+ option_source: >+ type: >+ - string >+ - "null" >+additionalProperties: false >+required: >+ - name >+ - type >diff --git a/api/v1/swagger/definitions/preservation_train.yaml b/api/v1/swagger/definitions/preservation_train.yaml >new file mode 100644 >index 00000000000..9502a710a3e >--- /dev/null >+++ b/api/v1/swagger/definitions/preservation_train.yaml >@@ -0,0 +1,55 @@ >+--- >+type: object >+properties: >+ train_id: >+ type: integer >+ description: internally assigned agreement identifier >+ readOnly: true >+ name: >+ description: name of the train >+ type: string >+ description: >+ description: description of the train >+ type: >+ - string >+ - "null" >+ default_processing_id: >+ description: foreign key to preservation_processings >+ type: >+ - integer >+ - "null" >+ not_for_loan: >+ description: NOT_LOAN authorised value to apply to item added to this train >+ type: >+ - string >+ - "null" >+ created_on: >+ description: creation date >+ type: >+ - string >+ - "null" >+ closed_on: >+ description: closing date >+ type: >+ - string >+ - "null" >+ sent_on: >+ description: sending date >+ type: >+ - string >+ - "null" >+ received_on: >+ description: receiving date >+ type: >+ - string >+ - "null" >+ default_processing: >+ description: the default processing >+ type: >+ - object >+ - "null" >+ >+additionalProperties: false >+required: >+ - train_id >+ - name >diff --git a/api/v1/swagger/paths/preservation_processings.yaml b/api/v1/swagger/paths/preservation_processings.yaml >new file mode 100644 >index 00000000000..119b3983e88 >--- /dev/null >+++ b/api/v1/swagger/paths/preservation_processings.yaml >@@ -0,0 +1,272 @@ >+--- >+/preservation/processings: >+ get: >+ x-mojo-to: Preservation::Processings#list >+ operationId: listPreservationProcessings >+ tags: >+ - preservation_processing >+ summary: List processings >+ produces: >+ - application/json >+ parameters: >+ - description: Case insensitive search on processing id >+ in: query >+ name: processing_id >+ required: false >+ type: integer >+ - description: Case insensitive search on processing name >+ in: query >+ name: name >+ required: false >+ type: string >+ - $ref: "../swagger.yaml#/parameters/match" >+ - $ref: "../swagger.yaml#/parameters/order_by" >+ - $ref: "../swagger.yaml#/parameters/page" >+ - $ref: "../swagger.yaml#/parameters/per_page" >+ - $ref: "../swagger.yaml#/parameters/q_param" >+ - $ref: "../swagger.yaml#/parameters/q_body" >+ - $ref: "../swagger.yaml#/parameters/q_header" >+ responses: >+ 200: >+ description: A list of processings >+ schema: >+ items: >+ $ref: "../swagger.yaml#/definitions/preservation_processing" >+ type: array >+ 400: >+ description: Bad request >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+ post: >+ x-mojo-to: Preservation::Processings#add >+ operationId: addPreservationProcessings >+ tags: >+ - preservation_processing >+ summary: Add processing >+ consumes: >+ - application/json >+ produces: >+ - application/json >+ parameters: >+ - description: A JSON object containing information about the new processing >+ in: body >+ name: body >+ required: true >+ schema: >+ $ref: "../swagger.yaml#/definitions/preservation_processing" >+ responses: >+ 201: >+ description: A successfully created processing >+ schema: >+ items: >+ $ref: "../swagger.yaml#/definitions/preservation_processing" >+ 400: >+ description: Bad parameter >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 401: >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 404: >+ description: Ressource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 409: >+ description: Conflict in creating resource >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 413: >+ description: Payload too large >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+"/preservation/processings/{processing_id}": >+ get: >+ x-mojo-to: Preservation::Processings#get >+ operationId: getPreservationProcessings >+ tags: >+ - preservation_processing >+ summary: Get processing >+ produces: >+ - application/json >+ parameters: >+ - $ref: "../swagger.yaml#/parameters/preservation_processing_id_pp" >+ - name: x-koha-embed >+ in: header >+ required: false >+ description: Embed list sent as a request header >+ type: array >+ items: >+ type: string >+ enum: >+ - attributes >+ collectionFormat: csv >+ responses: >+ 200: >+ description: A processing >+ schema: >+ items: >+ $ref: "../swagger.yaml#/definitions/preservation_processing" >+ 401: >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 404: >+ description: Ressource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+ put: >+ x-mojo-to: Preservation::Processings#update >+ operationId: updatePreservationProcessings >+ tags: >+ - preservation_processing >+ summary: Update processing >+ consumes: >+ - application/json >+ produces: >+ - application/json >+ parameters: >+ - $ref: "../swagger.yaml#/parameters/preservation_processing_id_pp" >+ - name: body >+ in: body >+ description: A JSON object containing new information about existing processing >+ required: true >+ schema: >+ $ref: "../swagger.yaml#/definitions/preservation_processing" >+ >+ responses: >+ 200: >+ description: A successfully updated processing >+ schema: >+ items: >+ $ref: "../swagger.yaml#/definitions/preservation_processing" >+ 400: >+ description: Bad parameter >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 404: >+ description: Ressource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 409: >+ description: Conflict in updating resource >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 413: >+ description: Payload too large >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+ delete: >+ x-mojo-to: Preservation::Processings#delete >+ operationId: deletePreservationProcessings >+ tags: >+ - preservation_processing >+ summary: Delete processing >+ produces: >+ - application/json >+ parameters: >+ - $ref: "../swagger.yaml#/parameters/preservation_processing_id_pp" >+ responses: >+ 204: >+ description: processing deleted >+ 400: >+ description: processing deletion failed >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 401: >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 404: >+ description: Ressource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 409: >+ description: Conflict in deleting resource >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >diff --git a/api/v1/swagger/paths/preservation_trains.yaml b/api/v1/swagger/paths/preservation_trains.yaml >new file mode 100644 >index 00000000000..6890adf8d36 >--- /dev/null >+++ b/api/v1/swagger/paths/preservation_trains.yaml >@@ -0,0 +1,543 @@ >+--- >+/preservation/trains: >+ get: >+ x-mojo-to: Preservation::Trains#list >+ operationId: listPreservationTrains >+ tags: >+ - preservation_train >+ summary: List trains >+ produces: >+ - application/json >+ parameters: >+ - description: Case insensitive search on train id >+ in: query >+ name: train_id >+ required: false >+ type: integer >+ - description: Case insensitive search on train name >+ in: query >+ name: name >+ required: false >+ type: string >+ - description: Case insensitive search on train description >+ in: query >+ name: description >+ required: false >+ type: string >+ - description: Case insensitive search on not for loan value >+ in: query >+ name: not_for_loan >+ required: false >+ type: string >+ - description: Case insensitive search on train creation date >+ in: query >+ name: created_on >+ required: false >+ type: string >+ - description: Case insensitive search on train closing date >+ in: query >+ name: closed_on >+ required: false >+ type: string >+ - description: Case insensitive search on train sent date >+ in: query >+ name: sent_on >+ required: false >+ type: string >+ - description: Case insensitive search on train receiving date >+ in: query >+ name: received_on >+ required: false >+ type: string >+ - $ref: "../swagger.yaml#/parameters/match" >+ - $ref: "../swagger.yaml#/parameters/order_by" >+ - $ref: "../swagger.yaml#/parameters/page" >+ - $ref: "../swagger.yaml#/parameters/per_page" >+ - $ref: "../swagger.yaml#/parameters/q_param" >+ - $ref: "../swagger.yaml#/parameters/q_body" >+ - $ref: "../swagger.yaml#/parameters/q_header" >+ responses: >+ 200: >+ description: A list of trains >+ schema: >+ items: >+ $ref: "../swagger.yaml#/definitions/preservation_train" >+ type: array >+ 400: >+ description: Bad request >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+ post: >+ x-mojo-to: Preservation::Trains#add >+ operationId: addPreservationTrains >+ tags: >+ - preservation_train >+ summary: Add train >+ consumes: >+ - application/json >+ produces: >+ - application/json >+ parameters: >+ - description: A JSON object containing information about the new train >+ in: body >+ name: body >+ required: true >+ schema: >+ $ref: "../swagger.yaml#/definitions/preservation_train" >+ responses: >+ 201: >+ description: A successfully created train >+ schema: >+ items: >+ $ref: "../swagger.yaml#/definitions/preservation_train" >+ 400: >+ description: Bad parameter >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 401: >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 404: >+ description: Ressource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 409: >+ description: Conflict in creating resource >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 413: >+ description: Payload too large >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+"/preservation/trains/{train_id}": >+ get: >+ x-mojo-to: Preservation::Trains#get >+ operationId: getPreservationTrains >+ tags: >+ - preservation_train >+ summary: Get train >+ produces: >+ - application/json >+ parameters: >+ - $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" >+ - name: x-koha-embed >+ in: header >+ required: false >+ description: Embed list sent as a request header >+ type: array >+ items: >+ type: string >+ enum: >+ - items >+ - items.attributes >+ - items.attributes.processing_attribute >+ - default_processing >+ - default_processing.attributes >+ collectionFormat: csv >+ responses: >+ 200: >+ description: A train >+ schema: >+ items: >+ $ref: "../swagger.yaml#/definitions/preservation_train" >+ 401: >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 404: >+ description: Ressource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+ put: >+ x-mojo-to: Preservation::Trains#update >+ operationId: updatePreservationTrains >+ tags: >+ - preservation_train >+ summary: Update train >+ consumes: >+ - application/json >+ produces: >+ - application/json >+ parameters: >+ - $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" >+ - name: body >+ in: body >+ description: A JSON object containing new information about existing train >+ required: true >+ schema: >+ $ref: "../swagger.yaml#/definitions/preservation_train" >+ responses: >+ 200: >+ description: A successfully updated train >+ schema: >+ items: >+ $ref: "../swagger.yaml#/definitions/preservation_train" >+ 400: >+ description: Bad parameter >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 404: >+ description: Ressource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 409: >+ description: Conflict in updating resource >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 413: >+ description: Payload too large >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+ delete: >+ x-mojo-to: Preservation::Trains#delete >+ operationId: deletePreservationTrains >+ tags: >+ - preservation_train >+ summary: Delete train >+ produces: >+ - application/json >+ parameters: >+ - $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" >+ responses: >+ 204: >+ description: Train deleted >+ 400: >+ description: Train deletion failed >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 401: >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 404: >+ description: Ressource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 409: >+ description: Conflict in deleting resource >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+"/preservation/trains/{train_id}/items": >+ post: >+ x-mojo-to: Preservation::Trains#add_item >+ operationId: addItemToTrain >+ tags: >+ - preservation_train >+ summary: Add item to train >+ consumes: >+ - application/json >+ produces: >+ - application/json >+ parameters: >+ - $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" >+ - description: An item >+ in: body >+ name: body >+ required: true >+ schema: >+ type: object >+ responses: >+ 201: >+ description: A successfully added item >+ schema: >+ type: object >+ 400: >+ description: Bad parameter >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 401: >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 404: >+ description: Ressource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 409: >+ description: Conflict in creating resource >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 413: >+ description: Payload too large >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+"/preservation/trains/{train_id}/items/{train_item_id}": >+ put: >+ x-mojo-to: Preservation::Trains#update_item >+ operationId: updateItemFromTrain >+ tags: >+ - preservation_train >+ summary: Update item from train >+ consumes: >+ - application/json >+ produces: >+ - application/json >+ parameters: >+ - $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" >+ - $ref: "../swagger.yaml#/parameters/preservation_train_item_id_pp" >+ - description: An item >+ in: body >+ name: body >+ required: true >+ schema: >+ type: object >+ - name: x-koha-embed >+ in: header >+ required: false >+ description: Embed list sent as a request header >+ type: array >+ items: >+ type: string >+ enum: >+ - attributes >+ collectionFormat: csv >+ responses: >+ 200: >+ description: A successfully updated item >+ schema: >+ type: object >+ 400: >+ description: Bad parameter >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 404: >+ description: Ressource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 409: >+ description: Conflict in updating resource >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 413: >+ description: Payload too large >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+ delete: >+ x-mojo-to: Preservation::Trains#remove_item >+ operationId: removeItemFromTrain >+ tags: >+ - preservation_train >+ summary: Remove item from train >+ parameters: >+ - $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" >+ - $ref: "../swagger.yaml#/parameters/preservation_train_item_id_pp" >+ produces: >+ - application/json >+ responses: >+ "204": >+ description: Item removed >+ "400": >+ description: Item removal failed >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "401": >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "403": >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "404": >+ description: Item not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "500": >+ description: | >+ Internal server error. Possible `error_code` attribute values: >+ >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "503": >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+ get: >+ x-mojo-to: Preservation::Trains#get_item >+ operationId: getItemFromPreservationTrains >+ tags: >+ - preservation_train >+ summary: Get item from train >+ produces: >+ - application/json >+ parameters: >+ - $ref: "../swagger.yaml#/parameters/preservation_train_id_pp" >+ - $ref: "../swagger.yaml#/parameters/preservation_train_item_id_pp" >+ - name: x-koha-embed >+ in: header >+ required: false >+ description: Embed list sent as a request header >+ type: array >+ items: >+ type: string >+ enum: >+ - attributes >+ - catalogue_item >+ - catalogue_item.biblio >+ collectionFormat: csv >+ responses: >+ 200: >+ description: An item in train >+ schema: >+ type: object >+ 401: >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 404: >+ description: Ressource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >diff --git a/api/v1/swagger/paths/preservation_waiting_list.yaml b/api/v1/swagger/paths/preservation_waiting_list.yaml >new file mode 100644 >index 00000000000..22913cfa538 >--- /dev/null >+++ b/api/v1/swagger/paths/preservation_waiting_list.yaml >@@ -0,0 +1,188 @@ >+--- >+/preservation/waiting-list/items: >+ get: >+ x-mojo-to: Preservation::WaitingList#list >+ operationId: listItemsFromWaitingList >+ tags: >+ - waiting_list >+ summary: List items from waiting list >+ parameters: >+ - name: external_id >+ in: query >+ description: Search on the item's barcode >+ required: false >+ type: string >+ - name: x-koha-embed >+ in: header >+ required: false >+ description: Embed list sent as a request header >+ type: array >+ items: >+ type: string >+ enum: >+ - biblio >+ collectionFormat: csv >+ - $ref: "../swagger.yaml#/parameters/match" >+ - $ref: "../swagger.yaml#/parameters/order_by" >+ - $ref: "../swagger.yaml#/parameters/page" >+ - $ref: "../swagger.yaml#/parameters/per_page" >+ - $ref: "../swagger.yaml#/parameters/q_param" >+ - $ref: "../swagger.yaml#/parameters/q_body" >+ - $ref: "../swagger.yaml#/parameters/q_header" >+ - $ref: "../swagger.yaml#/parameters/request_id_header" >+ consumes: >+ - application/json >+ produces: >+ - application/json >+ responses: >+ "200": >+ description: A list of item >+ schema: >+ type: array >+ items: >+ $ref: "../swagger.yaml#/definitions/item" >+ "400": >+ description: Bad parameter >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "401": >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "403": >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "500": >+ description: | >+ Internal server error. Possible `error_code` attribute values: >+ >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "503": >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+ post: >+ x-mojo-to: Preservation::WaitingList#add_items >+ operationId: addItemsToWaitingList >+ tags: >+ - waiting_list >+ summary: Add items to waiting list >+ consumes: >+ - application/json >+ produces: >+ - application/json >+ parameters: >+ - description: A list of itemnumbers or barcodes >+ in: body >+ name: body >+ required: true >+ schema: >+ type: array >+ items: >+ type: object >+ responses: >+ 201: >+ description: A successfully added list of items >+ schema: >+ type: array >+ items: >+ type: object >+ 400: >+ description: Bad parameter >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 401: >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 404: >+ description: Ressource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 409: >+ description: Conflict in creating resource >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 413: >+ description: Payload too large >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >+/preservation/waiting-list/items/{item_id}: >+ delete: >+ x-mojo-to: Preservation::WaitingList#remove_item >+ operationId: removeItemFromWaitingList >+ tags: >+ - waiting_list >+ summary: Remove item from waiting list >+ parameters: >+ - $ref: "../swagger.yaml#/parameters/item_id_pp" >+ produces: >+ - application/json >+ responses: >+ "204": >+ description: Item removed >+ "400": >+ description: Item removal failed >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "401": >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "403": >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "404": >+ description: Item not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "500": >+ description: | >+ Internal server error. Possible `error_code` attribute values: >+ >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "503": >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ preservation: 1 >diff --git a/api/v1/swagger/swagger.yaml b/api/v1/swagger/swagger.yaml >index 48d8b5af628..2805e198bf3 100644 >--- a/api/v1/swagger/swagger.yaml >+++ b/api/v1/swagger/swagger.yaml >@@ -90,6 +90,10 @@ definitions: > $ref: ./definitions/patron_balance.yaml > patron_extended_attribute: > $ref: ./definitions/patron_extended_attribute.yaml >+ preservation_train: >+ $ref: ./definitions/preservation_train.yaml >+ preservation_processing: >+ $ref: ./definitions/preservation_processing.yaml > quote: > $ref: ./definitions/quote.yaml > renewal: >@@ -317,6 +321,22 @@ paths: > $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password" > "/patrons/{patron_id}/password/expiration_date": > $ref: "./paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password~1expiration_date" >+ /preservation/trains: >+ $ref: ./paths/preservation_trains.yaml#/~1preservation~1trains >+ "/preservation/trains/{train_id}": >+ $ref: "./paths/preservation_trains.yaml#/~1preservation~1trains~1{train_id}" >+ "/preservation/trains/{train_id}/items": >+ $ref: "./paths/preservation_trains.yaml#/~1preservation~1trains~1{train_id}~1items" >+ "/preservation/trains/{train_id}/items/{train_item_id}": >+ $ref: "./paths/preservation_trains.yaml#/~1preservation~1trains~1{train_id}~1items~1{train_item_id}" >+ /preservation/processings: >+ $ref: ./paths/preservation_processings.yaml#/~1preservation~1processings >+ "/preservation/processings/{processing_id}": >+ $ref: "./paths/preservation_processings.yaml#/~1preservation~1processings~1{processing_id}" >+ /preservation/waiting-list/items: >+ $ref: ./paths/preservation_waiting_list.yaml#/~1preservation~1waiting-list~1items >+ "/preservation/waiting-list/items/{item_id}": >+ $ref: "./paths/preservation_waiting_list.yaml#/~1preservation~1waiting-list~1items~1{item_id}" > "/public/biblios/{biblio_id}": > $ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}" > "/public/checkouts/availability": >@@ -611,6 +631,24 @@ parameters: > name: _per_page > required: false > type: integer >+ preservation_processing_id_pp: >+ description: processing internal identifier >+ in: path >+ name: processing_id >+ required: true >+ type: integer >+ preservation_train_id_pp: >+ description: train internal identifier >+ in: path >+ name: train_id >+ required: true >+ type: integer >+ preservation_train_item_id_pp: >+ description: train item internal identifier >+ in: path >+ name: train_item_id >+ required: true >+ type: integer > q_body: > description: Query filter sent through request"s body > in: body >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30708
:
134715
|
134716
|
134732
|
134733
|
134734
|
134736
|
134737
|
134738
|
134782
|
134783
|
134784
|
134785
|
152939
|
152940
|
152941
|
152942
|
152943
|
152944
|
152945
|
152946
|
152947
|
152948
|
152949
|
152950
|
152951
|
152952
|
152953
|
152954
|
152955
|
152956
|
152957
|
152958
|
152959
|
152960
|
152961
|
152962
|
152963
|
152964
|
152965
|
152966
|
152967
|
152968
|
152969
|
152970
|
153102
|
153576
|
154167
|
154168
|
154169
|
154170
|
154171
|
154172
|
154173
|
154174
|
154175
|
154176
|
154177
|
154178
|
154179
|
154180
|
154181
|
154182
|
154183
|
154184
|
154185
|
154186
|
154187
|
154188
|
154189
|
154190
|
154191
|
154192
|
154193
|
154194
|
154195
|
154196
|
154197
|
154198
|
154199
|
154200
|
154201
|
154202
|
154203
|
156592
|
156596
|
156597
|
156636
|
156637
|
156638
|
156639
|
156640
|
156641
|
156642
|
156643
|
156644
|
156645
|
156646
|
156647
|
156648
|
156649
|
156650
|
156651
|
156652
|
156653
|
156654
|
156655
|
156656
|
156657
|
156658
|
156659
|
156660
|
156661
|
156662
|
156663
|
156664
|
156665
|
156666
|
156667
|
156668
|
156669
|
156670
|
156671
|
156672
|
156673
|
156674
|
156675
|
157502
|
157503
|
157506
|
157508
|
157512
|
157514
|
157557