A REST API to serve the band-management app BandBook
This document describes the endpoints of the Comment API in the application. The API allows for creating, retrieving, updating, and deleting comments.
Base URL: /api/v1/comment
- URL:
/api/v1/comment
- Method:
POST
- Body:
CommentRequest
object
- Response:
201 Created
on success400 BadRequest
with error message on failure
- Description:
Creates a new comment based on the provided
CommentRequest
data.
- URL:
/api/v1/comment
- Method:
GET
- Response:
- Array of
CommentResponse
objects
- Array of
- Description: Retrieves a list of all comments.
- URL:
/api/v1/comment/{id}
- Method:
GET
- URL Parameters:
id
[Integer]: The ID of the comment to retrieve.
- Response:
CommentResponse
object on success400 BadRequest
with error message on failure
- Description: Retrieves a specific comment by its ID.
- URL:
/api/v1/comment/{id}
- Method:
PATCH
- URL Parameters:
id
[Integer]: The ID of the comment to update.
- Body:
CommentRequest
object
- Response:
204 NoContent
on success400 BadRequest
with error message on failure
- Description: Updates the content of an existing comment identified by its ID.
- URL:
/api/v1/comment/{id}
- Method:
DELETE
- URL Parameters:
id
[Integer]: The ID of the comment to delete.
- Response:
204 NoContent
on successful deletion400 BadRequest
with error message on failure
- Description: Deletes a comment identified by its ID.
- Structure of the request body used for creating or updating comments.
- Structure of the response returned when fetching comments.