Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3898

Support pagination of bitstreams in REST API's "items" endpoint

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Volunteer Needed (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 7.0
    • Fix Version/s: None
    • Component/s: REST API v7
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      0
    • Documentation Status:
      Not Required

      Description

      Despite claiming so in the REST Contract, the DSpace 7 REST API currently does not paginate the list of embedded bitstreams on the items endpoint. https://github.com/DSpace/Rest7Contract/blob/master/items.md#bitstreams 

      If an Item has a large number of bitstreams (see 6.x related ticket DS-3883), then the Item endpoint currently loads up all the attached bitstreams in the "bitstreams -> _embedded" section.

      The items endpoint response does include a "bitstreams -> page" section, which seems to imply pagination should exist. However, the page "size" is ALWAYS equal to the "totalElements" (which means all bitstreams are loaded on the first page).

      Here's a basic example on the REST API demo site (this Item includes 8 bitstreams)

      https://dspace7.4science.it/dspace-spring-rest/#https://dspace7.4science.it/dspace-spring-rest/api/core/items/9f3288b2-f2ad-454f-9f4c-70325646dcee

      However, this behavior is much more noticeable if you create an item that has 100 or 500 bitstreams (such items are attached to DS-3883, as they were used in fixing that bug in the 6.x XMLUI).  If you have an Item with 500 bitstreams, all 500 bitstreams are embedded in the initial item response. At least on my local machine, an Item with 500 bitstreams takes about 3-4 seconds to return a response.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              tdonohue Tim Donohue
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: