hydroshare / hs_restclient

Python client for the https://www.hydroshare.org REST API
BSD 3-Clause "New" or "Revised" License
6 stars 8 forks source link

rest api enhancements for composite resource type #110

Open zhiyuli opened 5 years ago

zhiyuli commented 5 years ago

@sblack-usu @martinseul I list feature requirements from apps' perspective. Feel free to split and/or move them to hydroshare repo if needed. Also, this might be a running list. Thanks

1) retrieve all metadata for a given aggregation: currently FilesSubEndpoint.metadata(self, file_path, params=None) only returns core metadata without file-type specific metadata

2) filtering based on aggregation metadata: return a list of all aggregations from all accessible composite resources that meet certain criteria, such as return all geographic feature aggregations whose Geometry Type is POLYGON and Feature Count ==1

3) download all files for an aggregation: download a specific geographic feature aggregation from a composite resource

zhiyuli commented 5 years ago

@danames @kjlippold please review and add your comments/requests when you get a chance

kjlippold commented 5 years ago

Here's a few other things I'd like to see, if there isn't already some way of doing them.

  1. Include a list of aggregation types present in the resource in a get resource request, like what appears under "content types" on the resource landing page.

  2. This is related to Drew's second point, but the ability to get a list of all resources containing specified aggregation types. (Different than getting a list of aggregations).

  3. Ability to list all aggregations in a given resource.

  4. Ability to create, edit, and delete aggregations in a given resource, beyond just automatically creating them when files are uploaded.

  5. There should probably be a way to get a list of aggregation types, similar to how there's a way to get a list of resource types.

kjlippold commented 5 years ago

I think a lot of these features need to be added to HydroShare's rest api before they can be added to the rest client.

sblack-usu commented 5 years ago

ok, I'm seeing basically two categories to these requests: Discovery Resource Actions

Most of the work here needs to be done on the rest api in hydroshare. I'll work on the Resoruce actions withing https://github.com/hydroshare/hydroshare/issues/2575. Once I wrap that up, I'll create an issue for discover. I'd like to setup a rest api endpoint that just routes to @alvacouch's discover, where most of these requests are already implemented or should be implemented there.