Skip to content

api_spec

choisungwook edited this page Oct 8, 2021 · 29 revisions

๊ฐœ์š”

  • api ์ŠคํŽ™

ํšŒ์› API

ํšŒ์› ์ „์ฒด ์กฐํšŒ

  • api: /users
  • http method: GET
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8

ํšŒ์›๊ฐ€์ž…

  • api: /signup
  • http method: POST
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8
  • request_body
{
    "email": "hello@world.com",
    "password": "password",
    "nickname": "testuser"
}
  • ์„ฑ๊ณต ์‘๋‹ต
{
  "id": "1" # ์ƒ์„ฑ id
}

์นดํ…Œ๊ณ ๋ฆฌ ์กฐํšŒ

  • api: /category/{category_id}
  • http method: GET
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8

์นดํ…Œ๊ณ ๋ฆฌ ์ƒ์„ฑ

  • api: /category
  • http method: POST
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8
Authorization: "bearer <ํ† ํฐ>"
  • request_body
{
    "title": "",
}

์นดํ…Œ๊ณ ๋ฆฌ ์ˆ˜์ •

  • api: /category/{category_id}
  • http method: PUT
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8
Authorization: "bearer <ํ† ํฐ>"
  • request_body
{
    "title": "",
}

์นดํ…Œ๊ณ ๋ฆฌ ์‚ญ์ œ

  • api: /category/{category_id}
  • http method: DELETE
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8
Authorization: "bearer <ํ† ํฐ>"

์ปค๋ฎค๋‹ˆํ‹ฐ ๊ฒŒ์‹œํŒ ์กฐํšŒ

  • api: /board
  • http method: GET
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8

์ปค๋ฎค๋‹ˆํ‹ฐ ํšŒ์›๋ณ„ ๊ฒŒ์‹œํŒ ์กฐํšŒ

  • api: /board/{account_id}
  • http method: GET
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8

์ปค๋ฎค๋‹ˆํ‹ฐ ํŠน์ • ๊ฒŒ์‹œ๋ฌผ ์กฐํšŒ

  • api: /board/{board_id}
  • http method: GET
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8

์ปค๋ฎค๋‹ˆํ‹ฐ ๊ฒŒ์‹œ๋ฌผ ์ž‘์„ฑ

  • api: /board
  • http method: POST
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8
Authorization: "bearer <ํ† ํฐ>"
  • request_body
{
    "content": "",
    "account": {}
}

์ปค๋ฎค๋‹ˆํ‹ฐ ๊ฒŒ์‹œ๋ฌผ ์ˆ˜์ •

  • api: /board/{board_id}
  • http method: PUT
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8
Authorization: "bearer <ํ† ํฐ>"
  • request_body
{
    "content": "",
}

์ปค๋ฎค๋‹ˆํ‹ฐ ๊ฒŒ์‹œ๋ฌผ ์‚ญ์ œ

  • api: /board/{board_id}
  • http method: DELETE
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8
Authorization: "bearer <ํ† ํฐ>"