Table of Contents |
---|
Step 1:
As of January 2020 GLTG has 32,122,836 datapoints. Please don't fetch all of them at once.
The best way to get datapoints by sensor id in the example below.
Create an Account
- go to: https://greatlakestogulf.org/geostreams
- Click "Sign Up"
- Fill out form
- Ignore check email
Jupyter Notebook
Get sensors in CSV, datapoints in CSV or JSON
Examples using Curl
...
- You're done
Step 2: Acquire Data from API by using CURL
You can acquire the data from API by using curl command
Get all Sensors in JSON format
Currently, pulling sensors does not require authentication.
Inputs | Output type | Output Example | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
url | JSON |
|
Code Block | ||
---|---|---|
| ||
curl -X GET --compressed |
...
https://greatlakestogulf.org/geostreams/api/sensors |
...
Authenticate
Inputs | Output | Details |
---|---|---|
| X-Auth-Token | Use the token for fetching datapoints |
Code Block | ||
---|---|---|
| ||
curl -X POST -H 'Content-Type: application/json' -d |
...
'{"password": "****", "identifier": "email"}' --compressed -i https://greatlakestogulf.org/geostreams/api/authenticate |
...
- password
...
Get all Datapoints for Single Sensor
We request that a user not try to pull all datapoints concurrently. It is preferred that datapoints be pulled in series by sensor id.
Inputs | Output Type | Details | Example Return | |||||||
---|---|---|---|---|---|---|---|---|---|---|
| JSON | Use X-Auth-Token from authentication |
|
Code Block | ||
---|---|---|
| ||
curl -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
...