bety
bety copied to clipboard
Return sites_cultivars relations in API
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).