Skip to content

Problem: get package metadata endpoint needs pagination #389

Open
@jrwdunham

Description

@jrwdunham

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions