-
Notifications
You must be signed in to change notification settings - Fork 0
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
Better names for API base URLs? #31
Comments
@bredelings and I chatted a bit on gitter. We were briefly thrown off bc the URLS themselves are not up to date. But the idea of simplifying the base url construction makes some sense... although I'm nut sure splitting them up is necessary, because they are all actually just devapi... and the subdomains are
Even though we use a variety of variables here : https://github.com/OpenTreeOfLife/ot-ansible/blob/development/roles/webapp/templates/curatorful_config.j2 They basically all just get set to api.opentreeoflife.org or devapi.opentreeoflife.org! The one occasion where we do differentiate is on dev in the synth tree viewer, where /studies (otindex) queries should go to production (api.opentreeoflife.org) while everything else (tree of life, taxonomy, I guess) goes to dev. |
Apologies, the URLs listed are old and should be ignored.
Good catch regarding otindex going to production (all its methods? or only some?). And yes, maybe this is all cruft if we're passing all API calls through a common base URL |
A single common API base URL like |
Makes sense to me! The one place I think we use the swap is here, where the "study_index_endpoint" is production, even though everything else is dev.: ot-ansible/group_vars/devtree.yml Line 21 in 2d2e51e
And then we use that substitution here: Even though "study_index_endpoint" doesn't get set in [domains] section of the config. I think even that may muddy the water a bit, because using "https://otindex.opentreeoflife.org" or "https://api.opentreeoflife.org" would have the exact same effects (I think). |
This is already commented nicely in Ansible, and there are already sensible default values set in |
FYI - I'm restoring the odd curation-app URL in the "curatorless" synth-tree viewer in this tiny |
Ah, this should probably be used in all three of these methods, no?
Yeah, that makes it an exception, and a confusing one at that. I think defining this odd endpoint URL is reasonable here, as long as we also document it clearly as I've done for
I actually prefer "https://api.opentreeoflife.org" for this purpose, as in context it should jump out as different: "Oh, that's the production API server." 😮 |
Hi folks, regarding the ongoing tweaks to web-app config files (from Ansible templates), I'm reviewing the base URLs we define and their names, vs. what each actually provides. Can we make these consistent with the current architecture, esp. with an eye toward possibly hosting services on multiple servers?
This is more about making life easy for future maintainers, moreso than functionality. Ideally, we'd
otindex
vs.oti
; something better thantreemachine
...)Anyway, here's the current list of API "domains" (base URLs), along with representative endpoints for each:
Here's what I have in mind so far:
I think this does a nice job of making the base URLs more recognizable, though some names (
otcetera
) are not as descriptive of the services offered as, say,taxonomy
ortnrs
might be. Thoughts?Any changes here will need a parallel pull request in the web-apps, but that's easy enough. I just want to make sure these changes are robust and correct first.
The text was updated successfully, but these errors were encountered: