jw0201 / markdown-api-docs

Markdown API docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ“ markdown-api-docs

πŸ“š API 섀계

API Reference
μžμ›
/resources

μžμ› 등둝

μƒˆλ‘œμš΄ μžμ›μ„ λ“±λ‘ν•©λ‹ˆλ‹€.

  • URL

    /resources

  • Method:

    POST

  • Data Params

    Required:

    name=[String] - μžμ›λͺ…
    count=[Integer] - μˆ˜λŸ‰

    Optional:

    description=[String] - μžμ› μ„€λͺ…

  • Response

    Required:

    id=[String] - μžμ› 일련번호
    name=[String] - μžμ›λͺ…
    description=[String] - μžμ› μ„€λͺ…
    count=[Integer] - μˆ˜λŸ‰
    created_at=[Date] - 생성 일자

  • 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

  • Response

    Required:
    id=[String] - μžμ› 일련번호
    name=[String] - μžμ›λͺ…
    description=[String] - μžμ› μ„€λͺ…
    count=[Integer] - μˆ˜λŸ‰

    Optional:

  • 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"
    }
  ]
}

About

Markdown API docs