Skip to content

api_spec

ImHyeJeong edited this page Dec 12, 2021 · 29 revisions

๊ฐœ์š”

  • api ์ŠคํŽ™

ํšŒ์› API

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

  • api: /api/v1/user/signup
  • http method: POST
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8
  • request_body
{
    "email": "[email protected]",
    "password": "password",
    "nickname": "testuser"
}
  • ์„ฑ๊ณต ์‘๋‹ต
201 CREATED
{
  "id": "1" ; ์ƒ์„ฑ id
}

๋กœ๊ทธ์ธ

  • api: /api/v1/user/signin
  • http method: POST
  • request_body: json
{
  "email": "",
  "password": ""
}
  • ์„ฑ๊ณต ์‘๋‹ต
    • status_code: 200 OK
    • header Authorization bearer return
  • ์‹คํŒจ ์‘๋‹ต
    • status_code: 401 Unauthorized

๋กœ๊ทธ์•„์›ƒ (to do)

  • api: /api/v1/user/logout

  • http method: POST

  • ์„ฑ๊ณต ์‘๋‹ต

200 OK

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

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

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

  • api: /category
  • http method: POST
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8
cookie: "JESSIONID: <id>"
  • request_body
{
    "name": "",
    "parentId": 0L
}

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

  • api: /category/{category_id}
  • http method: PUT
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8
cookie: "JESSIONID: <id>"
  • request_body
{
    "name": "",
    "parentId": ""
}

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

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

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

  • 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
cookie: "JESSIONID: <id>"
  • request_body
{
    "content": "",
    "account": {}
}

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

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

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

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

[์‚ฐ๋ฆผ์ฒญ ๊ตญ๋ฆฝ์ˆ˜๋ชฉ์›_์‹๋ฌผ์ž์› ์„œ๋น„์Šค API]

์‹๋ฌผ ๋„๊ฐ ๋ชฉ๋ก ๊ฒ€์ƒ‰

  • api: /plntIlstrSearch
  • request_body
{
  "st": "1",
  "sw": "",
  "numOfRows": "10",
  "pageNo": "1"
}

์‹๋ฌผ ๋„๊ฐ ์ƒ์„ธ์ •๋ณด ์กฐํšŒ

  • api: /plntIlstrInfo?q1=?
  • request_heder ๋„๊ฐ๋ฒˆํ˜ธ

https://www.data.go.kr/iim/api/selectAPIAcountView.do