Dataqueries are different to queries - they are specifically designed to retrieve data from EcoPlots filtering data based on specified species. The dataqueries endpoints are an integral part of EcoPlots API, and are intended to facilitate efficient querying of relevant data. There are three dataqueries endpoints:
/species/count
/species/observations
/species/observed_property/list
On this page, we will highlight the basic URL parameters that can be used to create a dataquery.
speciesname
- URL Parameter
All three of the endpoints use the speciesname
parameter within the URL to find data points that include the relevent species name. Multiple species names (full or partial taxonomic names) can be passed at once using multiple occurrences of speciesname
in URL parameter.
For example:
https://ecoplots.tern.org.au/api/v1.0/species/count?speciesname=Allocasuarina torulosa&speciesname=Eucalyptus
NOTE: It is possible to pass only a family or genus name within a URL parameter. For example, let's say Eucalyptus is passed as the speciesname parameter, the API will return documents for all of the species of the genus Eucalyptus.
output
- URL Parameter
The output
parameter is only available for the /species/count
endpoint. This specifies what output data needs to be discovered. Its value can be either scientific_name
or taxon
. As the same suggests, scientific_name
returns only the scientific name of the species, while taxon
returns the entire taxonomy associated with the species specified with speciesname
.
For example:
https://ecoplots.tern.org.au/api/v1.0/species/count?speciesname=Allocasuarina torulosa&output=taxon
dformat
- URL Parameter
The dformat
parameter is only available for the /species/observations
endpoint. This specifies the datatype of the returned values, and can be formatted as either csv or ndjson.
For example:
https://ecoplots.tern.org.au/api/v1.0/species/observations?speciesname=Allocasuarina torulosa&dformat=ndjson
In the next pages of this section, we will comprehensively cover all the essential variables that must be supplied as URL parameters and/or in the request body for each endpoint, providing users with a clear understanding of what output to anticipate from the API.
0 Comments