Common
- Error Message์ ๋ํ ์ ์๋ ์ด๊ณณ์ ์ฐธ๊ณ ํด์ฃผ์ธ์.
- ๋ชจ๋ Request, Response๋
JSON
์ ์ฌ์ฉํฉ๋๋ค.
- API ์ํ์ ๋ฐ๋ผ success ๊ฐ์ด ๋ณ๊ฒฝ๋ฉ๋๋ค.
- API ์ฑ๊ณต์ผ ์ message ๊ฐ์
null
์ด ๋ฐํ๋ฉ๋๋ค.
- API ์คํจ์ผ ์ data ๊ฐ์
null
์ด ๋ฐํ๋ฉ๋๋ค.
Authentication
Register
POST
/api/register/
Request
{
"email": "์ด๋ฉ์ผ",
"realname": "์ค๋ช
",
"username": "๋๋ค์",
"password": "๋น๋ฐ๋ฒํธ"
}
Response
{
"success": true,
"message": null,
"data": {
"user_id": "uuid",
"email": "์ด๋ฉ์ผ",
"realname": "์ค๋ช
",
"username": "๋๋ค์",
"created_at": "์์ฑ์ผ",
"updated_at": "์์ ์ผ",
"last_login": "์ต๊ทผ ๋ก๊ทธ์ธ ๋ ์ง",
"is_superuser": false
}
}
Login
POST
/api/login/
Request
{
"email": "์ด๋ฉ์ผ",
"password": "๋น๋ฐ๋ฒํธ"
}
Response
{
"success": true,
"message": null,
"data": {
"user": {
"user_id": "uuid",
"email": "์ด๋ฉ์ผ",
"realname": "์ค๋ช
",
"username": "๋๋ค์",
"created_at": "์์ฑ์ผ",
"updated_at": "์์ ์ผ",
"last_login": "์ต๊ทผ ๋ก๊ทธ์ธ ๋ ์ง",
"is_superuser": false
},
"token": "JWT Token"
}
}
Me
GET
/api/me/
Response
{
"success": true,
"message": null,
"data": {
"user_id": "uuid",
"email": "์ด๋ฉ์ผ",
"realname": "์ค๋ช
",
"username": "๋๋ค์",
"created_at": "์์ฑ์ผ",
"updated_at": "์์ ์ผ",
"last_login": "์ต๊ทผ ๋ก๊ทธ์ธ ๋ ์ง",
"is_superuser": false
}
}