REST API documentation for the TURFInsight SAAS platform v0.1.0
Response
{ "status": "ok", "version": "0.1.0", "courses": 1 }
Response
{ "courses": [{ "id": "...", "name": "Castle Pines", "slug": "castle_pines", ... }] }
| Param | Type | Info |
|---|---|---|
| slug | string | required URL slug |
Request Body (JSON)
{ "name": "My Course", "slug": "my_course", "bounds_xmin": -105.0, "bounds_ymin": 39.5, "bounds_xmax": -104.9, "bounds_ymax": 39.6 }
| Query Param | Type | Info |
|---|---|---|
| severity | string | high | medium | low | info |
| status | string | open | resolved |
| limit | int | Max results (default: all) |
Multipart Fields
| Field | Type | Info |
|---|---|---|
| photo | file | required JPEG/PNG image |
| metadata | JSON | required Observation data |
Metadata JSON
{
"latitude": 39.738, "longitude": -104.99,
"captured_at": "2026-03-08T12:00:00Z",
"severity": "medium", "category": "Disease",
"description": "Brown patch on green 5",
"inspector": "Field Inspector"
}
💡 EXIF fallback: If lat/lng are 0, GPS coords are extracted from photo EXIF data.
Multipart Fields
| Field | Type | Info |
|---|---|---|
| photo1, photo2, … | file | Multiple JPEG/PNG images |
| metadata | JSON | Shared batch metadata (severity, category, etc.) |
Response
{ "total": 5, "created": 5, "results": [{ "id": "...", "status": "created" }] }
Returns the original JPEG image as image/jpeg.
Returns a 400px-wide JPEG thumbnail. Auto-generated on upload.
{ "status": "resolved", "severity": "low", "description": "Fixed" }
Deletes observation record, photo file, and thumbnail.
| Query | Type | Info |
|---|---|---|
| group_id | string | Filter by annotation group |
| type | string | point | linestring | polygon | circle |
{
"group_id": "group-uuid", "geometry_type": "polygon",
"geometry_json": "{\"type\":\"Polygon\",\"coordinates\":...}",
"label": "Green 5 boundary", "color": "#8dc63f"
}
Send a GeoJSON FeatureCollection in the request body.