Delete Report
Delete Report
DELETE
/api/v1/user-reports/{id}Description
Soft-delete a user report. The report is retained in the database, but is excluded from queries by default.
Authentication
Requires a Bearer token in the Authorization header or a token query parameter. Only the user who created the report or an admin may delete it.
Path Parameters
- id: UUID of the report to delete.
Response
Returns the soft-deleted User Report object.
Error Responses
- 400 Bad Request: Invalid report id.
- 401 Unauthorized: Token is missing or invalid.
- 403 Forbidden: Caller is not the report owner or an admin.
- 404 Not Found: Report does not exist.
- 410 Gone: Report has already been deleted.
Example Request
DELETE https://api.vectorcharts.com/api/v1/user-reports/550e8400-e29b-41d4-a716-446655440000
Authorization: Bearer <token>
Example Response
Status Code: 200 OK
Response Body:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"reportType": "hazard",
"latitude": 42.36,
"longitude": -71.05,
"properties": {},
"upvoteCount": 3,
"downvoteCount": 1,
"isOwner": true,
"externalUserId": "app-user-abc123",
"namespace": "public",
"createdAt": 1718380800000,
"updatedAt": 1718381100000,
"expiredAt": null,
"deletedAt": 1718381100000
}