Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filemanager: consider making the attribute API more user-friendly #462

Closed
mmalenic opened this issue Aug 9, 2024 · 0 comments · Fixed by #492
Closed

filemanager: consider making the attribute API more user-friendly #462

mmalenic opened this issue Aug 9, 2024 · 0 comments · Fixed by #492
Assignees
Labels
feature New feature filemanager an issue relating to the filemanager

Comments

@mmalenic
Copy link
Member

mmalenic commented Aug 9, 2024

The attribute API uses square brackets for access, which is less ideal because they have to be percent-encoded in the URL. It might be better allow top-level JSON fields to just be accessed directly from the API, instead of nesting them.

E.g, instead of:
/api/v1/s3_objects?attributes[portal_run_id]=...

It could be:
/api/v1/s3_objects?portal_run_id=...

Similarly, the JSON patch request does not need to have the outer attributes field, as it's clear that only attributes can be patched.

E.g. instead of:

{
    "attributes": [ { "op": "add", "path": "/attribute_id", "value": "attribute_id" } ]
}

It could just be:

[ { "op": "add", "path": "/attribute_id", "value": "attribute_id" } ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature filemanager an issue relating to the filemanager
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant