๐ markdown-api-docs
API ๋ฌธ์, API Reference, API docs๋ฅผ ์์ฑํ์ค ๋ ๊นํ๋ธ(Git hub)๋ ๊น๋ฉ(Git lab)์ markdown์ผ๋ก ์์ฑํ ํ ํ๋ฆฟ์ ๊ณต์ ํ๊ณ ์ ํฉ๋๋ค.
๐ API ์ค๊ณ
API Reference
์์
/resources
์์ ๋ฑ๋ก
์๋ก์ด ์์์ ๋ฑ๋กํฉ๋๋ค.
- URL
- /resources
- Method:
POST
- Data Params
name=[String] - ์์๋ช
count=[Integer] - ์๋
description=[String] - ์์ ์ค๋ช
- Optional:
- Required:
- Response
id=[String] - ์์ ์ผ๋ จ๋ฒํธ
name=[String] - ์์๋ช
description=[String] - ์์ ์ค๋ช
count=[Integer] - ์๋
created_at=[Date] - ์์ฑ ์ผ์
- Required:
- Success Response:
HTTP/1.1 201 Created Content-type: application/json;charset=UTF-8 { "id": "1", "name": "ํด๋ํฐ", "description": "์์ดํฐ12", "count": 1, "created_at": "2018-07-04 14:00:00" }
/resources/{id}
์์ ์์ธ ์กฐํ
์์์ ์์ธ ์กฐํํฉ๋๋ค.
- URL
- /resources/:id
- Method:
GET
- ResponseOptional:
- Required:
id=[String] - ์์ ์ผ๋ จ๋ฒํธ
name=[String] - ์์๋ช
description=[String] - ์์ ์ค๋ช
count=[Integer] - ์๋
- Success Response:
HTTP/1.1 200 OK Content-type: application/json;charset=UTF-8 { "id": "1", "name": "ํด๋ํฐ", "description": "์์ดํฐ", "count": 1, }
์์ ์ญ์
ํน์ ์์์ ์ญ์ ํฉ๋๋ค.
- URL
- /resources/:id
- Method:
DELETE
- Success Response:
HTTP/1.1 204 No Content
์๋ฌ ์ฝ๋
HTTP ์ํ ์ฝ๋
- Response
code=[Integer] - ์๋ฌ ์ฝ๋
message=[String] - ์๋ฌ ๋ฉ์์ง
- Success Response:
HTTP/1.1 401 Unauthorized { "errors": [ { "status": "401", "message": "Unauthorized" } ] }
'Operation > Rest API' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
REST API ์ฑ์๋ ๋ชจ๋ธ (Maturity Model) [Richardson Maturity Model] (0) | 2022.04.28 |
---|---|
REST API - Bulk delete ์ค๊ณํ๋ ๋ฐฉ๋ฒ! (1) | 2022.03.30 |
REST - ์ํ ๋ฑ ์ธ๋ถ ์ปฌ๋ผ ์์ ์๋ํฌ์ธํธ (End-point) ์ค๊ณ (0) | 2021.11.28 |