Uploaded image for project: 'Templates'
  1. Templates
  2. TEMP-11

Bulk API Create/Update Template

    XMLWordPrintable

Issue Templates Details

    Details

      • None

      Description

        Purpose/Overview:

        In order to facilitate efficient and timely data migration functionality, the <MODULE> needs the ability to Create and Update <record type> in bulk, rather than processing records individually.

        For adding and updating a list of records RMB already provides the PgUtil.postSync method that all modules can use: https://github.com/folio-org/raml-module-builder/blob/v31.1.0/domain-models-runtime/src/main/java/org/folio/rest/persist/PgUtil.java

        Requirements:

        • Users shall be able to POST a JSON object with an array of multiple <record type> records to a single endpoint.
        • Individual records shall be assumed to be valid, and shall not be subject to individual record business logic
        • Records shall be committed to the database in a single transaction
        • Should the operation fail due to an error in an individual record, an error message shall be returned that alerts the user where to look in the record set to find the problem.
        • On success, the endpoint shall return a JSON object with the counts for number of records created and number of records updated.

        Desired functionality:

        • User provided metadata and id values shall be preferred; if absent, then system-provided values may be calculated. This is current blocked for metadata values, which always overwrite user-provided data.

        Attachments

          Activity

            Issue Templates

              Issue Templates Variables

                People

                  sergiy.vysotskiy Sergiy Vysotskiy
                  sekjal Ian Walls
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                    Created:
                    Updated: