Likes

Like a post to show appreciation

post/posts/{postId}/likes

Request

  • Base URL
    http://localhost:8080/api
  • URL
    http://localhost:8080/api/posts/{postId}/likes
  • Auth
    none declared

Path parameters

postIdstring uuid required
Example:123e4567-e89b-12d3-a456-426614174000

Unique identifier of the post

Request body

usernamestring required

Username of the user liking the post

Example request

{
  "username": "mike_wilson"
}

Response

Post liked successfully

postIdstring uuid required

ID of the liked post

usernamestring required

Username who liked the post

likedAtstring date-time required

Timestamp when the post was liked

Example response

{
  "postId": "123e4567-e89b-12d3-a456-426614174000",
  "username": "mike_wilson",
  "likedAt": "2025-06-01T12:00:00Z"
}

Changes

    • breaking

      added the new path request parameter postId

    • breaking

      the response's property type changed from object to array for status

    • breaking

      the response's property type changed from object to array for status

    • breaking

      the response's property type changed from object to array for status

    • breaking

      the request property's minLength was increased from 0 to 1

    • warning

      deleted the path request parameter postId

    • warning

      the request property's maxLength was set to 50

    • info

      added the media type application/json for the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status