Skip to content

Comment

Finn Lippok edited this page Jul 1, 2023 · 4 revisions

REST API /api/v1/comment/

⚠️ Authorization Header: All requests must contain a Authorization Header.

Authorization Bearer {JWT-Token}

Create new Comment

Request

Endpoint: POST /api/v1/comment

{
  "content": "String",
  "post_id": "UUID"
}

Response

{
  "id": "UUID",
  "content": "String",
  "user_id": "UUID",
  "user_name": "String",
  "date": "Datetime",
}

Get Comments of Post

Request

Endpoint: GET /api/v1/comment/ {post_id}/{page}

Response

{
  "id": "UUID",
  "content": "String",
  "user_id": "UUID",
  "user_name": "String",
  "date": "Datetime",
}

Delete Comments

Request

Endpoint: DELETE /api/v1/comment/ {comment_id}

Response

{
  "id": "UUID",
  "content": "String",
  "user_id": "UUID",
  "user_name": "String",
  "date": "Datetime",
}

Update Comments

Request

Endpoint: PUT /api/v1/comment/ {comment_id}

{
  "content": "String",
  "post_id": "UUID"
}

Response

{
  "id": "UUID",
  "content": "String",
  "user_id": "UUID",
  "user_name": "String",
  "date": "Datetime",
}

Get Comments

Request

Endpoint: GET /api/v1/comment/ {comment_id}

Response

{
  "id": "UUID",
  "content": "String",
  "user_id": "UUID",
  "user_name": "String",
  "date": "Datetime",
}

Clone this wiki locally