Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: get package metadata endpoint needs pagination #389

Open
jrwdunham opened this issue Jun 29, 2018 · 0 comments
Open

Problem: get package metadata endpoint needs pagination #389

jrwdunham opened this issue Jun 29, 2018 · 0 comments
Assignees

Comments

@jrwdunham
Copy link
Contributor

jrwdunham commented Jun 29, 2018

A request of the form GET /api/v2/file/metadata/ will load all of the File model instances belonging to a package into memory and serialize the resulting list to JSON and return that JSON in the response. For large AIPs this will inevitably cause timeouts for clients. This "metadata" (array of File objects) should be paginated.

Better yet, it should be accomplished by filtering for the SIP using a search-enabled files/ (over the true "File" model/resource) endpoint that has pagination built in, cf. https://github.com/artefactual/archivematica-storage-service/blob/2c4f950780f06caf231d1e2a9a3b97ff9c887f61/storage_service/locations/api/beta/__init__.py

Connected to #369

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant