REST API endpoints for managing location markers in the system
/markerGets all markers currently in the database
[
{
"id": "1",
"position": [
51.52016005,
-0.16030636023550826
],
"description": "Cat in the hat is lost",
"title": "Lost Cat",
"urgency": "High",
"category": "Crime",
"status": "Active",
"address": {
"street": "Beck Dr",
"city": "Markham",
"state": "Ontario",
"postal_code": "",
"country": "Canada"
},
"createdAt": "2025-10-05T10:30:00Z",
"updatedAt": "2025-10-05T10:30:00Z"
}
]/markerCreate a new marker with required fields
Example
{
"position": [
51.52016005,
-0.16030636023550826
],
"description": "Cat in the hat is lost",
"title": "Lost Cat",
"urgency": "High",
"category": "Crime",
"address": {
"street": "Beck Dr",
"city": "Markham",
"state": "Ontario",
"postal_code": "",
"country": "Canada"
}
}{
"id": "2",
"position": [
51.52016005,
-0.16030636023550826
],
"description": "Cat in the hat is lost",
"title": "Lost Cat",
"urgency": "High",
"category": "Crime",
"status": "Active",
"address": {
"street": "Beck Dr",
"city": "Markham",
"state": "Ontario",
"postal_code": "",
"country": "Canada"
},
"createdAt": "2025-10-05T10:30:00Z",
"updatedAt": "2025-10-05T10:30:00Z"
}{
"error": "Validation failed",
"message": "Missing required field: position",
"details": {
"field": "position",
"code": "REQUIRED_FIELD_MISSING"
}
}/submit-report-geminiSubmit a report description to Gemini AI for automated report generation. Returns a structured report object based on the description provided.
Example
{
"description": "There's a large pothole on Main Street near the intersection with Oak Avenue that's causing damage to cars"
}{
"report": {
"category": "Infrastructure",
"position": [
43.6532,
-79.3832
],
"title": "Large Pothole Report",
"urgency": "Medium",
"description": "Large pothole on Main Street near Oak Avenue intersection causing vehicle damage",
"address": {
"street": "Main Street & Oak Avenue",
"city": "Toronto",
"state": "Ontario",
"postal_code": "M5V 1A1",
"country": "Canada"
}
}
}{
"error": "Validation failed",
"message": "Description is required",
"details": {
"field": "description",
"code": "REQUIRED_FIELD_MISSING"
}
}{
"error": "AI Processing Error",
"message": "Failed to process report with Gemini AI",
"details": {
"code": "GEMINI_API_ERROR"
}
}