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

Some baseUrls in Queries are defined inconsistently. And will fail when we switch to Api GW #325

Open
qifeng-bai opened this issue Oct 21, 2024 · 2 comments
Assignees
Milestone

Comments

@qifeng-bai
Copy link
Contributor

Screenshot 2024-10-21 at 11 14 10 am
Screenshot 2024-10-21 at 11 12 05 am

The baseUrl of MyAnnotation points to the API/WS base URL: https://api.test.ala.org.au/occurrences

However, the baseUrl of Annotation points to the UI base URL: https://biocache.ala.org.au.
To query the web service, /ws is added to the queryPath: /ws/occurrences/search?fq=user_assertions:*&q=last_assertion_date:[___DATEPARAM___ TO *]&sort=last_assertion_date&dir=desc&pageSize=20&facets=basis_of_record.

This approach worked previously, as there was only one query.

The issue arises when we need to add another query to collect user assertions using baseUrl + assertion query path. In such cases, the Annotation query fails.

Additionally, switching the API endpoint: https://api.ala.org.au/occurrences causes the Annotation's baseUrl to stop working, since '/ws' should not be added into 'queryPath'

@qifeng-bai qifeng-bai changed the title BaseUrls in Queries are defined inconsistently. Some baseUrls in Queries are defined inconsistently. And will fail when we switch to Api GW Oct 21, 2024
@qifeng-bai
Copy link
Contributor Author

qifeng-bai commented Oct 21, 2024

Solution:

Check Annotation query to see if it works with the Api GW
select * from alerts.query where name="Annotations"
check the value of base_url and query_path:
if base_url is like:https://biocache.ala.org.au
and query_path is like: /ws/occurrences/search?fq=user_assertions:*&q=last_assertion_date:[___DATEPARAM___%20TO%20*]&sort=last_assertion_date&dir=desc&pageSize=20&facets=basis_of_record

then they should be changed to:
https://api.ala.org.au/occurrences

/occurrences/search?fq=user_assertions:*&q=last_assertion_date:[___DATEPARAM___%20TO%20*]&sort=last_assertion_date&dir=desc&pageSize=20&facets=basis_of_record

@qifeng-bai qifeng-bai self-assigned this Oct 21, 2024
@qifeng-bai
Copy link
Contributor Author

Also need to check the queries for 'Datasets'
For example, the whole url for Datatset is:
https://collections.ala.org.au/ws/dataResource

It is incorrect in Query

base_url: https://collections.ala.org.au/
query_path: ws/dataResource

It should be:

base_url: https://collections.ala.org.au/ws
query_path: /dataResource

@qifeng-bai qifeng-bai transferred this issue from AtlasOfLivingAustralia/biocache-service Nov 10, 2024
@qifeng-bai qifeng-bai added this to the 4.4.0 milestone Nov 10, 2024
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

No branches or pull requests

1 participant