Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section is aimed towards more technical users.

EcoPlots API supports endpoints support the discovery and download of survey-based ecological data. For this purpose, a series of endpoints are available to allow users to download subsets of data, organised in the following key concepts.

Table of Contents
minLevel1
maxLevel7

Feature of interest attributes

In the TERN Ontology, a Feature of Interest (FOI) is an ecological scale (e.g. plant individual, animal population, soil, climate). Observations are grouped by ecological scales (FOI) and the FOI type and feature id for each observation are returned with the observation. [Read more about Feature of Interest]

However, every instance of FOI may have additional attributes related exclusively to the instance. This information can be accessed via the /foi/attributes endpoint.

Request example:

Code Block
curl -X POST "https://ecoplots-test.tern.org.au/api/v1.0/foi/attributes?dformat=ndjson" -H "accept: */*" -H "Authorization: apikey-v1 your-api-key" -H "Content-Type: application/json" -d "{\"query\":{\"dataset\":[\"http://linked.data.gov.au/dataset/ausplots\"],\"site_id\":[\"http://linked.data.gov.au/dataset/ausplots/site-nsabbs0001\"]}}"

Response example:

Code Block
{
   "attributeId":"http://linked.data.gov.au/dataset/ausplots/soil_characterisation-attr-lower_depth-122923",
   "featureId":"http://linked.data.gov.au/dataset/ausplots/site_visit_id-58580-soil_char_id-122923",
   "attributeName":"soil depth max",
   "attributeConceptId":"http://linked.data.gov.au/def/tern-cv/263d7143-e88d-4105-83e7-00d75035a2b3",
   "value":0.1,
   "valueId":"N/A",
   "valueUnit":"Metre",
   "valueUnitId":"http://qudt.org/vocab/unit/M"
}
{
   "attributeId":"http://linked.data.gov.au/dataset/ausplots/soil_characterisation-attr-upper_depth-122923",
   "featureId":"http://linked.data.gov.au/dataset/ausplots/site_visit_id-58580-soil_char_id-122923",
   "attributeName":"soil depth min",
   "attributeConceptId":"http://linked.data.gov.au/def/tern-cv/376efe60-0550-42b4-b90b-110015806dc7",
   "value":0.0,
   "valueId":"N/A",
   "valueUnit":"Metre",
   "valueUnitId":"http://qudt.org/vocab/unit/M"
}
...
{
   "attributeId":"http://linked.data.gov.au/dataset/ausplots/soil_characterisation-attr-layer_barcode-122923",
   "featureId":"http://linked.data.gov.au/dataset/ausplots/site_visit_id-58580-soil_char_id-122923",
   "attributeName":"voucher barcode",
   "attributeConceptId":"http://linked.data.gov.au/def/tern-cv/6d351831-45da-403c-919b-1cee41950488",
   "value":"NST004264",
   "valueId":"N/A",
   "valueUnit":"N/A",
   "valueUnitId":"N/A"
}

Instrument attributes

When an instrument was used to measure the result of an observation, the type of instrument and the instrument instance id is returned along the observation data.

However, an instance of an Instrument may have additional attributes related exclusively to the instance. This information can be accessed via the /instruments/attributes endpoint.

Request example:

Code Block
curl -X POST "https://ecoplots-test.tern.org.au/api/v1.0/instruments/attributes?dformat=ndjson" -H "accept: */*" -H "Authorization: apikey-v1 your-api-key" -H "Content-Type: application/json" -d "{\"query\":{\"dataset\":[\"http://linked.data.gov.au/dataset/ausplots\"],\"site_id\":[\"http://linked.data.gov.au/dataset/ausplots/site-nsabbs0001\"]}}"

Response example:

Code Block
{
   "attributeId":"http://linked.data.gov.au/dataset/ausplots/tern_basal_area-attr-basal_area_factor-475048",
   "instrumentId":"http://linked.data.gov.au/dataset/ausplots/tern_basal_area-inst-basal_area-475048",
   "attributeName":"basal area factor",
   "attributeConceptId":"http://linked.data.gov.au/def/tern-cv/dd34fc05-012d-4092-9324-a4cbcf29bf0a",
   "value":0.1,
   "valueId":"N/A",
   "valueUnit":"Unitless",
   "valueUnitId":"http://qudt.org/vocab/unit/UNITLESS"
}
...
{
   "attributeId":"http://linked.data.gov.au/dataset/ausplots/tern_basal_area-attr-basal_area_factor-475069",
   "instrumentId":"http://linked.data.gov.au/dataset/ausplots/tern_basal_area-inst-basal_area-475069",
   "attributeName":"basal area factor",
   "attributeConceptId":"http://linked.data.gov.au/def/tern-cv/dd34fc05-012d-4092-9324-a4cbcf29bf0a",
   "value":1.0,
   "valueId":"N/A",
   "valueUnit":"Unitless",
   "valueUnitId":"http://qudt.org/vocab/unit/UNITLESS"
}

Taxon

EcoPlots stores Taxonomic information about all vegetative species collected in the various datasets. This information is sourced from Australian Plant Name Index, and it can be retrieved using the /taxon endpoint.

Request example:

Code Block
curl -X POST "http://localhost:5000/api/v1.0/taxon?dformat=ndjson" -H "accept: */*" -H "Content-Type: application/json" -d "{\"query\":{\"dataset\":[\"http://linked.data.gov.au/dataset/ausplots\"],\"site_id\":[\"http://linked.data.gov.au/dataset/ausplots/site-nsabbs0001\"]}}"

Response example:

...

the data that is available.

Each endpoint has its own sub-section containing examples.

Child pages (Children Display)

...

The API endpoint use examples in this section use a cURL command-line request sent via HTTP. Request examples will contain "X-Api-Key: aAbBcC...xXyYzZ". Replace aAbBcC...xXyYzZ with your own API key that you have generated in your TERN account remembering to keep the final double quote (“).

In addition, if you have installed the jq command-line tool, you can pipe the output to format the response JSON string nicely (pretty print). The request response examples have been pretty print formatted to aid with readability.

Due to the size of the responses, the example responses are only excerpts of the data that is available when the command line request is run.