Query

Query Dataset Json

Execute a READ-ONLY SQL query on the given dataset version (if implemented) and return response in JSON format.

Adding a geostore ID or directly-specified geometry to the query will apply a spatial filter to the query, only returning results for features intersecting with the geostore geometry. For vector datasets, this filter will not clip feature geometries to the geostore boundaries. Hence any spatial transformation such as area calculations will be applied on the entire feature geometry, including areas outside the geostore boundaries.

A geostore ID or geometry must be specified for a query to a raster- only dataset.

GET to /dataset/{dataset}/{version}/fields will show fields that can be used in the query. For raster-only datasets, fields for other raster datasets that use the same grid are listed and can be referenced. There are also several reserved fields with special meaning that can be used, including "area__ha", "latitude", and "longitude".

get/dataset/{dataset}/{version}/query/json

Request

  • Base URL: https://data-api.globalforestwatch.org (the document declares no server; this is the origin it was published from)
  • URL: https://data-api.globalforestwatch.org/dataset/{dataset}/{version}/query/json
  • Auth: one of:
    • OAuth 2 (password, token URL /token)
    • API key in query parameter x-api-key
    • API key in header x-api-key

Path parameters

datasetstring required
versionstring required

Query parameters

sqlstring required

SQL query.

geostore_idstring uuid

Geostore ID. The geostore must represent a Polygon or MultiPolygon.

geostore_origin'gfw' | 'rw'

An enumeration.

Service to search first for geostore.

Response

Successful Response

string required

Changes

No recorded changes to this operation across all 1 revision of this API.