Books API v1.0.0

本の登録を行うAPIです

Base URLs:

Authentication:

  • API Key (APIKeyQueryParam)
    • Parameter Name: api_key, in: query.

1 books

1.1 listBooks

GET /books

本の一覧を取得します.

1.1.1 Parameters

Name In Type Required Description
name query string false 名前で抽出したい場合に指定

1.1.2 Example responses

200 Response

[
  {
    "id": 418243534748321,
    "name": "入門Swagger"
  }
]

1.1.3 Responses

Status Meaning Description Schema
200 OK 本の一覧 Books
500 Internal Server Error unexpected error Error

1.1.4 Response Headers

Status Header Type Format Description
200 x-request-id string リクエストID
500 x-request-id string リクエストID

1.2 addBook

POST /books

本を追加します

1.2.1 Parameters

Name In Type Required Description
name path string true none

1.2.2 Example responses

201 Response

{
  "id": 418243534748321,
  "name": "入門Swagger"
}

1.2.3 Responses

Status Meaning Description Schema
201 Created Null response Book
401 Unauthorized unauthorized error Error
500 Internal Server Error unexpected error Error

1.2.4 Response Headers

Status Header Type Format Description
201 x-request-id string リクエストID
401 x-request-id string リクエストID
500 x-request-id string リクエストID

1.3 deleteBook

DELETE /books/{book_id}

本を削除します

1.3.1 Parameters

Name In Type Required Description
book_id path string true 本のID

1.3.2 Example responses

401 Response

{
  "code": "ErrorCode",
  "message": "Error Message."
}

1.3.3 Responses

Status Meaning Description Schema
204 No Content no content None
401 Unauthorized unauthorized error Error
404 Not Found not found error Error
500 Internal Server Error unexpected error Error

1.3.4 Response Headers

Status Header Type Format Description
401 x-request-id string リクエストID
404 x-request-id string リクエストID
500 x-request-id string リクエストID

2 Schemas

2.1 Book

{
  "id": 418243534748321,
  "name": "入門Swagger"
}

2.1.1 Properties

Name Type Required Restrictions Description
id integer(int64) true none none
name string true none none

2.2 Books

[
  {
    "id": 418243534748321,
    "name": "入門Swagger"
  }
]

2.2.1 Properties

Name Type Required Restrictions Description
anonymous [Book] false none none

2.3 Error

{
  "code": "ErrorCode",
  "message": "Error Message."
}

2.3.1 Properties

Name Type Required Restrictions Description
code string true none none
message string true none none