Endpoints
| Method | Path | Auth Required |
|---|---|---|
| GET | /api/ratings | ADMIN only |
| GET | /api/ratings/{id} | None (public) |
| GET | /api/ratings/user/{userId} | USER, ADMIN, or ORGANIZER |
| POST | /api/ratings | USER, ADMIN, or ORGANIZER |
| PUT | /api/ratings/{id} | USER, ADMIN, or ORGANIZER |
| DELETE | /api/ratings/{id} | USER, ADMIN, or ORGANIZER |
GET /api/ratings
Returns a paginated list of all ratings on the platform. Auth: Bearer token required. Role: ADMIN only.Query Parameters
Optional search string to filter ratings. Defaults to an empty string.
Page number for pagination. Defaults to
1.Response Fields
Indicates whether the request was successful.
HTTP status code of the response.
Human-readable message describing the result.
List of rating objects.
Example
GET /api/ratings/
Returns a single rating by its UUID. Auth: None required.Path Parameters
The unique identifier of the rating.
Response Fields
The rating object.
Example
GET /api/ratings/user/
Returns the average rating score for a specific user (organizer). Auth: Bearer token required. Roles: USER, ADMIN, or ORGANIZER.Path Parameters
The ID of the user (organizer) whose average rating to retrieve.
Response Fields
The average rating score for the specified user.
Example
POST /api/ratings
Submits a new rating for an event and its organizer. Auth: Bearer token required. Roles: USER, ADMIN, or ORGANIZER.Request Body
The ID of the user submitting the rating. Typically resolved from the authenticated token.
The ID of the event being rated.
The ID of the event organizer being rated.
The rating score. Must be between
0 and 5 (inclusive).Response Fields
The newly created rating object.
Example
PUT /api/ratings/
Updates the score of an existing rating. Auth: Bearer token required. Roles: USER, ADMIN, or ORGANIZER.Path Parameters
The unique identifier of the rating to update.
Request Body
The updated rating score. Must be between
0 and 5 (inclusive).Response Fields
The updated rating object.
Example
DELETE /api/ratings/
Deletes a rating. Auth: Bearer token required. Roles: USER, ADMIN, or ORGANIZER.Path Parameters
The unique identifier of the rating to delete.
Response Fields
The deleted rating object.