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

Return sites_cultivars relations in API #615

Open
dlebauer opened this issue Dec 13, 2018 · 1 comment
Open

Return sites_cultivars relations in API #615

dlebauer opened this issue Dec 13, 2018 · 1 comment

Comments

@dlebauer
Copy link
Member

I was hoping to get a list of cultivars associated with each site, or a list of sites associated with each cultivar, but have been unable to do so

e.g. https://terraref.ncsa.illinois.edu/bety/api/v1/cultivars?associations_mode=ids&limit=1 doesn’t return associated sites and https://terraref.ncsa.illinois.edu/bety/api/v1/sites?associations_mode=ids&limit=1 doesn’t return any cultivars

Note that we don't need to return the join table ids, e.g. /sites?associations_mode=ids returns ids for the experiment_sites table, but these aren’t terribly useful since we can't query join tables like this (or sites_cultivars).

@gsrohde
Copy link
Contributor

gsrohde commented Dec 14, 2018

It sounds like I should add experiments_sites to the list of tables that are ignored when listing associations. It is probably not in the list because it was a somewhat later addition.

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

2 participants