Bug #18122
closedSupport 'select' on 'get', 'update', and 'delete' calls to limit what fields are returned in update response
100%
Description
'get', 'update' and 'delete' calls respond with the entire record. Sometimes this is undesirable, such as collections with very large manifest text. The API should support using 'select' to choose which fields are returned by the response.
"make sure you start with a test, but this might already work"
needs to be added to the discovery document.
check that selecting fields ensures the fields are not loaded from the database.
Updated by Peter Amstutz over 3 years ago
- Subject changed from Support 'select' on update calls to limit what fields are returned in update response to Support 'select' on 'get', 'update', and 'delete' calls to limit what fields are returned in update response
- Description updated (diff)
Updated by Lucas Di Pentima over 3 years ago
For the 'get' case, would it be useful to have a 'deselect' param so that we don't need to update clients (e.g., wb2) when new fields are added to collections while avoiding getting the manifest_text
included in the response?
Updated by Peter Amstutz over 3 years ago
- Target version set to 2021-09-29 sprint
Updated by Tom Clegg over 3 years ago
18122-select-param @ 5d7bef4122c59bec9145f2853b76170b4ddca67f -- developer-run-tests: #2692
Confirmed that only the selected columns are loaded from the database (except in the case of "update", which needs to populate all attributes in order to do validations).
Updated by Tom Clegg over 3 years ago
18122-select-param @ 7563e6276baade41eb3faa3ff167abab1cb0f890 -- developer-run-tests: #2694
Updated by Lucas Di Pentima over 3 years ago
Here're my comments/questions:
- In file
services/api/app/controllers/application_controller.rb
: In the_requires_parameters
methods, should descriptions be added for the automatic cli help? - Word repetition in file
doc/api/methods.html.textile.liquid:L87
: "...whose whose..." - Do you think it would be helpful to document the particular behavior when requesting a collection by PDH? (i.e., we can use
select
to "deselect"manifest_text
)
Updated by Tom Clegg over 3 years ago
Lucas Di Pentima wrote:
- In file
services/api/app/controllers/application_controller.rb
: In the_requires_parameters
methods, should descriptions be added for the automatic cli help?
Good point, added
- Word repetition in file
doc/api/methods.html.textile.liquid:L87
: "...whose whose..."
Fixed, thanks
- Do you think it would be helpful to document the particular behavior when requesting a collection by PDH? (i.e., we can use
select
to "deselect"manifest_text
)
Updated the relevant part of the api/methods/collections page -- is this better?
18122-select-param @ bc146037e1aa617739c0a3859727066c9304829a -- developer-run-tests: #2696
Updated by Tom Clegg over 3 years ago
- Status changed from In Progress to Resolved
Applied in changeset arvados-private:commit:arvados|c8bf4dc1eef2a73b4b01501eabdc922e2a27a276.
Updated by Tom Clegg about 3 years ago
- Related to Feature #18215: Use 'select' on collection updates to avoid returning manifest_text added