๐Ÿ“ก Strawberry Creek API

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.

๐Ÿ”— Endpoint

GET /api/creek-data/

๐Ÿ” Authentication

All requests require a token in the header:

Authorization: Token your_token_here

๐Ÿ“ฅ Required Parameters

๐ŸŽ› Optional Parameters

๐Ÿงช Example Request

curl -H "Authorization: Token abc123..." \"https://www.strawberrycreek.org/api/creek-data/?site=fancy_1&start=2025-04-01T00:00:00&end=2025-04-07T00:00:00&vars=timestamp&vars=Meter_Hydros21_Cond"

๐Ÿ“ฆ Example 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

Same as GET: provide your token in the request header.

Authorization: Token your_token_here

๐Ÿ“ฅ Required JSON Fields

๐ŸŽ› Optional JSON Fields

๐Ÿงช Example 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": "fancy_1",
    "timestamp": "2025-05-01T13:00:00",
    "Meter_Hydros21_Cond": 123.45,
    "EnviroDIY_Mayfly_Batt": 3.9
  }'

๐Ÿ“ฆ Success Response

{
  "message": "Data inserted successfully."
}

๐Ÿšซ Error Responses

๐Ÿ“ฎ Need a Token?

Email us at strawberrycreekintern@gmail.com to get your personal access token.

Already have an account? Fill out this form