Open tloubrieu-jpl opened 7 months ago
I can now see value of including the default core entry fields along with specifically requested fields, in some cases. Is it worth considering a flag, switch, parameter, etc, that indicates to include the primary identifying entry values along with specifically requested fields? Something like primaryFields, identifierField, default fields... We do something like this with the ODE API.
I like the way our OpenSearch EN Cluster was operating, in that if you don't specify which fields to return, every field is returned by default.
I was surprised when I had provided a fields
param to our Search API and I was getting back more fields than I had specifically asked for. I think this is a detriment for app developers who want to optimize their queries for performance.
To keep it simple and give developers granular control and not add too much complexity to our Search API, I think an API calls should return everything by default, or only those fields provided by the fields
param.
Checked for duplicates
Yes - I've already checked
π§βπ¬ User Persona(s)
Data user
πͺ Motivation
...so that I am not confused by the behavior of the
fields
parameter when I use the default response formatapplication/json
.π Additional Details
In following request, for example:
The
properties
structure of the response current contains:Now we only want:
The other fields comes from the defaults json structure where these values are needed (start time, title...). We don't wnat to see them anymore not to confuse the user.
Same applies to the
summary.properties
part of the response.Acceptance Criteria
Given an API server When I perform a request with a
fields
parameter and a the default response formatapplication/json
Then I expect to only see the requested field in theproperties
substructures.βοΈ Engineering Details
No response