๐ก Strawberry Creek API Documentation
The Strawberry Creek Monitoring API provides real-time and historical environmental sensor data. Query data by creek site, time range, and variables โ and build on top of our open-source water monitoring system. Reading data is open and needs no token; only uploading new readings requires one.
๐ GET Endpoint
GET /api/creek-data/
๐ Reading Data (no token)
Reading data with GET is open โ no token or Authorization header is required. (A token is only needed to upload data; see below.)
๐ฅ Required Parameters (GET)
siteโ table name (e.g.north_fork_0)startโ start time (ISO 8601 format)endโ end time (ISO 8601 format)varsโ comma-separated list of columns to return (e.g.vars=Meter_Hydros21_Cond,Meter_Hydros21_Temp)
๐ Notes on vars
timestampis always included in the response โ you don't need to list it invars.- Names in
varsthat don't exist on that site's table are ignored. If none of them match, the response is an empty list.
๐งช Example GET Request
curl "https://www.strawberrycreek.org/api/creek-data/?site=north_fork_0&start=2025-04-01T00:00:00&end=2025-04-07T00:00:00&vars=Meter_Hydros21_Cond"
๐ฆ Example GET Response
[
{
"timestamp": "2025-04-06 01:45:00",
"Meter_Hydros21_Cond": 419.7
},
{
"timestamp": "2025-04-06 02:00:00",
"Meter_Hydros21_Cond": 419.7
}
]
๐ค Upload Sensor Data
Send new sensor data to a specific creek site (table).
๐ Endpoint
POST /api/upload-sensor-data/
๐ Authentication (POST)
Uploads require an API token in the request header:
Authorization: Token your_token_here
๐ฅ Required JSON Fields
siteโ table name (e.g.north_fork_0)timestampโ ISO datetime (e.g.2025-05-01T13:00:00)
๐ Optional JSON Fields
Meter_Hydros21_CondMeter_Hydros21_DepthMeter_Hydros21_TempEnviroDIY_Mayfly_BattEnviroDIY_Mayfly_SignalTE_TR_525USW_Precip_5minTotalSensirion_SHT40_HumiditySensirion_SHT40_TemperatureAOSong_AM2315C_TempAOSong_AM2315C_Humidity
๐งช Example POST Request
curl -X POST https://www.strawberrycreek.org/api/upload-sensor-data/ \
-H "Authorization: Token your_token_here" \
-H "Content-Type: application/json" \
-d '{
"site": "north_fork_0",
"timestamp": "2025-05-01T13:00:00",
"Meter_Hydros21_Cond": 123.45,
"EnviroDIY_Mayfly_Batt": 3.9
}'
๐ฆ Success Response
{
"message": "Data inserted successfully."
}
๐ซ Error Responses
400โ Missing or invalid parameters401โ Authentication credentials were not provided404โ Site/table not found500โ Internal server error
๐ฎ Get a Token
You only need a token to upload sensor data โ reading data back out is open and needs no token.
Email us at strawberrycreekmonitoringgroup@gmail.com to get an API token for uploads.
Already have an account? Fill out this form: