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

Add a feature to list all uploaded datasets #628

Closed
filippocastelli opened this issue Mar 4, 2022 · 4 comments · Fixed by #763
Closed

Add a feature to list all uploaded datasets #628

filippocastelli opened this issue Mar 4, 2022 · 4 comments · Fixed by #763
Assignees

Comments

@filippocastelli
Copy link

It would be nice to have a simple API call to list all available datasets.
At the moment I use the /datasets API endpoint and it works well, but it would be a nice feature to add to the webknossos python package.

import requests
import pandas as pd

session = requests.session()
headers = {"X-Auth-Token": <webknossos_API_token>}
base_url = "http://webknossos/api"
resp = session.get(base_url + "/datasets", headers=headers)
df = pd.DataFrame(resp.json())
df = df[df.owningOrganization == <organization_id>]
@hotzenklotz
Copy link
Member

Thanks for the suggestion. Could you elaborate a bit? What would be your use case for that?

@filippocastelli
Copy link
Author

Thank you for the instant reply.
I'm automating the upload of multiple datasets, before uploading I want to make sure that I didn't already upload a specific dataset or that a previous upload didn't fail.

@filippocastelli
Copy link
Author

Also I have another problem that I can't seem to solve reliably about changing the allowed teams on a dataset from API.
should I open a separate github issue for that ? / Should it be under the webknossos repo instead of webknossos-libs?

@jstriebel
Copy link
Contributor

jstriebel commented Mar 4, 2022

Also I have another problem that I can't seem to solve reliably about changing the allowed teams on a dataset from API.

That's a great suggestion 👍

should I open a separate github issue for that ? / Should it be under the webknossos repo instead of webknossos-libs?

Yes, that would be great. Here in the webknossos-libs repo is perfect. Thank's a lot for your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants