nasa-pds-engineering-node / pds-registry-app

(deprecated) See https://github.com/NASA-PDS/registry for new and improved capability.
https://nasa-pds.github.io/registry/
Other
1 stars 1 forks source link

As an API user I want to limit the fields returned at the top level #206

Closed mdrum closed 2 years ago

mdrum commented 2 years ago

💪 Motivation

It would be nice to be able to limit all of the fields returned by the API responses, not just items in the "properties" section, in order to reduce network traffic and/or processing time

📖 Additional Details

The API endpoints have a parameter named "fields", which allows you to specify "returned fields". I initially interpreted this as a way to filter the API response on only the keywords I cared about. In reality, the apparent function of this parameter is to filter the items that come back within the "properties" field for each returned document. This is an important feature, but does not completely address the desire for a user to be able to reduce the network response to an API call. For example, if I wanted to query all products within a bundle in order to determine their start/stop times but did not care about the observing system components, I would expect to be able to remove that part of the API response with this field.

⚖️ Acceptance Criteria

I would love if there was some way to filter on those top-level fields returned for each matched document in an API response. This would probably need to be a different parameter; perhaps "fields" could be used for this function, and "properties" be added to address its former function.

⚙️ Engineering Details

jordanpadams commented 2 years ago

@mdrum for sure. That is a requirement in our queue for the API for this build: https://github.com/NASA-PDS/registry-api/issues/444

jordanpadams commented 2 years ago

Duplicate of https://github.com/NASA-PDS/registry-api/issues/444