API Specs - Sustagram/conference-note GitHub Wiki

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
    }
}