-
Notifications
You must be signed in to change notification settings - Fork 0
API Endpoints
Base URL: http://localhost:8080
GET /api/comments
Response 200 OK
[
{
"id": 1,
"content": "There is a broken ramp here.",
"author": { "id": 1 },
"createdAt": "2026-03-28T10:00:00"
}
]GET /api/comments/{id}
| Path Param | Type | Description |
|---|---|---|
id |
Long | Comment ID |
Response 200 OK — Comment object.
Response 404 Not Found — Comment does not exist.
GET /api/comments/author/{authorId}
| Path Param | Type | Description |
|---|---|---|
authorId |
Long | ID of the author (RegisteredUser) |
Response 200 OK — Array of comment objects. Returns empty array if none found.
GET /api/comments/report/{reportId}
| Path Param | Type | Description |
|---|---|---|
reportId |
Long | ID of the report |
Response 200 OK — Array of comment objects linked to the specified report. Returns empty array if none found.
POST /api/comments
Request Body
{
"content": "There is a broken ramp here.",
"author": { "id": 1 },
"report": { "reportId": 5 }
}| Field | Type | Required | Description |
|---|---|---|---|
content |
String | Yes | Text of the comment |
author |
Object | Yes | Must include id of an existing user |
report |
Object | No | Must include reportId of an existing report |
Response 200 OK
{
"id": 3,
"content": "There is a broken ramp here.",
"author": { "id": 1 },
"createdAt": "2026-03-28T10:00:00"
}
createdAtis set automatically on creation.
PUT /api/comments/{id}
| Path Param | Type | Description |
|---|---|---|
id |
Long | Comment ID to update |
Request Body
{
"content": "Updated comment text."
}Response 200 OK — Updated comment object.
Response 404 Not Found — Comment does not exist.
DELETE /api/comments/{id}
| Path Param | Type | Description |
|---|---|---|
id |
Long | Comment ID to delete |
Response 204 No Content
Response 404 Not Found — Comment does not exist.
GET /api/users
Response 200 OK
[
{ "id": 1 }
]GET /api/users/{id}
| Path Param | Type | Description |
|---|---|---|
id |
Long | User ID |
Response 200 OK
{ "id": 1 }Response 404 Not Found — User does not exist.
POST /api/users
Use
/auth/registerinstead for creating users with proper validation and password hashing.
Response 201 Created
{ "id": 2 }DELETE /api/users/{id}
| Path Param | Type | Description |
|---|---|---|
id |
Long | User ID to delete |
Response 204 No Content
Response 404 Not Found — User does not exist.
GET /api/reports
Response 200 OK — Array of ReportResponse objects.
GET /api/reports/{id}
| Path Param | Type | Description |
|---|---|---|
id |
Long | Report ID |
Response 200 OK — ReportResponse object.
Response 404 Not Found — Report does not exist.
GET /api/reports/user/{userId}
| Path Param | Type | Description |
|---|---|---|
userId |
Long | ID of the user |
Response 200 OK — Array of ReportResponse objects. Returns empty array if none found.
POST /api/reports
Request Body
{
"userId": 1,
"latitude": 41.0082,
"longitude": 28.9784,
"description": "Broken ramp at entrance.",
"tag": "BROKEN_ELEVATOR"
}| Field | Type | Required | Description |
|---|---|---|---|
userId |
Long | Yes | ID of the user creating the report |
latitude |
double | Yes | Geographic latitude |
longitude |
double | Yes | Geographic longitude |
description |
String | Yes | Max 1000 chars |
tag |
Enum | Yes |
MISSING_RAMP, BROKEN_ELEVATOR, NARROW_PASSAGE, WET_FLOOR, CONSTRUCTION, OTHER
|
Response 201 Created — ReportResponse object.
PUT /api/reports/{id}
| Path Param | Type | Description |
|---|---|---|
id |
Long | Report ID to update |
Request Body — Same structure as Create Report.
Response 200 OK — Updated ReportResponse object.
Response 404 Not Found — Report does not exist.
DELETE /api/reports/{id}
| Path Param | Type | Description |
|---|---|---|
id |
Long | Report ID to delete |
Response 204 No Content
Response 404 Not Found — Report does not exist.
POST /api/reports/{id}/verify
| Path Param | Type | Description |
|---|---|---|
id |
Long | Report ID to verify (upvote) |
Response 200 OK — Updated ReportResponse object with incremented agrees count.
POST /api/reports/{id}/unverify
| Path Param | Type | Description |
|---|---|---|
id |
Long | Report ID to unverify (downvote) |
Response 200 OK — Updated ReportResponse object with incremented disagrees count.
POST /api/reports/{id}/media
Content-Type: multipart/form-data
| Path Param | Type | Description |
|---|---|---|
id |
Long | Report ID to attach media to |
| Form-Data Field | Type | Description |
|---|---|---|
file |
MultipartFile | The media file (image/video) to upload |
Response 201 Created
{
"mediaUrl": "https://s3.bucket.url/to/media.jpg"
}Response 400 Bad Request — Invalid file.
Response 404 Not Found — Report ID not found.
GET /api/reports/ramp
Response 200 OK — Array of RampReportResponse objects.
GET /api/reports/ramp/{id}
| Path Param | Type | Description |
|---|---|---|
id |
Long | Ramp Report ID |
Response 200 OK — RampReportResponse object.
Response 404 Not Found — Ramp report does not exist.
POST /api/reports/ramp
Request Body (CreateRampReportRequest)
{
"userId": 1,
"latitude": 41.0082,
"longitude": 28.9784,
"description": "Steep incline on the ramp."
}Response 201 Created — RampReportResponse object.
POST /api/routes
Request Body (RouteRequest)
{
"startLat": 41.0082,
"startLon": 28.9784,
"endLat": 41.0090,
"endLon": 28.9800,
"mode": "WALKING"
}| Field | Type | Required | Description |
|---|---|---|---|
mode |
Enum | Yes | Mode of travel. Options: WALKING, WHEELCHAIR
|
Response 200 OK — Array of RouteResponse objects containing routing steps, geometry, and coordinates.
GET /api/sse/public/subscribe
Produces: text/event-stream
Subscribes the client to public server-side events (e.g., live notifications/updates).
All endpoints except
/auth/registerand/auth/loginrequire a JWT token in theAuthorizationheader:Authorization: Bearer <token>
POST /auth/register
Request Body
{
"name": "John Doe",
"email": "john@example.com",
"password": "securepassword"
}| Field | Type | Required | Validation |
|---|---|---|---|
name |
String | Yes | 2–50 characters |
email |
String | Yes | Valid email format |
password |
String | Yes | Min 8 characters |
Response 201 Created
{
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"role": "USER"
}Response 409 Conflict — Email already in use.
Response 400 Bad Request — Weak password or validation error.
POST /auth/login
Request Body
{
"email": "john@example.com",
"password": "securepassword"
}| Field | Type | Required | Validation |
|---|---|---|---|
email |
String | Yes | Valid email format |
password |
String | Yes | Non-blank |
Response 200 OK
{
"token": "<jwt-token>"
}Response 401 Unauthorized — Wrong email or password.
MISSING_RAMP, BROKEN_ELEVATOR, NARROW_PASSAGE, WET_FLOOR, CONSTRUCTION, OTHER
PENDING, VERIFIED, REJECTED
WALKING, WHEELCHAIR
| Field | Type | Description |
|---|---|---|
id |
Long | Auto-generated |
content |
String | Text of the comment |
author |
RegisteredUser | The user who wrote the comment |
createdAt |
LocalDateTime | Auto-set on creation (ISO 8601) |
| Field | Type | Description |
|---|---|---|
reportId |
Long | Auto-generated |
userId |
Long | ID of the user who created the report |
latitude |
double | Geographic latitude |
longitude |
double | Geographic longitude |
description |
String | Max 1000 chars |
tag |
Enum | Category |
status |
Enum | Default: PENDING
|
agrees |
int | Upvote count |
disagrees |
int | Downvote count |
publishDate |
LocalDateTime | Auto-set on creation (ISO 8601) |
mediaUrls |
List<String> | URLs of attached media files |
| Field | Type | Description |
|---|---|---|
reportId |
Long | Auto-generated |
userId |
Long | ID of the creator |
latitude |
double | Location latitude |
longitude |
double | Location longitude |
description |
String | |
status |
Enum | ReportStatus |
publishDate |
LocalDateTime | |
entryLatitude |
double | Computed/Associated entrance lat |
entryLongitude |
double | Computed/Associated entrance long |
exitLatitude |
double | Computed/Associated exit lat |
exitLongitude |
double | Computed/Associated exit long |
Team Members
- Lab 1 Report (12/02/2026)
- Lab 2 Report (19/02/2026)
- Lab 3 Report (26/02/2026)
- Lab 4 Report (05/03/2026)
- Lab 5 Report (12/03/2026)
- Lab 6 Report (26/03/2026)
- Lab 7 Report (02/04/2026)
- Lab 8 Report (16/04/2026)
- Lab 9 Report (30/04/2026)
- Lab 10 Report (07/05/2026)
- Weekly Meeting 1 (17.02.2026)
- Weekly Meeting 2 (26.02.2026)
- Weekly Meeting 3 (08.03.2026)
- Weekly Meeting 4 (12.03.2026)
- Weekly Meeting 4 'Extra' (14.03.2026)
- Weekly Meeting 5 (22.03.2026)
- Weekly Meeting 6 (28.03.2026)
- Weekly Meeting 7 (03.04.2026)
- Weekly Meeting 8 (14.04.2026)
- Weekly Meeting 9 (22.04.2026)
- Weekly Meeting 10 (08.05.2026)
- Frontend Meeting 1 (22.03.2026)
- Backend Meeting 1 (22.03.2026)
- Frontend Meeting 2 (28.03.2026)
- Backend Meeting 2 (28.03.2026)
- Frontend Meeting 3 (03.04.2026)
- Backend Meeting 3 (03.04.2026)
- Backend Meeting 4 (22.04.2026)
- Meeting with Arda Arslan (17.02.2026)
- Meeting with Özlem Belir (25.02.2026)
- Meeting with Suzan Üsküdarlı (17.04.2026)
Mapcess