Skip to content

api_spec

chlwlgus4 edited this page Nov 14, 2021 · 29 revisions

๊ฐœ์š”

  • api ์ŠคํŽ™

ํšŒ์› API

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

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

๋กœ๊ทธ์ธ

  • api: /login
  • http method: POST
  • request_body: form-data
{
  "email": "",
  "password": ""
}
  • ์„ฑ๊ณต ์‘๋‹ต
    • status_code: 200 OK
    • cookie: ์„ธ์…˜id๊ฐ€ JSESSIONID๋กœ ๋ฆฌํ„ด
  • ์‹คํŒจ ์‘๋‹ต
    • status_code: 401 Unauthorized

๋กœ๊ทธ์•„์›ƒ

  • api: /logout
  • http method: POST
  • ์š”์ฒญ ํ—ค๋”
Content-Type: application/json;charset=UTF-8
  • request_body
{
}
  • ์„ฑ๊ณต ์‘๋‹ต
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: /plntIlstrSearch
  • request_body
{
  "st": "1",
  "sw": "",
  "numOfRows": "10",
  "pageNo": "1"
}

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

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

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