Delete
저장한 코멘트 삭제하는 API
Request (요청)
URL
https://soobook.devlim.net/api/book/comment/
Method
DELETE
Params
URL Params
None
Data Params
name | value | type |
---|---|---|
comment_id | Comment PK | integer |
Header
name | value | type |
---|---|---|
Authorization | Token <발급받은 토큰 key> | string |
Response (응답)
Success Response
- Code: 200
- Content :
{
"detail": "Successfully deleted."
}
Error Response
- Code: 401
- Reason: 헤더에
Authorization: Token
이 없는 경우 - Content
{
"detail": "Incorrect authentication credentials."
}
- Code: 401
- Reason: 유효하지 않은 토큰 키를 입력하는 경우
- Content:
{
"detail": "Invalid token."
}
- Code: 403
- Reason: 본인 소유의 게시물이 아닌 경우
- Content:
{
"detail": "You do not have permission to perform this action."
}
- Code: 400
- Reason: 키(comment_id)가 없는 경우
- Content
{
"ios_error_code": "4002",
"comment_id": [
"This field is required."
]
}
- Code: 400
- Reason: 키의 값이 없는 경우
- Content
{
"ios_error_code": "4003",
"comment_id": [
"This field may not be blank."
]
}
- Code: 400
- Reason: 유효하지 않은 comment_id를 입력하는 경우
- Content
{
"ios_error_code": "4004",
"detail": "Invalid comment_id."
}