本の登録を行うAPIです
Base URLs:
Authentication:
GET /books
本の一覧を取得します.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | query | string | false | 名前で抽出したい場合に指定 |
200 Response
[
{
"id": 418243534748321,
"name": "入門Swagger"
}
]| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | 本の一覧 | Books |
| 500 | Internal Server Error | unexpected error | Error |
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 200 | x-request-id | string | リクエストID | |
| 500 | x-request-id | string | リクエストID |
POST /books
本を追加します
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | path | string | true | none |
201 Response
{
"id": 418243534748321,
"name": "入門Swagger"
}| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Null response | Book |
| 401 | Unauthorized | unauthorized error | Error |
| 500 | Internal Server Error | unexpected error | Error |
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 201 | x-request-id | string | リクエストID | |
| 401 | x-request-id | string | リクエストID | |
| 500 | x-request-id | string | リクエストID |
DELETE /books/{book_id}
本を削除します
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| book_id | path | string | true | 本のID |
401 Response
{
"code": "ErrorCode",
"message": "Error Message."
}| 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 |
| Status | Header | Type | Format | Description |
|---|---|---|---|---|
| 401 | x-request-id | string | リクエストID | |
| 404 | x-request-id | string | リクエストID | |
| 500 | x-request-id | string | リクエストID |
{
"id": 418243534748321,
"name": "入門Swagger"
}| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | integer(int64) | true | none | none |
| name | string | true | none | none |
[
{
"id": 418243534748321,
"name": "入門Swagger"
}
]| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | [Book] | false | none | none |
{
"code": "ErrorCode",
"message": "Error Message."
}| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| code | string | true | none | none |
| message | string | true | none | none |