Closed yarikoptic closed 8 months ago
@jjnesbitt @mvandenburgh The "draft" and "user" query parameters to /dandisets/
are underdocumented in Swagger, and I need to document them in the Python API. What exactly do they do? (It appears that draft
controls whether Dandisets without published versions are included, but I'd like to get confirmation.) Also, what exactly does search
search?
@yarikoptic Should the names of the arguments to the get_dandisets()
method match the query parameters? In particular, this endpoint's use of ordering
is inconsistent with the name order
used when fetching versions & assets (which I've previously complained about), so we might want to align all the arguments to order
in the Python API.
I am ok with your judgement on this matter: it seems we would be inconsistent either way. Ideally here or in https://github.com/dandi/dandi-archive/issues/1228#issuecomment-1204338808 we arrive at the target -- e.g. I propose: let's make it order
and aim for it
Ideally in dandi-archive we deprecate ordering
in API should be doable to add order
to replace ordering
but keep ordering
available for backward compatibility to be pruned later.
WDYT @dandi/archive-maintainers ?
Thanks for pointing this out @jwodder, I made a PR on dandi-archive to improve the Swagger descriptions for this endpoint - #1875.
@jjnesbitt @mvandenburgh The "draft" and "user" query parameters to
/dandisets/
are underdocumented in Swagger, and I need to document them in the Python API. What exactly do they do? (It appears thatdraft
controls whether Dandisets without published versions are included, but I'd like to get confirmation.) Also, what exactly doessearch
search?
You are correct about draft
. The user
param is kind of weird, in that it only has one valid value, "me". When set to "me", the endpoint will only return dandisets that the logged in user is an owner of. We should maybe reconsider how that's implemented on the API side. search
does a string search over the json metadata
of every Version
in the system.
order vs ordering is pretty much "equal match" within dandi-archive but in dandi-cli we have only (and many of)
order
Ideally in dandi-archive we deprecateordering
in API should be doable to addorder
to replaceordering
but keepordering
available for backward compatibility to be pruned later.WDYT @dandi/archive-maintainers ?
I agree we should make these consistent.
:rocket: Issue was released in 0.61.0
:rocket:
I thought that as long as I authenticate I would also get embargoed datasets listed, as I believe is done in web UI. But I found no Embargoed dandisets in returned list. Looking at our
get_dandisets
- apparently we do not expose any of the query parameters forImmediate need is to get
embargoed
dandisets. I generally would not mind even adding "search" parameter.