-
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.
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
{
"reportId": 1,
"userId": 1,
"latitude": 41.0082,
"longitude": 28.9784,
"description": "Broken ramp at entrance.",
"tag": "BROKEN_ELEVATOR",
"status": "PENDING",
"agrees": 0,
"disagrees": 0,
"publishDate": "2026-03-28T10:00:00",
"mediaUrls": []
}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.
MISSING_RAMP, BROKEN_ELEVATOR, NARROW_PASSAGE, WET_FLOOR, CONSTRUCTION, OTHER
PENDING, VERIFIED, REJECTED
| 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 |
Media upload will rely on an external service (AWS or Firebase);
mediaUrlsstores the returned URLs.
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.
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