WIPACrepo / file_catalog

Store file metadata information in a file catalog
MIT License
1 stars 4 forks source link

Add 'all-keys' REST Query Parameter #74

Closed ric-evans closed 3 years ago

ric-evans commented 3 years ago

I've added an "all-keys" REST query parameter which essentially overrides "keys" by returning the FC files with their entire metadata. This new parameter is intended to be a bool/flag. All enhancements are backwards compatible and tested.

This has several advantages:

  1. Performance is increased considerably when querying /api/files versus multiple queries to api/file/<uuid>
  2. This doesn't require the REST client/user to know what fields are available. That's useful since the file metadata schema varies among file types.
  3. Individual REST routes can maintain their default keys when no "keys" parameter is included. Eg: api/file/<uuid> provides "logical_name" and "uuid" by default.

Notes: