Project

General

Profile

Actions

Bug #18122

closed

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

Added by Peter Amstutz over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Story points:
-
Release relationship:
Auto

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 1 (0 open1 closed)

Task #18154: Review 18122-select-paramResolvedTom Clegg09/16/2021Actions

Related issues

Related to Arvados Workbench 2 - Feature #18215: Use 'select' on collection updates to avoid returning manifest_textResolvedLucas Di Pentima11/16/2021Actions
Actions #1

Updated by Peter Amstutz over 2 years 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
Actions #2

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

Actions #3

Updated by Peter Amstutz over 2 years ago

  • Description updated (diff)
Actions #4

Updated by Peter Amstutz over 2 years ago

  • Target version set to 2021-09-29 sprint
Actions #5

Updated by Peter Amstutz over 2 years ago

  • Description updated (diff)
Actions #6

Updated by Peter Amstutz over 2 years ago

  • Assigned To set to Tom Clegg
Actions #7

Updated by Tom Clegg over 2 years ago

  • Status changed from New to In Progress
Actions #8

Updated by Tom Clegg over 2 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).

Actions #10

Updated by Lucas Di Pentima over 2 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)
Actions #11

Updated by Tom Clegg over 2 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

Actions #12

Updated by Lucas Di Pentima over 2 years ago

Thanks! this LGTM.

Actions #13

Updated by Tom Clegg over 2 years ago

  • Status changed from In Progress to Resolved

Applied in changeset arvados-private:commit:arvados|c8bf4dc1eef2a73b4b01501eabdc922e2a27a276.

Actions #14

Updated by Tom Clegg over 2 years ago

  • Related to Feature #18215: Use 'select' on collection updates to avoid returning manifest_text added
Actions #15

Updated by Peter Amstutz over 2 years ago

  • Release set to 42
Actions

Also available in: Atom PDF