Versions Compared

Key

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

Request BodyRequest Body

All the fields in dataqueries request body are similar to EcoPlots API search queries except for "exact_match" field under the "query". To review the more general information about constructing search queries, see EcoPlots API - creating search queries.

The request body for all the Dataqueries endpoint has query field under which values of facets for filtering can be plugged inendpoints contains a "query" field. This field allows users to specify what values should be used for filtering the facets. While the "query" field is common for all the endpoints, the /species/observations dataqueries endpoint has two more fields namely, used for the pagination of large responses ("page_number" and "page_size").

All the fields in request body are similar to EcoPlots API search queries except for “exact_match” field under the “query”. The following are all the subfields under “query” field in "query" field in that can be used in the request body.

  • "dataset": ["dataset-url-1", "dataset-url-2", ...]

  • “date"date_from": "2020-01-01"

  • “date"date_to": "2023-05-09"

  • “exact"exact_match": falseIn comparison to the EcoPlots API search query, the only added field in the request body is related to the "query" parameter. This parameter provides users with the flexibility to choose between a full-text search or tokenised word search for a given species name across all the records stored in the database. For example, when the "exact_match" is set to true and the given speciesname is Allocasuarina torulosa. The API will be returning only the documents containing exact species name while setting it to false will result in documents that has either Allocasuarina or torulosa or full Allocasuarina torulosa.

  • “feature"feature_type": ["feature-type-url-1", "feature-type-url-2", ...]

  • “observed"observed_property": ["observed-property-url-1", ...]

  • “region"region": ["region-url-1", "region-url-2", ...]

  • “site"site_id": ["site-id-url-1", "site-id-url-2", ...]

  • “spatial"spatial": { }

...

Compared with the EcoPlots API search query, the only added field in the request body is related to the "query" parameter. This parameter provides users with the flexibility to search for a given species name across all the records stored in the database using either a full-text or a tokenised word search.

For example, when the "exact_match"

...

is

...

set to true and the given speciesname is Allocasuarina torulosa,the API will return only the entries containing the exact species name as it has been entered. Setting "exact_match" to false will result in entries that contain either Allocasuarina or torulosa or the full name of Allocasuarina torulosa.

...

Below is an example of mock a request body. Please note that for endpoints other than /species/observations, "page_number" and "page_size" is NOT required.

Code Block
breakoutModewide
languagejson
{
    "page_number": 1,
    "page_size": 25,
    "query": {
        "dataset": [
            "http://linked.data.gov.au/dataset/ausplots",
            "http://linked.data.gov.au/dataset/corveg"
        ],
        "date_from": "2006-01-01",
        "date_to": "2021-07-30",
        "exact_match": true,
        "feature_type": [
            "http://linked.data.gov.au/def/tern-cv/2cf3ed29-440e-4a50-9bbc-5aab30df9fcd"
        ],
        "observed_property": [
            "http://linked.data.gov.au/def/tern-cv/83ac0278-51cd-4d1a-8e05-7c1fc68cf020"
        ],
        "region": [
            "http://linked.data.gov.au/dataset/asgs2016/stateorterritory/6",
            "http://linked.data.gov.au/dataset/bioregion/CYP"
        ],
        "site_id": [
            "http://linked.data.gov.au/dataset/ausplots/site-nsabbs0001"
        ],
        "spatial": {
            "type" : "Polygon",
            "coordinates" : [
                [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
            ]
        }
    }
}
Panel
panelIconId1f5d2
panelIcon:notepad_spiral:
panelIconText🗒️
bgColor#E6FCFF

Please note that for endpoints other than /species/observations, there is no need to include
"page_number" and "page_size" as they are NOT required.

For further information on pagination, please refer to EcoPlots API- paginating results.