HumanBrainProject / hbp-validation-framework

Apache License 2.0
5 stars 12 forks source link

Allow filter by collab_id #245

Closed appukuttan-shailesh closed 5 years ago

appukuttan-shailesh commented 5 years ago

Many of the API calls allow filter by app_id. It is equally (or more) important to have the same filter using collab_id.

Partly necessary because a model catalog app instance could be deleted from a particular collab and replaced with another instance. The app IDs would vary in this case, but the collab IDs would remain the same thus making the models easily retrievable.

@apdavison : Is this doable along with the API fixes you are doing at the moment?

apdavison commented 5 years ago

In fact in the KG-based API I'm not currently storing the app_id, only the collab_id. Is there a use case where you need to filter by app_id and not by collab_id?

appukuttan-shailesh commented 5 years ago

Not really.... in fact the concept of app_id seems to make things confusing for users (who already have to deal with collab_id). So I am happy to have it taken away completely.

apdavison commented 5 years ago

you should now be able to filter models by collab_id on the staging server.

For which other API endpoints is filtering by collab id needed?

appukuttan-shailesh commented 5 years ago

register_model(), edit_model(), list_models() are the only python client methods requiring app_id. Amongst them, only list_models() used it as a filter.

apdavison commented 5 years ago

ok, please let me know if filtering by collab id works, I haven't tested it.

appukuttan-shailesh commented 5 years ago

Filtering by collab_id isn't working for me. I tried mc.list_models(collab_id=343) and mc.list_models(collab_id="343") Both returned 0 elements.

There is atleast one matching entry: https://collab.humanbrainproject.eu/#/collab/8609/nav/407995?state=model.21d03065-38e6-4720-bec6-dec4bdaff812

apdavison commented 5 years ago

fixed the filtering by collab_id

appukuttan-shailesh commented 5 years ago

It works :+1: