Post Create
Post object를 생성합니다.
URL
/post/
Method
POST
URL Params
Key | Description | Value | Type | Require |
---|---|---|---|---|
group | 글을 작성할 그룹의 pk | group pk | Integer | True |
content | 작성할 내용 | post content | String | True |
image | 첨부할 사진 | post image | Image File | False |
video | 첨부할 영상 주소(Youtube) | youtube url | String | False |
Success Response
HTTP Status Code
201
content
{
"pk": 1,
"group": 1,
"content": "first content",
"image": null,
"video": null
}
Error response
Post content validation error
HTTP Status code400
Content
{
"content": [
"이 항목을 채워주십시오."
]
}
Request user is not member error
HTTP Status code
400
Content
{
"non_field_errors": [
"속한 그룹이 아닙니다."
]
}
Unauthorized error
HTTP Status code401
Content
{
"detail": "자격 인증데이터(authentication credentials)가 제공되지 않았습니다."
}