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

Create endpoint to query AOI by name #39

Closed
lbross opened this issue Dec 14, 2015 · 4 comments
Closed

Create endpoint to query AOI by name #39

lbross opened this issue Dec 14, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@lbross
Copy link

lbross commented Dec 14, 2015

This is for the subaoi functionality: PSU-CSAR/vb-bagis-h#4. The desktop client will look at the parent folder where it can extract the AOI name and needs to be able to query the database by name to see if the parent has been uploaded.

Alternatively, if there is metadata for the parent, the UID may be able to be extracted from there. If the metadata is missing, we know the parent hasn't been uploaded. The metadata is not currently well-defined so unsure if this is the better option.

@jkeifer jkeifer self-assigned this Dec 14, 2015
@jkeifer
Copy link
Member

jkeifer commented Dec 14, 2015

This functionality will be implemented as a part of issue #26, such that the AOI list endpoint should take URL parameters, one of which could be name, allowing it to be searchable via AOI name.

However, I do think the metadata options should be preferred, and if the file is not present then the client should either look in the DB for the parent by name, or allow the user to enter in the parent AOI to use (not sure how that would work though for best user experience).

@lbross
Copy link
Author

lbross commented Dec 14, 2015

It may be unnecessary to leave this issue open as a separate issue. Should I update issue #26 indicating that 'name' is a desired URL parameter?

I am working the client-side process under another issue: PSU-CSAR/vb-bagis-h#4. I will update that issue with our idea to look for the metadata for the parent AOI UID before querying the database. I believe this issue also includes Jarrett's thoughts on uploading parent and sub aoi's at the approximately the same time when a sub aoi is selected whose parent aoi is not in the db..

@jkeifer
Copy link
Member

jkeifer commented Dec 14, 2015

Either way is fine, but I'm of the opinion we should just keep this one open so we make sure that this feature gets covered.

@jkeifer jkeifer modified the milestone: First release Mar 17, 2016
@jkeifer
Copy link
Member

jkeifer commented Apr 11, 2016

This is now easy using the search url parameter. Example:

/api/rest/aois/?search=teton will search the name and shortname fields for an icontains match.

For exact matches, you can use the filtering parameters:

/api/rest/aois/?name=Teton_AOI will only match an AOI of with the name Teton_AOI.

This is deployed on the beta test.

@jkeifer jkeifer closed this as completed Apr 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants