Uploaded image for project: 'mod-rtac'
  1. mod-rtac
  2. MODRTAC-51

POST rtac-batch API - instances with empty holdings should not be included in response

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Template:
      Standard Bug Write-Up Format
    • Development Team:
      Prokopovych

      Description

      Overview:
      After talking to Khalilah and Dymtro, valid behavior is instances without any holdings should not be included in the response. This will help in improving performance as Response payload size significantly reduces for a large number of instances with a large number of empty holdings.

      Steps to Reproduce:
      Request:

      ▶ curl -i POST 'https://okapi-pre-honeysuckle-cap1.int.aws.folio.org/rtac-batch' \
      --header 'x-okapi-tenant: fs09000000' \
      --header 'x-okapi-token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJmb2xpbyIsInVzZXJfaWQiOiI5ZWI2NzMwMS02ZjZlLTQ2OGYtOWIxYS02MTM0ZGMzOWE2ODQiLCJpYXQiOjE2MDMzODE3MjQsInRlbmFudCI6ImZzMDkwMDAwMDAifQ.Zp3WbtiXzWbkZQBVuupnakHiQqwk3PK3pP0Liu_5YGI' \
      --header 'Content-Type: application/json' \
      --data-raw '{
        "instanceIds": [
                  "00020880-4d98-4875-94ef-bf2004ab67d8", "00b3bf8f-24d7-4178-8ceb-ec27c3ee039f"                                                                              
        ]
      }'
      

      Response:

      curl: (6) Could not resolve host: POST
      HTTP/2 200 
      date: Thu, 22 Oct 2020 15:52:55 GMT
      content-type: application/json
      server: nginx/1.10.3
      vary: origin
      x-okapi-trace: POST mod-authtoken-2.5.1 http://pvt.lb.bhs1.folio-eis.us-east-1:8051/mod-authtoken/rtac-batch : 202 47878us
      x-okapi-trace: POST mod-rtac-2.0.0 http://pvt.lb.bhs1.folio-eis.us-east-1:8051/mod-rtac/rtac-batch : 200 125125us
      
      {
        "holdings" : [ {
          "instanceId" : "00020880-4d98-4875-94ef-bf2004ab67d8",
          "holdings" : [ ]
        }, {
          "instanceId" : "00b3bf8f-24d7-4178-8ceb-ec27c3ee039f",
          "holdings" : [ ]
        } ]
      }%  
      
      1. Log into some FOLIO environment as User X
        Use pre-honeysuckle env from PTF. Login as folio user

      Expected Results:
      Omit instances with empty holdings in the response body

      Actual Results:
      All instances with and without holdings are returned in response body

      Interested parties:
      All consumers of edge-* and mod-rtac

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                kgambrell Khalilah Gambrell
                Reporter:
                varunjavalkar Varun Javalkar
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:

                    TestRail: Runs

                      TestRail: Cases