Bug #18122

Support 'select' on 'get', 'update', and 'delete' calls to limit what fields are returned in update response

Added by Peter Amstutz 7 days ago. Updated 4 days ago.

Status:
In Progress
Priority:
Normal
Assigned To:
Category:
API
Target version:
Start date:
09/16/2021
Due date:
% Done:

0%

Estimated time:
(Total: 0.00 h)
Story points:
-

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.


Subtasks

Task #18154: Review 18122-select-paramIn ProgressTom Clegg

History

#1 Updated by Peter Amstutz 7 days ago

  • Description updated (diff)
  • 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

#2 Updated by Lucas Di Pentima 7 days 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?

#3 Updated by Peter Amstutz 6 days ago

  • Description updated (diff)

#4 Updated by Peter Amstutz 6 days ago

  • Target version set to 2021-09-29 sprint

#5 Updated by Peter Amstutz 6 days ago

  • Description updated (diff)

#6 Updated by Peter Amstutz 5 days ago

  • Assigned To set to Tom Clegg

#7 Updated by Tom Clegg 4 days ago

  • Status changed from New to In Progress

#8 Updated by Tom Clegg 4 days ago

18122-select-param @ 5d7bef4122c59bec9145f2853b76170b4ddca67f -- https://ci.arvados.org/view/Developer/job/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).

#10 Updated by Lucas Di Pentima 4 days 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)

Also available in: Atom PDF