Project

General

Profile

Actions

Bug #15938

open

[API] requesting collections via POST with _method=GET returns one result

Added by Lucas Di Pentima over 4 years ago. Updated 2 months ago.

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

Description

While working on #15672, I realized that WB2 when asking for favorite objects uses POST with _method=GET because to overcome some cases when there's a lot of filter data.

When doing this to fetch favorite collections, the result it gets from the API server isn't a resource list but a single (and seemingly random) collection object. The other kinds of objects work fine: links, container requests, etc.

I've been able to get a minimal test case using curl against my local arvbox, removing all the filtering the problem keeps happening:

$ curl 'https://192.168.1.125:8000/arvados/v1/collections' -H 'Authorization: Bearer <arvados_token>' -H 'Content-Type: multipart/form-data' --data-binary $'Content-Disposition: form-data; name="_method"\r\n\r\nGET\r\n'

...which results in:

{"created_at":"2019-12-17T14:04:47.628389607Z","delete_at":null,"etag":"9whksbxjumb7wzsrxn7kygal7","is_trashed":false,"kind":"arvados#collection","manifest_text":"","modified_at":"2019-12-17T14:04:47.628648000Z","modified_by_client_uuid":"xzky2-ozdt8-bz5croxbsshueoi","modified_by_user_uuid":"xzky2-tpzed-x8ebto05d30uwzv","name":"","owner_uuid":"xzky2-tpzed-x8ebto05d30uwzv","portable_data_hash":"d41d8cd98f00b204e9800998ecf8427e+0","properties":{},"replication_confirmed":null,"replication_confirmed_at":null,"replication_desired":null,"storage_classes_confirmed":[],"storage_classes_confirmed_at":"0001-01-01T00:00:00.000000000Z","storage_classes_desired":["default"],"trash_at":null,"unsigned_manifest_text":"","uuid":"xzky2-4zz18-4fv6i2lo4c0r8xv"}
Actions

Also available in: Atom PDF