...
The filter query must be sent in the request body (content type JSON) along with the pagination parameters, it desired.
*Each of these examples is separate
Tip |
---|
Valid request bodies |
Code Block |
---|
{ "page_number": 1, # optional "page_size": 50, # optional "query": { # mandatory, but query can be empty "dataset": [ "http://linked.data.gov.au/dataset/ausplots" ] } } |
...
Code Block |
---|
{ "query": {} } |
Remember that comments within JSON invalidates the syntax. For first invalid example below, there must be a page number is there is a page size.
Warning |
---|
Invalid request bodies |
Code Block |
---|
{
"page_number": 1,
"query": {}
} |
Code Block |
---|
{} |
Code Block |
---|
{
"page_number": 1,
"page_size": 50
} |
Available facets in the query object
Probably need a link to the index of possible query bodies.
Notice that all values (even if it is 1 single value) must be enclosed between square brackets.
...
Code Block |
---|
"date_from": "2006-01-01", "date_to": "2021-07-30" |
Spatial extent
Need to explain how this works and how to do this.
Statial queries in EcoPlots allows three different formats: GeoJSON, Well-Known Text (WKT) and Bounding Box. The spatial query will do an “intersect” between the given geometry and the geometry of the data.
...
Code Block |
---|
# Bounding Box (BBOX) example "spatial": [139.2, -34.35, 140.0, -35.00] |
Pagination
Probably needs to be incorporated into the broader topic rather than being a stand alone entity. Perhaps put the initial explanation the first relevant section.
Note |
---|
Pagination is meant to be used as a data discovery tool (quickly returning small chunks of data). Completeness cannot be guaranteed due to database design and implemented limits (only the first 10,000 elements of the whole subset can be retrieved). If you desire to retrieve more than 10,000 elements, please remove pagination to get all elements. |
...
Using Ecoplots portal to auto-generate queries
Maybe we should be leading with this and have it in it’s own section.
The easiest method to create valid queries to be used in the API requests is building the query visually and dynamically through the EcoPlots Portal.
...