Membership Create
Membership object를 생성합니다.
URL/member/membership/
MethodPOST
Header
Key | Description | Value | Type | Require |
---|---|---|---|---|
Authorization | 요청을 보내는 유저의 token | user token | String | True |
Input data
Key | Description | Value | Type | Require | Default |
---|---|---|---|---|---|
group | 가입하려는 group의 pk | group pk | Integer | True | - |
Success response
HTTP Status code201
Content
{
"user": 1,
"group": 1,
"joined_date": "2017-08-17T08:41:33.951197Z"
}
Error response
User already joined group error
HTTP Status code400
Content
{
"group": [
"이미 가입한 그룹입니다."
]
}
Group does not exist error
HTTP Status code400
Content
{
"group": [
"유효하지 않은 pk \"10\" - 객체가 존재하지 않습니다."
]
}
Unauthorized error
HTTP Status code401
Content
{
"detail": "자격 인증데이터(authentication credentials)가 제공되지 않았습니다."
}