Uploaded image for project: 'mod-kb-ebsco-java'
  1. mod-kb-ebsco-java
  2. MODKBEKBJ-385

Implement endpoint to bulk load resources records

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      eHoldings Sprint 84
    • Story Points:
      3
    • Development Team:
      Spitfire

      Description

      Implement a POST /eholdings/resources/bulk-fetch endpoint to mod-kb-ebsco-java module to retrieve information about resources.

      in POST body back-end expects to retrieve a list with ids in the following format or similar to

      {
        "resources": ["12-123-234", ... , "34-344-56789"]
      }
      

      and in responce user will have to get a list of loaded entities and not loaded entities. As example

      {
        "included": [
          {
            "id": "22-1887786-1440285",
            "type": "resources",
            "attributes": {
              "description": null,
              "edition": null,
              "isPeerReviewed": false,
              "isTitleCustom": false,
              "publisherName": "Elsevier",
              "titleId": 1440285,
              "contributors": [
                {
                  "type": "Author",
                  "contributor": "Havard, Margaret"
                },
                {
                  "type": "Author",
                  "contributor": "Tiziani, Adriana."
                }
              ],
              "identifiers": [
                {
                  "id": "1440285",
                  "type": "BHM",
                  "subtype": "Empty"
                },
                {
                  "id": "475765",
                  "type": "EPBookID",
                  "subtype": "Empty"
                },
                {
                  "id": "978-0-7295-3913-5",
                  "type": "ISBN",
                  "subtype": "Print"
                },
                {
                  "id": "978-0-7295-7913-1",
                  "type": "ISBN",
                  "subtype": "Online"
                }
              ],
              "name": "Havard's Nursing Guide to Drugs (Nursing Guide to Drugs)",
              "publicationType": "Book",
              "subjects": [
                {
                  "type": "BISAC",
                  "subject": "MEDICAL / Nursing / Pharmacology"
                }
              ],
              "coverageStatement": "Only 2000s issues available.",
              "customEmbargoPeriod": {
                "embargoUnit": "Days",
                "embargoValue": 7
              },
              "isPackageCustom": false,
              "isSelected": true,
              "isTokenNeeded": true,
              "locationId": 17545807,
              "managedEmbargoPeriod": {
                "embargoUnit": null,
                "embargoValue": 0
              },
              "packageId": "22-1887786",
              "packageName": "ProQuest Ebook Central",
              "url": "https://ebookcentral.proquest.com/lib/[[SiteID]]/detail.action?docID=1722033",
              "providerId": 22,
              "providerName": "Proquest Info & Learning Co",
              "visibilityData": {
                "isHidden": true,
                "reason": ""
              },
              "managedCoverages": [
                {
                  "beginCoverage": "2010-01-01",
                  "endCoverage": "2010-12-31"
                }
              ],
              "customCoverages": [
                {
                  "beginCoverage": "2003-01-01",
                  "endCoverage": "2004-01-01"
                }
              ],
              "proxy": {
                "id": "EZProxy",
                "inherited": false
              }
            },
            "relationships": {
              "provider": {
                "data": {
                  "type": "providers",
                  "id": "22"
                }
              },
              "title": {
                "meta": {
                  "included": false
                }
              },
              "package": {
                "meta": {
                  "included": false
                }
              }
            }
          },
          ...,
          {
            ...
          }
        ],
        "meta": {
          "failed": {
            "resources": ["1-12-345", ... , "1-13-678"]
          }
        },
        "jsonapi": {
          "version": "1.0"
        }
      }
      

      the mod-agreements are only interested in a few attributes, so the schema for this endpoint can be simplified.

      Note: see additional information on Confluence page

      Acceptance Criteria:
      Unit tests
      Api tests

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Natalia Zaitseva Natalia Zaitseva
                Reporter:
                Natalia Zaitseva Natalia Zaitseva
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases