RoadWatch Public API

A read-only API providing access to verified pothole reports for public use, research, and visualization.

Overview

  • Publicly accessible
  • Read-only (GET requests only)
  • No authentication required
  • Only verified data should be displayed

Endpoint

GET /api/admin/reports

Returns a list of all pothole reports. Clients are expected to filter reports with status = "approved".

Example Request

fetch('/api/admin/reports')
                            .then(res => res.json())
                            .then(data => {
                                const approved = data.filter(r => r.status === "approved");
                                console.log(approved);
                            });

Example Response

[
  {
    "id": 12,
    "image_url": "https://.../reports/pothole.jpg",
    "location": "Near Borjhar Airport Gate",
    "lat": 26.1062,
    "lng": 91.5859,
    "severity": 4,
    "governing_body": "Municipal Corporation",
    "status": "approved",
    "created_at": "2025-12-20T15:42:11.123Z"
  }
]

Response Fields

id – Unique report ID

image_url – Public image URL

location – Location description

lat, lng – GPS coordinates

severity – Scale from 1–5

governing_body – Responsible authority

status – approved / pending / rejected

created_at – Timestamp

Recommended Usage

  • Filter approved reports only
  • Display on maps or dashboards
  • Use severity to prioritize issues
  • Respect public data usage

RoadWatch Public API · Read‑only · Open Data Initiative