You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 38 Next »

As of January 2020 GLTG has 32,122,836 datapoints. 

WARNING Please don't fetch all of them at once.


Step 1: Create an Account 

Step 2: Acquire Data from API

You can acquire the data from API by using curl command or python library (we provide the example in jupyter notebook in attached)

Using CURL

Get all Sensors in JSON format

Currently, pulling sensors does not require authentication.

InputsOutput typeOutput Example
url

JSON



Get all Sensors
curl -X GET --compressed https://greatlakestogulf.org/geostreams/api/sensors


Authenticate

InputsOutputDetails
  • url
  • email
  • password
X-Auth-TokenUse the token for fetching datapoints


Authenticate
curl -X POST -H 'Content-Type: application/json' -d '{"password": "****", "identifier": "email"}' --compressed -i https://greatlakestogulf.org/geostreams/api/authenticate



taskcurlinputsinstructionsreturns
authenticate

curl -X POST -H 'Content-Type: application/json' -d '{"password": "****", "identifier": "email"}' --compressed -i https://greatlakestogulf.org/geostreams/api/authenticate

  • password
  • email
In the response will be X-Auth-Token: followed by the alphanumeric security tokenX-Auth-Token
get all datapoints for a single sensorcurl -X GET -H 'Content-Encoding: application/json' -H 'x-auth-token:token' --compressed 'https://greatlakestogulf.org/geostreams/api/datapoints?sensor_id=22&since=2018-06-01'
  • token
  • sensor_id
  • since
Use X-Auth-Token from authenticationjson


Using Python Library (pyGeotemporal)

<< insert code example here>>

<< need to have instruction how to get pyGeotemporal >>




Jupyter Notebook 

Jupyter notebook example can be download here geostreams_jupyter.ipynb







  • No labels