๐ก Strawberry Creek API Documentation
The Strawberry Creek Monitoring API provides authenticated access to 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.
๐ GET Endpoint
GET /api/creek-data/
๐ Authentication (GET)
All requests require a token in the header:
Authorization: Token your_token_here
๐ฅ Required Parameters (GET)
site
โ table name (e.g.north_fork_0
)start
โ start time (ISO 8601 format)end
โ end time (ISO 8601 format)
๐ Optional Parameters (GET)
vars
โ repeatable param to filter specific columns (e.g. vars=timestamp
&vars=Meter_Hydros21_Cond
)
๐งช Example GET Request
curl -H "Authorization: Token abc123..." \
"https://www.strawberrycreek.org/api/creek-data/?site=north_fork_0&start=2025-04-01T00:00:00&end=2025-04-07T00:00:00&vars=timestamp&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)
Same as GET: provide your 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_Cond
Meter_Hydros21_Depth
Meter_Hydros21_Temp
EnviroDIY_Mayfly_Batt
EnviroDIY_Mayfly_Signal
TE_TR_525USW_Precip_5minTotal
Sensirion_SHT40_Humidity
Sensirion_SHT40_Temperature
AOSong_AM2315C_Temp
AOSong_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
Email us at strawberrycreekintern@gmail.com to get your personal access token.
Already have an account? Fill out this form: