Comment Create

URL

http://api.pm0603.com/api_comment/

Method

POST

Header

Key Value
Authorization Token [token ket value]

Data Params

Key Value
body 리뷰 본문
content 리뷰를 등록할 content

URL Params

None

Success Response

  • Code: 201
{
  "content": 1,
  "user": 1,
  "body": "test1",
  "created_date": "2017-04-25T09:54:14.875039Z",
  "id": 1
}

Response Detail

Key Type Value
content int content 번호
user str 작성자
body str 리뷰 본문
created_date date 작성일

Error Response

  • Code: 400
    • Reason
      • 필수 요소 누락
      • 잘 못 된 값 입력
      • 없는 콘텐츠
  • Code: 401
    • Reason: Invalid token
{
  "content": [
    "This field is required."
  ],
  "body": [
    "This field is required."
  ]
}
{
  "content": [
    "Incorrect type. Expected pk value, received str."
  ]
}
{
  "content": [
    "Invalid pk \"콘텐츠 번\" - object does not exist."
  ]
}
{
  "detail": "Invalid token."
}

results matching ""

    No results matching ""