diff --git a/docs/rest_api.md b/docs/rest_api.md index b17d912..ca910e4 100644 --- a/docs/rest_api.md +++ b/docs/rest_api.md @@ -1,6 +1,8 @@ # GMN REST API -The GMN REST API provides an interface to query and retrieve meteor trajectory data by constructing read-only SQL queries on the GMN Data Store database. +The GMN REST API provides an interface to query and retrieve meteor trajectory data by constructing read-only SQL queries on the [GMN Data Store](https://explore.globalmeteornetwork.org/gmn_data_store) database. + +We use [Datasette](https://docs.datasette.io/en/0.64.6/json_api.html) to provide the REST API. ## HTTP GET Requests @@ -27,6 +29,8 @@ You can use this when making subsequent requests to the endpoint to ensure you a Queries are cached for 1 hour with a maximum size of 1GB on the server. The cache is invalidated if the GMN Data Store database has been modified by our data ingestion processes which usually run twice a day. +Queries are blocked if they take longer than 3 seconds to execute. I recommend using [EXPLAIN QUERY PLAN](https://www.sqlite.org/eqp.html) to check the query execution plan before running a query. If you need to run a long-running query, please contact us. + ### The Meteor Summary REST API Endpoint The Meteor Summary REST API Endpoint allows you to retrieve meteor properties from the GMN Data Store in a combined format. The properties available are described here: @@ -59,6 +63,8 @@ The final page of results will include no data. Queries are cached for 1 hour with a maximum size of 1GB on the server. The cache is invalidated if the GMN Data Store database has been modified by our data ingestion processes. +Queries are blocked if they take longer than 3 seconds to execute. I recommend using [EXPLAIN QUERY PLAN](https://www.sqlite.org/eqp.html) to check the query execution plan before running a query. If you need to run a long-running query, please contact us. + ### Examples #### Get the number of stations in the network diff --git a/src/gmn_python_api/gmn_rest_api.py b/src/gmn_python_api/gmn_rest_api.py index d341685..57b45c6 100644 --- a/src/gmn_python_api/gmn_rest_api.py +++ b/src/gmn_python_api/gmn_rest_api.py @@ -1,7 +1,7 @@ """ This module contains functions to read data from the GMN REST API. The REST API uses the Datasette API endpoint. More info: -https://gmn-python-api.readthedocs.io/en/0.64.6/rest_api.html +https://gmn-python-api.readthedocs.io/en/latest/rest_api.html """ import json