🍀 Trefle is a botanical JSON REST API for plants species, allowing you to search and query over all the registered species, and build the next gardening apps and farming robots.
The snippet example in the docs titled Get native plants from Tibet does not accurately filter the results returned. Specifically, when I am requesting native plants to a distribution zone, I am getting introduced plants back in the request.
To Reproduce
Make the following request to list all plants native to Illinois, USA (distribution id: 145):
The first result is a plant with the ID of 126957 and the common name "Orchardgrass"
Make a second request to get details about this specific plant:
https://trefle.io/api/v1/plants/126957
And check the list of native distributions for the distribution in the first request
Expected behavior
I expect that any plant returned when filtering by both distribution ID and establishment will have the establishment I requested if I view the plant's show endpoint.
Describe the bug
The snippet example in the docs titled Get native plants from Tibet does not accurately filter the results returned. Specifically, when I am requesting native plants to a distribution zone, I am getting introduced plants back in the request.
To Reproduce
Make the following request to list all plants native to Illinois, USA (distribution id: 145):
https://trefle.io/api/v1/distributions/145/plants?filter[establishment]=native
The first result is a plant with the ID of 126957 and the common name "Orchardgrass"
Make a second request to get details about this specific plant:
https://trefle.io/api/v1/plants/126957
And check the list of native distributions for the distribution in the first request
Expected behavior
I expect that any plant returned when filtering by both distribution ID and establishment will have the establishment I requested if I view the plant's show endpoint.