### Get Version Metadata Example (JSON) Source: https://data-api.globalforestwatch.org/index This JSON object illustrates a successful response (HTTP 200) for retrieving version-specific metadata for a dataset. It includes creation and update timestamps, dataset and version identifiers, flags for latest and mutability, and metadata regarding the content's date range. It also shows the status of the version, which can be 'pending' or other states. ```json { "data": { "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "dataset": "string", "version": "string", "is_latest": false, "is_mutable": false, "metadata": { "content_date_range": { "start_date": "2000-01-01", "end_date": "2021-04-06" }, "content_date_description": "2000 - present" }, "status": "pending", "assets": [ ] }, "status": "success" } ``` -------------------------------- ### GET /dataset/{dataset}/{version}/creation_options Source: https://data-api.globalforestwatch.org/openapi Get creation options for a dataset version. This endpoint returns the configuration options available when creating or modifying a dataset version. ```APIDOC ## GET /dataset/{dataset}/{version}/creation_options ### Description Get creation options for a dataset version. This endpoint returns the configuration options available when creating or modifying a dataset version. ### Method GET ### Endpoint /dataset/{dataset}/{version}/creation_options ### Parameters #### Path Parameters - **dataset** (string) - Required - The name of the dataset. - **version** (string) - Required - The version of the dataset (e.g., 'v1.0', 'latest'). ### Response #### Success Response (200) - **creation_options** (object) - An object containing various creation options for the dataset version. ``` -------------------------------- ### Get Dataset Version Assets - API Request Example Source: https://data-api.globalforestwatch.org/index This snippet demonstrates how to make an API request to retrieve all assets for a specific dataset version. It shows how to specify path parameters like dataset and version, and optional query parameters for filtering and pagination. The response includes asset details, pagination links, and metadata. ```HTTP GET /dataset/{dataset}/{version}/assets?asset_type="Raster tile set"&page[size]=50&page[number]=1 HTTP/1.1 Host: data-api.globalforestwatch.org Accept: application/json ``` -------------------------------- ### Example Paginated Datasets Response Source: https://data-api.globalforestwatch.org/index An example JSON response for the 'Get Datasets' endpoint, demonstrating the structure of paginated dataset information. Includes a list of datasets, status, pagination links, and metadata about the response. ```JSON { "data": [ { "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "dataset": "string", "is_downloadable": true, "metadata": { "title": "Deforestation alerts (GLAD-S2)", "subtitle": "Sentinel-2 based deforestation alerts", "source": "Global Land Analysis and Discovery (GLAD), University of Maryland", "license": "[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)", "data_language": "en", "overview": "This data set is a forest loss alert product developed by the Global Land Analysis and Discovery lab at the University of Maryland. GLAD-S2 alerts utilize data from the European Space Agency's Sentinel-2 mission, which provides optical imagery at a 10m spatial resolution with a 5-day revisit time. The shorter revisit time, when compared to GLAD Landsat alerts, reduces the time to detect forest loss and between the initial detection of forest loss and classification as high confidence. This is particularly advantageous in wet and tropical regions, where persistent cloud cover may delay detections for weeks to months. GLAD-S2 alerts are available for primary forests in the Amazon basin from January 1st 2019 to present, updated daily. New Sentinel-2 images are analyzed as soon as they are acquired. Cloud, shadow, and water are filtered out of each new image, and a forest loss algorithm is applied to all remaining clear land observations. The algorithm relies on the spectral data in each new image in combination with spectral metrics from a baseline period of the previous two years. Alerts become high confidence when at least two of four subsequent observations are flagged as forest loss (this corresponds to 'high', 'medium', and 'low' confidence loss on the GLAD app linked below). The alert date represents the date of forest loss detection. Users can choose to display only high confidence alerts on the map, but keep in mind this will filter out the most recent detections of forest loss. Additionally, forest loss will not be detected again on pixels with high confidence alerts. Alerts that have not become high confidence within 180 days are removed from the data set.", "function": "Identifies areas of primary forest loss in near real time using Sentinel-2 imagery", "citation": "Pickens, A.H., Hansen, M.C., Adusei, B., and Potapov P. 2020. Sentinel-2 Forest Loss Alert. Global Land Analysis and Discovery (GLAD), University of Maryland.", "cautions": "Results are masked to only within the primary forest mask of [Turubanova et al (2018)](https://iopscience.iop.org/article/10.1088/1748-9326/aacd1c) in the Amazon river basin, with 2001-2018 forest loss from [Hansen et al. (2013)](https://science.sciencemag.org/content/342/6160/850) removed. Alerts that have been detected in two out of four consecutive images are classified as high confidence. Pixels with high confidence alerts cannot be alerted again. The accuracy of this product has not been assessed", "tags": [ "Forest Change" ], "learn_more": "https://glad.earthengine.app/view/s2-forest-alerts" }, "versions": [ ] } ], "status": "success", "links": { "self": "https://data-api.globalforestwatch.org/:model?page[number]=1&page[size]=25", "first": "https://data-api.globalforestwatch.org/:model?page[number]=1&page[size]=25", "last": "https://data-api.globalforestwatch.org/:model?page[number]=4&page[size]=25", "prev": "", "next": "https://data-api.globalforestwatch.org/:model?page[number]=2&page[size]=25" }, "meta": { "size": "25", "total_items": "100", "total_pages": "4" } } ``` -------------------------------- ### Get Asset Metadata (JSON Example) Source: https://data-api.globalforestwatch.org/index This snippet shows an example of a successful JSON response when retrieving metadata for a specific asset. It includes details about tags, fields, and the asset's unique identifier. ```json { "data": { "tags": [ "string" ], "fields": [ { "name": "string", "alias": "string", "description": "string", "data_type": "date", "unit": "string", "is_feature_info": true, "is_filter": true } ], "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" }, "status": "success" } ``` -------------------------------- ### Create Asset Metadata (JSON Example) Source: https://data-api.globalforestwatch.org/index This JSON example demonstrates the structure for creating a new metadata record for an asset. It includes optional 'tags' and 'fields' properties, which define the metadata content. ```json { "tags": [ "string" ], "fields": [ { "name": "string", "alias": "string", "description": "string", "data_type": "date", "unit": "string", "is_feature_info": true, "is_filter": true } ] } ``` -------------------------------- ### Get Dataset Metadata Example (JSON) Source: https://data-api.globalforestwatch.org/index This JSON object represents a successful response (HTTP 200) when retrieving metadata for a dataset. It includes information about the dataset's creation and update times, its name, downloadability, and detailed metadata such as title, source, license, and a comprehensive overview of the data's purpose and methodology. It also includes cautions and citation information. ```json { "data": { "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "dataset": "string", "is_downloadable": true, "metadata": { "title": "Deforestation alerts (GLAD-S2)", "subtitle": "Sentinel-2 based deforestation alerts", "source": "Global Land Analysis and Discovery (GLAD), University of Maryland", "license": "[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)", "data_language": "en", "overview": "This data set is a forest loss alert product developed by the Global Land Analysis and Discovery lab at the University of Maryland. GLAD-S2 alerts utilize data from the European Space Agency's Sentinel-2 mission, which provides optical imagery at a 10m spatial resolution with a 5-day revisit time. The shorter revisit time, when compared to GLAD Landsat alerts, reduces the time to detect forest loss and between the initial detection of forest loss and classification as high confidence. This is particularly advantageous in wet and tropical regions, where persistent cloud cover may delay detections for weeks to months. GLAD-S2 alerts are available for primary forests in the Amazon basin from January 1st 2019 to present, updated daily. New Sentinel-2 images are analyzed as soon as they are acquired. Cloud, shadow, and water are filtered out of each new image, and a forest loss algorithm is applied to all remaining clear land observations. The algorithm relies on the spectral data in each new image in combination with spectral metrics from a baseline period of the previous two years. Alerts become high confidence when at least two of four subsequent observations are flagged as forest loss (this corresponds to 'high', 'medium', and 'low' confidence loss on the GLAD app linked below). The alert date represents the date of forest loss detection. Users can choose to display only high confidence alerts on the map, but keep in mind this will filter out the most recent detections of forest loss. Additionally, forest loss will not be detected again on pixels with high confidence alerts. Alerts that have not become high confidence within 180 days are removed from the data set.", "function": "Identifies areas of primary forest loss in near real time using Sentinel-2 imagery", "citation": "Pickens, A.H., Hansen, M.C., Adusei, B., and Potapov P. 2020. Sentinel-2 Forest Loss Alert. Global Land Analysis and Discovery (GLAD), University of Maryland.", "cautions": "Results are masked to only within the primary forest mask of [Turubanova et al (2018)](https://iopscience.iop.org/article/10.1088/1748-9326/aacd1c) in the Amazon river basin, with 2001-2018 forest loss from [Hansen et al. (2013)](https://science.sciencemag.org/content/342/6160/850) removed. Alerts that have been detected in two out of four consecutive images are classified as high confidence. Pixels with high confidence alerts cannot be alerted again. The accuracy of this product has not been assessed", "tags": [ "Forest Change" ], "learn_more": "https://glad.earthengine.app/view/s2-forest-alerts" }, "versions": [ ] }, "status": "success" } ``` -------------------------------- ### Create Asset Payload Example (JSON) Source: https://data-api.globalforestwatch.org/index This is an example JSON payload for creating a new asset. It includes details about the asset type, URI, management and downloadability flags, creation options specific to the asset type, and associated metadata. The 'creation_options' field is dynamic and depends on the 'asset_type'. ```json { "asset_type": "Dynamic vector tile cache", "asset_uri": "string", "is_managed": true, "is_downloadable": true, "creation_options": { "has_header": true, "delimiter": ",", "latitude": "string", "longitude": "string", "cluster": { "index_type": "gist", "column_names": [ "string" ] }, "partitions": { "partition_type": "hash", "partition_column": "string", "create_default": false, "partition_schema": { "partition_count": 0 } }, "indices": [ ], "constraints": [ { "constraint_type": "unique", "column_names": [ "string" ] } ], "table_schema": [ { "name": "string", "data_type": "date" } ], "create_dynamic_vector_tile_cache": true, "timeout": 400000 }, "metadata": { "tags": [ "string" ], "fields": [ { "name": "string", "alias": "string", "description": "string", "data_type": "date", "unit": "string", "is_feature_info": true, "is_filter": true } ] } } ``` -------------------------------- ### GET /auth/apikeys Source: https://data-api.globalforestwatch.org/index Get a list of API keys. ```APIDOC ## GET /auth/apikeys ### Description Get a list of API keys. Default keys are valid for one year. ### Method GET ### Endpoint /auth/apikeys ### Response #### Success Response (200) Response body is null. #### Response Example (200) ```json null ``` ``` -------------------------------- ### GET /dataset/{dataset}/{version}/assets Source: https://data-api.globalforestwatch.org/openapi Get all assets for a given dataset version, including pending/failed assets. The list is sorted by asset creation time. Supports pagination if `page[size]` or `page[number]` are provided. ```APIDOC ## GET /dataset/{dataset}/{version}/assets ### Description Get all assets for a given dataset version (including pending/failed assets). The list of assets is sorted by the creation time of each asset. Will attempt to paginate if `page[size]` or `page[number]` is provided. Otherwise, it will attempt to return the entire list of assets in the response. ### Method GET ### Endpoint /dataset/{dataset}/{version}/assets ### Parameters #### Path Parameters - **dataset** (string) - Required - The dataset identifier. Must match the pattern `^[a-z][a-z0-9_-]{2,}$`. - **version** (string) - Required - The dataset version. Must match the pattern `^v\d{1,8}(\.\d{1,3}){0,2}?$|^latest$`. #### Query Parameters - **asset_type** (AssetType) - Optional - Filter by Asset Type. - **asset_uri** (string) - Optional - Filter by Asset URI. - **is_latest** (boolean) - Optional - Filter for the latest asset. - **is_default** (boolean) - Optional - Filter for the default asset. - **page[number]** (integer) - Optional - The page number. Minimum value is 1. - **page[size]** (integer) - Optional - The number of assets per page. Default is 10. Minimum value is 1. ### Response #### Success Response (200) - **(PaginatedAssetsResponse or AssetsResponse)** - Response Get Version Assets Dataset Dataset Version Assets Get #### Error Response (422) - **(HTTPValidationError)** - Validation Error ``` -------------------------------- ### GET /ping Source: https://data-api.globalforestwatch.org/openapi A simple endpoint to check the API's uptime. ```APIDOC ## GET /ping ### Description A simple endpoint to check the API's uptime. ### Method GET ### Endpoint /ping ### Response #### Success Response (200) - **Response object** (object) - Indicates the API is operational. Expected to conform to `#/components/schemas/Response`. ``` -------------------------------- ### GET /dataset/{dataset} Source: https://data-api.globalforestwatch.org/openapi Retrieve basic metadata and available versions for a specific dataset. ```APIDOC ## GET /dataset/{dataset} ### Description Retrieve basic metadata and available versions for a specific dataset. ### Method GET ### Endpoint /dataset/{dataset} ### Parameters #### Path Parameters - **dataset** (string) - Required - The unique identifier for the dataset. Must start with a lowercase letter and contain only lowercase letters, numbers, hyphens, or underscores, with a minimum length of 3 characters. ### Response #### Success Response (200) - **data** (object) - The dataset metadata. #### Response Example ```json { "data": { "id": "dataset_id", "type": "dataset", "attributes": { "name": "Example Dataset", "description": "Detailed description of the example dataset.", "versions": [ "v1.0", "v1.1" ] } } } ``` ``` -------------------------------- ### POST /auth/sign-up Source: https://data-api.globalforestwatch.org/openapi Handles user sign-up requests. It takes user credentials and registers a new user in the system. ```APIDOC ## POST /auth/sign-up ### Description Handles user sign-up requests. It takes user credentials and registers a new user in the system. ### Method POST ### Endpoint /auth/sign-up ### Parameters #### Request Body - **email** (string) - Required - User's email address. - **password** (string) - Required - User's chosen password. - **name** (string) - Optional - User's full name. ### Request Example { "email": "user@example.com", "password": "securepassword123", "name": "John Doe" } ### Response #### Success Response (200) - **message** (string) - Indicates successful sign-up. #### Response Example { "message": "User created successfully" } ``` -------------------------------- ### User Sign Up Source: https://data-api.globalforestwatch.org/openapi Endpoint for new user sign-up. ```APIDOC ## POST /users/sign-up ### Description Allows new users to sign up for an account. ### Method POST ### Endpoint /users/sign-up ### Parameters #### Request Body - **name** (string) - Required - Full user name. - **email** (string) - Required - User's email address. ### Request Example ```json { "name": "John Doe", "email": "john.doe@example.com" } ``` ### Response #### Success Response (200) - **data** (object) - User sign-up confirmation data. - **status** (string) - Status of the operation. Defaults to `success`. #### Response Example ```json { "data": {}, "status": "success" } ``` ``` -------------------------------- ### Get Generic Features Endpoint Example (HTTP) Source: https://data-api.globalforestwatch.org/index This is an example of an HTTP request to retrieve generic features for a given spatial location and zoom level. It requires the dataset identifier, version, latitude, longitude, and zoom level. The search radius varies with zoom level. ```http GET /dataset/{dataset}/{version}/features?lat=38.9072&lng=-77.0369&z=12 HTTP/1.1 Host: data-api.globalforestwatch.org ``` -------------------------------- ### POST /auth/sign-up Source: https://data-api.globalforestwatch.org/index Sign up a new user for the GFW DATA API. ```APIDOC ## POST /auth/sign-up ### Description Sign up a new user for the GFW DATA API. ### Method POST ### Endpoint /auth/sign-up ### Parameters #### Request Body - **name** (string) - Required - Full user name - **email** (string) - Required - User's email address ### Request Example ```json { "name": "string", "email": "user@example.com" } ``` ### Response #### Success Response (200) Response body is null. #### Error Response (422) Validation Error. Response body is null. #### Response Example (200) ```json null ``` ``` -------------------------------- ### Get NASA VIIRS Fire Alerts Features Endpoint Example (HTTP) Source: https://data-api.globalforestwatch.org/index This is an example of an HTTP request to retrieve NASA VIIRS fire alert features for a given location and zoom level. It requires the dataset version in the path and latitude, longitude, and zoom level as query parameters. Optional date range parameters can filter the results. ```http GET /dataset/nasa_viirs_fire_alerts/{version}/features?lat=38.9072&lng=-77.0369&z=12&start_date=2025-12-29&end_date=2026-01-05 HTTP/1.1 Host: data-api.globalforestwatch.org ``` -------------------------------- ### JSON Response Sample for Tree Cover Loss by Driver Get Source: https://data-api.globalforestwatch.org/index Example of a successful JSON response when retrieving a tree cover loss by driver analysis resource, including results and metadata. ```JSON { "data": { "result": { "tree_cover_loss_by_driver": [ { } ], "yearly_tree_cover_loss_by_driver": [ { } ] }, "metadata": { "aoi": { "type": "geostore", "geostore_id": "cfbc2e5d-0a0f-4129-a3c5-99dd9b689dbe" }, "sources": [ { "dataset": "string", "version": "string" } ], "canopy_cover": 0 }, "message": "string", "status": "saved" }, "status": "success" } ``` -------------------------------- ### Get Dataset Metadata Source: https://data-api.globalforestwatch.org/index Retrieves basic metadata and available versions for a specific dataset. Requires the dataset identifier as a path parameter. The dataset identifier must be a string starting with lowercase letters, followed by alphanumeric characters, underscores, or hyphens, with a minimum length of 3. ```HTTP GET /datasets/{dataset} Host: data-api.globalforestwatch.org ``` -------------------------------- ### GET /asset/{asset_id}/creation_options Source: https://data-api.globalforestwatch.org/openapi Fetches the creation options available for a given asset. This can be useful for understanding how to create or modify assets. ```APIDOC ## GET /asset/{asset_id}/creation_options ### Description Fetches the creation options available for a given asset. ### Method GET ### Endpoint /asset/{asset_id}/creation_options ### Parameters #### Path Parameters - **asset_id** (string) - Required - The unique identifier of the asset. ### Response #### Success Response (200) - **CreationOptionsResponse** - The response schema for asset creation options. #### Response Example ```json { "example": "CreationOptionsResponse schema" } ``` ``` -------------------------------- ### Get Creation Options Response - JSON Source: https://data-api.globalforestwatch.org/index This JSON response outlines the available options for creating or configuring a dataset version. It specifies table schema, indexing strategies, partitioning methods, and source details. ```json { "data": { "has_header": true, "delimiter": ",", "latitude": "string", "longitude": "string", "cluster": { "index_type": "gist", "column_names": [ "string" ] }, "partitions": { "partition_type": "hash", "partition_column": "string", "create_default": false, "partition_schema": { "partition_count": 0 } }, "indices": [ ], "constraints": [ { "constraint_type": "unique", "column_names": [ "string" ] } ], "table_schema": [ { "name": "string", "data_type": "date" } ], "create_dynamic_vector_tile_cache": true, "timeout": 400000, "source_type": "table", "source_driver": "text", "source_uri": [ "string" ] }, "status": "success" } ``` -------------------------------- ### Static Vector Tile Cache Creation Options Source: https://data-api.globalforestwatch.org/openapi Options for creating static vector tile caches, including zoom levels, field attributes, and tile strategy. ```APIDOC ## POST /websites/data-api_globalforestwatch/static-vector-tile-cache ### Description Configuration options for creating a static vector tile cache. ### Method POST ### Endpoint /websites/data-api_globalforestwatch/static-vector-tile-cache ### Parameters #### Query Parameters - **min_zoom** (integer) - Optional - Minimum zoom level of the tile cache. Defaults to `0`. - **max_zoom** (integer) - Optional - Maximum zoom level of the tile cache. Defaults to `14`. - **timeout_sec** (integer) - Optional - Maximum run time for associated AWS Batch jobs, in seconds. - **field_attributes** (array) - Optional - Field attributes to include in vector tiles. - **tile_strategy** (object) - Optional - Strategy for tile generation (`discontinuous` or `continuous`). - **implementation** (string) - Optional - Namespace for the static tile cache. Defaults to `default`. - **layer_style** (array) - Optional - List of Mapbox layer styles. ### Request Body (No specific request body documented, parameters are expected via query) ### Response #### Success Response (200) - **data** (object) - The created static vector tile cache data. - **status** (string) - Status of the operation. Defaults to `success`. #### Response Example ```json { "data": {}, "status": "success" } ``` ``` -------------------------------- ### GET /auth/apikey/{api_key} Source: https://data-api.globalforestwatch.org/index Get details for a specific API Key. ```APIDOC ## GET /auth/apikey/{api_key} ### Description Get details for a specific API Key. User must own API Key or must be Admin to see details. ### Method GET ### Endpoint /auth/apikey/{api_key} ### Parameters #### Path Parameters - **api_key** (string) - Required - API Key (uuid) ### Response #### Success Response (200) Response body is null. #### Error Response (422) Validation Error. Response body is null. #### Response Example (200) ```json null ``` ``` -------------------------------- ### Vector Source Creation Options Source: https://data-api.globalforestwatch.org/openapi Defines options for creating vector sources, including index types, schema, and tile cache settings. ```APIDOC ## POST /websites/data-api_globalforestwatch/vector-sources ### Description Creates a new vector source with specified creation options. ### Method POST ### Endpoint `/websites/data-api_globalforestwatch/vector-sources` ### Parameters #### Request Body - **source_type** (string) - Required - Type of the source (e.g., 'vector'). - **source_driver** (string) - Required - OGR driver for the source file. - **source_uri** (string) - Required - URI of the source file. - **index_type** (string) - Optional - Type of index to use for geometry fields (e.g., 'gist'). - **cluster** (object) - Optional - Index configuration for clustering. - **table_schema** (array) - Optional - List of Field Types for the table schema. - **create_dynamic_vector_tile_cache** (boolean) - Optional - Whether to create a dynamic vector tile cache (default: true). - **add_to_geostore** (boolean) - Optional - Whether to make geometries searchable via geostore endpoint (default: true). - **timeout** (integer) - Optional - Timeout for the operation (default: 400000). ### Request Example ```json { "source_type": "vector", "source_driver": "GeoJSON", "source_uri": "s3://my-bucket/my-vector-data.geojson", "index_type": "gist", "add_to_geostore": true } ``` ### Response #### Success Response (201) - **id** (string) - Unique identifier for the created vector source. - **message** (string) - Confirmation message. #### Response Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "message": "Vector source created successfully." } ``` ``` -------------------------------- ### GET /asset/{asset_id}/tiles_info Source: https://data-api.globalforestwatch.org/openapi Gets information about the tiles associated with an asset. This is typically used for tiled data sources. ```APIDOC ## GET /asset/{asset_id}/tiles_info ### Description Gets information about the tiles associated with an asset. ### Method GET ### Endpoint /asset/{asset_id}/tiles_info ### Parameters #### Path Parameters - **asset_id** (string) - Required - The unique identifier of the asset. ### Response #### Success Response (307) - Description: Successful Response #### Response Example ```json { "example": "Response for successful tile info retrieval" } ``` ``` -------------------------------- ### Raster Tile Set Creation Options Source: https://data-api.globalforestwatch.org/openapi Options for creating raster tile sets, including data type, ordering, and source information. ```APIDOC ## POST /websites/data-api_globalforestwatch/raster-tile-set ### Description Configuration options for creating a raster tile set. ### Method POST ### Endpoint /websites/data-api_globalforestwatch/raster-tile-set ### Parameters #### Query Parameters - **pixel_meaning** (string) - Required - Specifies the meaning of pixel values. - **data_type** (string) - Required - The data type of the raster. - **source_type** (string) - Required - The type of the raster source. - **source_driver** (string) - Required - The GDAL driver of the source file. - **grid** (object) - Required - Grid definition for the raster tiles. - **overwrite** (boolean) - Optional - Whether to overwrite existing data. Defaults to `false`. - **subset** (string) - Optional - Subset options for the raster. - **symbology** (object) - Optional - Symbology settings for the raster. - **compute_stats** (boolean) - Optional - Whether to compute statistics. Defaults to `true`. - **compute_histogram** (boolean) - Optional - Whether to compute histograms. Defaults to `false`. - **process_locally** (boolean) - Optional - Whether to process locally. Defaults to `true`. - **auxiliary_assets** (array) - Optional - Asset IDs of additional rasters to include. - **photometric** (object) - Optional - Photometric interpretation settings. - **num_processes** (integer) - Optional - Number of processes to use. - **timeout_sec** (integer) - Optional - Maximum run time for associated AWS Batch jobs, in seconds. - **source_uri** (array) - Optional - List of input source URIs. ### Request Body (No specific request body documented, parameters are expected via query) ### Response #### Success Response (200) - **data** (object) - The created raster tile set data. - **status** (string) - Status of the operation. Defaults to `success`. #### Response Example ```json { "data": {}, "status": "success" } ``` ``` -------------------------------- ### GET /dataset/{dataset}/{version}/metadata Source: https://data-api.globalforestwatch.org/openapi Get metadata for a dataset version. This endpoint provides detailed information about the dataset version, with an option to include dataset-level metadata. ```APIDOC ## GET /dataset/{dataset}/{version}/metadata ### Description Get metadata for a dataset version. This endpoint provides detailed information about the dataset version, with an option to include dataset-level metadata. ### Method GET ### Endpoint /dataset/{dataset}/{version}/metadata ### Parameters #### Path Parameters - **dataset** (string) - Required - The name of the dataset. - **version** (string) - Required - The version of the dataset (e.g., 'v1.0', 'latest'). #### Query Parameters - **include_dataset_metadata** (boolean) - Optional - Whether to include dataset metadata. Defaults to false. ### Response #### Success Response (200) - **metadata** (object) - An object containing metadata for the dataset version. May include dataset-level metadata if requested. ``` -------------------------------- ### GET /dataset/{dataset}/{version}/creation_options Source: https://data-api.globalforestwatch.org/index Retrieves the creation options for a specific dataset version. ```APIDOC ## GET /dataset/{dataset}/{version}/creation_options ### Description Retrieves the creation options for a specific dataset version. ### Method GET ### Endpoint `/dataset/{dataset}/{version}/creation_options` ### Parameters #### Path Parameters - **dataset** (string) - Required - Dataset identifier. - **version** (string) - Required - Dataset version (e.g., 'v1.0.0' or 'latest'). ### Response #### Success Response (200) - **data** (object) - Object containing dataset creation options. - **has_header** (boolean) - Indicates if the data has a header row. - **delimiter** (string) - The delimiter used in the data file. - **latitude** (string) - The field name for latitude. - **longitude** (string) - The field name for longitude. - **cluster** (object) - Clustering options. - **index_type** (string) - Type of index for clustering. - **column_names** (array of strings) - List of column names for clustering. - **partitions** (object) - Partitioning options. - **partition_type** (string) - Type of partitioning. - **partition_column** (string) - The column to partition by. - **create_default** (boolean) - Whether to create a default partition. - **partition_schema** (object) - Schema for partitioning. - **partition_count** (integer) - Number of partitions. - **indices** (array) - List of indices. - **constraints** (array) - List of constraints. - **constraint_type** (string) - Type of constraint (e.g., 'unique'). - **column_names** (array of strings) - List of column names for the constraint. - **table_schema** (array) - Schema definition for the table. - **name** (string) - Column name. - **data_type** (string) - Data type of the column. - **create_dynamic_vector_tile_cache** (boolean) - Whether to create dynamic vector tile cache. - **timeout** (integer) - Timeout value for operations. - **source_type** (string) - Type of data source. - **source_driver** (string) - Driver for the data source. - **source_uri** (array of strings) - Array of source URIs. - **status** (string) - Overall API response status. #### Response Example ```json { "data": { "has_header": true, "delimiter": ",", "latitude": "string", "longitude": "string", "cluster": { "index_type": "gist", "column_names": [ "string" ] }, "partitions": { "partition_type": "hash", "partition_column": "string", "create_default": false, "partition_schema": { "partition_count": 0 } }, "indices": [], "constraints": [ { "constraint_type": "unique", "column_names": [ "string" ] } ], "table_schema": [ { "name": "string", "data_type": "date" } ], "create_dynamic_vector_tile_cache": true, "timeout": 400000, "source_type": "table", "source_driver": "text", "source_uri": [ "string" ] }, "status": "success" } ``` ``` -------------------------------- ### Static Vector Tile Cache Creation Options Source: https://data-api.globalforestwatch.org/openapi Defines the options for creating a static vector tile cache, including styling rules and feature filtering. ```APIDOC ## Static Vector Tile Cache Creation Options ### Description Options for creating a static vector tile cache. This includes specifying styling rules for vector tile caches and optional tippecanoe feature filters. The `source` and `source-layer` attributes must use the dataset name. Styling rules are used in autogenerated root.json and preview. ### Method Not Applicable (This describes a schema for options, not an endpoint) ### Endpoint Not Applicable ### Parameters #### Request Body - **tile_strategy** (object) - Required - Configuration for the tile strategy. - **layer_style** (object) - Required - Styling rules for vector tile caches. Uses Mapbox GL JS style specification for layers. - **feature_filter** (object) - Optional - Tippecanoe feature filter(s) using Mapbox legacy filter syntax. ``` -------------------------------- ### GET /dataset/{dataset}/{version}/fields Source: https://data-api.globalforestwatch.org/openapi Get the fields of a dataset version. For vector datasets, this returns feature attributes. For raster datasets, it lists tile sets and special fields like 'area__ha', 'latitude', 'longitude'. ```APIDOC ## GET /dataset/{dataset}/{version}/fields ### Description Get the fields of a dataset version. For vector datasets, this returns feature attributes. For raster datasets, it lists tile sets and special fields like 'area__ha', 'latitude', 'longitude'. ### Method GET ### Endpoint /dataset/{dataset}/{version}/fields ### Parameters #### Path Parameters - **dataset** (string) - Required - The name of the dataset. - **version** (string) - Required - The version of the dataset (e.g., 'v1.0', 'latest'). ### Response #### Success Response (200) - **fields** (array) - A list of field objects, each containing 'name', 'type', and 'description'. ``` -------------------------------- ### GET /dataset/{dataset}/{version} Source: https://data-api.globalforestwatch.org/openapi Retrieve basic metadata for a specific version of a dataset. The list of assets includes only saved assets and is sorted by creation time. ```APIDOC ## GET /dataset/{dataset}/{version} ### Description Retrieve basic metadata for a specific version of a dataset. The list of assets only includes saved (non-pending and non-failed) assets and is sorted by the creation time of each asset. ### Method GET ### Endpoint /dataset/{dataset}/{version} ### Parameters #### Path Parameters - **dataset** (string) - Required - The unique identifier for the dataset. Must start with a lowercase letter and contain only lowercase letters, numbers, hyphens, or underscores, with a minimum length of 3 characters. - **version** (string) - Required - The version identifier. Must follow the pattern `vX.Y.Z` where X, Y, and Z are numbers representing major, minor, and patch versions respectively. ### Response #### Success Response (200) - **data** (object) - The version metadata, including a list of associated assets. #### Response Example ```json { "data": { "id": "version_id", "type": "version", "attributes": { "version": "v1.0.0", "assets": [ { "id": "asset_id_1", "name": "Asset 1", "createdAt": "2023-01-01T10:00:00Z" }, { "id": "asset_id_2", "name": "Asset 2", "createdAt": "2023-01-01T11:00:00Z" } ] } } } ``` ``` -------------------------------- ### GET /dataset/{dataset}/{version}/download/geotiff Source: https://data-api.globalforestwatch.org/openapi Downloads a GeoTIFF raster tile for a specified dataset version. Requires grid size, tile ID, and pixel meaning. ```APIDOC ## GET /dataset/{dataset}/{version}/download/geotiff ### Description Download geotiff raster tile. ### Method GET ### Endpoint /dataset/{dataset}/{version}/download/geotiff ### Parameters #### Path Parameters - **dataset** (string) - Required - Dataset identifier. Must start with a lowercase letter and contain alphanumeric characters, underscores, or hyphens (minimum 3 characters). - **version** (string) - Required - Dataset version. Can be in the format 'vX' or 'latest', where X is a number between 1 and 8, optionally followed by two more dot-separated numbers. #### Query Parameters - **grid** (Grid) - Required - Grid size of the tile to download. - **tile_id** (string) - Required - Tile ID of the tile to download. - **pixel_meaning** (string) - Required - Pixel meaning of the tile to download. ### Request Example (No request body for this GET request) ### Response #### Success Response (307) - (No specific fields described, implies a redirect) #### Response Example (Redirect to download URL) ``` -------------------------------- ### GET /geostore/{geostore_id} Source: https://data-api.globalforestwatch.org/index Retrieve GeoJSON representation for a given geostore ID of any dataset. If the provided ID is in UUID style, get from the GFW Data API. Otherwise, forward request to RW API. ```APIDOC ## GET /geostore/{geostore_id} ### Description Retrieve GeoJSON representation for a given geostore ID of any dataset. If the provided ID is in UUID style, get from the GFW Data API. Otherwise, forward request to RW API. ### Method GET ### Endpoint /geostore/{geostore_id} ### Parameters #### Path Parameters - **geostore_id** (string) - Required - geostore ID #### Header Parameters - **x-api-key** (string) - Required - X-Api-Key ### Response #### Success Response (200) - **data** (object) - Contains geostore information. - **created_on** (string) - Creation timestamp. - **updated_on** (string) - Update timestamp. - **gfw_geostore_id** (string) - GFW Geostore ID. - **gfw_geojson** (object) - GeoJSON representation. - **type** (string) - GeoJSON type. - **coordinates** (array) - GeoJSON coordinates. - **gfw_area__ha** (number) - Area in hectares. - **gfw_bbox** (array) - Bounding box coordinates. - **status** (string) - Status of the response (e.g., "success"). #### Response Example ```json { "data": { "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "gfw_geostore_id": "c4d9b2a2-ea1d-4630-9a25-32ca1539af6e", "gfw_geojson": { "type": "string", "coordinates": [ null ] }, "gfw_area__ha": 0, "gfw_bbox": [ 0 ] }, "status": "success" } ``` #### Error Response (422) Validation Error ``` -------------------------------- ### Delete Metadata Endpoint Example (HTTP) Source: https://data-api.globalforestwatch.org/index This is an example of an HTTP request to delete metadata for a specific dataset and version. It requires dataset and version identifiers in the URL path. Only owners or users with ADMIN roles can perform this action. ```http DELETE /dataset/{dataset}/{version}/metadata HTTP/1.1 Host: data-api.globalforestwatch.org ``` -------------------------------- ### POST /v0/land/tree_cover_loss_by_driver Source: https://data-api.globalforestwatch.org/openapi Creates a new tree cover loss by driver resource. ```APIDOC ## POST /v0/land/tree_cover_loss_by_driver ### Description Creates a new tree cover loss by driver resource. ### Method POST ### Endpoint /v0/land/tree_cover_loss_by_driver ### Parameters #### Request Body - **TreeCoverLossByDriverIn object** (object) - Required - Defines the parameters for creating the tree cover loss by driver resource. Expected to conform to `#/components/schemas/TreeCoverLossByDriverIn`. ### Response #### Success Response (202) - **DataMartResourceLinkResponse object** (object) - A link to the newly created resource. Expected to conform to `#/components/schemas/DataMartResourceLinkResponse`. #### Error Response (422) - **HTTPValidationError object** (object) - Returned if the request fails validation. Expected to conform to `#/components/schemas/HTTPValidationError`. ``` -------------------------------- ### Update Metadata Endpoint Example (HTTP) Source: https://data-api.globalforestwatch.org/index This is an example of an HTTP request to update metadata for a specific dataset and version. It requires dataset and version identifiers in the URL path and a JSON payload in the request body. Only owners or users with ADMIN roles can perform this action. ```http PATCH /dataset/{dataset}/{version}/metadata HTTP/1.1 Host: data-api.globalforestwatch.org Content-Type: application/json { "content_date_range": { "start_date": "2000-01-01", "end_date": "2021-04-06" }, "content_date_description": "2000 - present" } ``` -------------------------------- ### GET /datasets Source: https://data-api.globalforestwatch.org/openapi Retrieves a list of all available datasets. Supports pagination if `page[size]` or `page[number]` parameters are provided. ```APIDOC ## GET /datasets ### Description Retrieves a list of all available datasets. Supports pagination if `page[size]` or `page[number]` parameters are provided. ### Method GET ### Endpoint /datasets ### Parameters #### Query Parameters - **page[size]** (integer) - Optional - The number of datasets to return per page. - **page[number]** (integer) - Optional - The page number to retrieve. ### Response #### Success Response (200) - **datasets** (array) - A list of dataset objects. - **id** (string) - Unique identifier for the dataset. - **name** (string) - Name of the dataset. - **description** (string) - Description of the dataset. #### Response Example { "datasets": [ { "id": "dataset_1", "name": "Forest Cover", "description": "Global forest cover data" }, { "id": "dataset_2", "name": "Deforestation Alerts", "description": "Real-time deforestation alerts" } ] } ```