2024-03-31 00:47:13 +01:00
openapi : 3.0 .0
info :
title : Audiobookshelf API
version : 0.1 .0
description : Audiobookshelf API with autogenerated OpenAPI doc
servers :
- url : http://localhost:3000
description : Development server
components :
2024-04-20 21:57:38 +02:00
securitySchemes :
BearerAuth :
type : http
scheme : bearer
responses :
ok200 :
description : OK
security :
- BearerAuth : [ ]
2024-04-01 00:47:14 +02:00
paths :
/api/authors/{id}:
get :
2024-04-20 21:55:57 +02:00
operationId : getAuthorById
2024-04-01 00:47:14 +02:00
summary : Get a single author by ID on server
tags :
- Authors
parameters :
2024-04-20 21:55:57 +02:00
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorId'
2024-04-01 00:47:14 +02:00
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorInclude'
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorLibraryId'
responses :
200 :
2024-04-20 21:55:57 +02:00
description : getAuthorById OK
2024-04-01 00:47:14 +02:00
content :
application/json :
schema :
oneOf :
- $ref : './objects/entities/Author.yaml#/components/schemas/author'
- $ref : './objects/entities/Author.yaml#/components/schemas/authorWithItems'
- $ref : './objects/entities/Author.yaml#/components/schemas/authorWithSeries'
404 :
$ref : './controllers/AuthorController.yaml#/components/responses/author404'
patch :
2024-04-20 21:55:57 +02:00
operationId : updateAuthorById
2024-04-01 00:47:14 +02:00
summary : Update a single author by ID on server. This endpoint will merge two authors if the new author name matches another author in the database.
tags :
- Authors
parameters :
2024-04-20 21:55:57 +02:00
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorId'
2024-04-01 00:47:14 +02:00
- $ref : './controllers/AuthorController.yaml#/components/parameters/asin'
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorName'
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorDescription'
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorImagePath'
responses :
200 :
2024-04-20 21:55:57 +02:00
description : updateAuthorById OK
2024-04-01 00:47:14 +02:00
content :
application/json :
schema :
allOf :
- $ref : './objects/entities/Author.yaml#/components/schemas/author'
- $ref : './controllers/AuthorController.yaml#/components/schemas/authorUpdated'
- type : object
properties :
merged :
description : Will only exist and be `true` if the author was merged with another author
type : boolean
nullable : true
404 :
$ref : './controllers/AuthorController.yaml#/components/responses/author404'
delete :
2024-04-20 21:55:57 +02:00
operationId : deleteAuthorById
2024-04-01 00:47:14 +02:00
summary : Delete a single author by ID on server and remove author from all books.
tags :
- Authors
parameters :
2024-04-20 21:55:57 +02:00
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorId'
2024-04-01 00:47:14 +02:00
responses :
200 :
$ref : '#/components/responses/ok200'
404 :
$ref : './controllers/AuthorController.yaml#/components/responses/author404'
/api/authors/{id}/image:
post :
2024-04-20 21:55:57 +02:00
operationId : setAuthorImageById
2024-04-01 00:47:14 +02:00
summary : Set an author image using a provided URL.
tags :
- Authors
parameters :
2024-04-20 21:55:57 +02:00
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorId'
- $ref : './controllers/AuthorController.yaml#/components/parameters/imageUrl'
2024-04-01 00:47:14 +02:00
responses :
200 :
2024-04-20 21:55:57 +02:00
description : setAuthorImageById OK
2024-04-01 00:47:14 +02:00
content :
application/json :
schema :
oneOf :
- $ref : './objects/entities/Author.yaml#/components/schemas/author'
404 :
$ref : './controllers/AuthorController.yaml#/components/responses/author404'
delete :
2024-04-20 21:55:57 +02:00
operationId : deleteAuthorImageById
2024-04-01 00:47:14 +02:00
summary : Delete an author image from the server and remove the image from the database.
tags :
- Authors
parameters :
2024-04-20 21:55:57 +02:00
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorId'
2024-04-01 00:47:14 +02:00
responses :
200 :
$ref : '#/components/responses/ok200'
404 :
$ref : './controllers/AuthorController.yaml#/components/responses/author404'
patch :
2024-04-20 21:55:57 +02:00
operationId : getAuthorImageById
2024-04-01 00:47:14 +02:00
summary : Return the author image by author ID.
tags :
- Authors
parameters :
2024-04-20 21:55:57 +02:00
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorId'
2024-04-01 00:47:14 +02:00
- $ref : './controllers/AuthorController.yaml#/components/parameters/imageWidth'
- $ref : './controllers/AuthorController.yaml#/components/parameters/imageHeight'
- $ref : './controllers/AuthorController.yaml#/components/parameters/imageFormat'
- $ref : './controllers/AuthorController.yaml#/components/parameters/imageRaw'
responses :
200 :
2024-04-20 21:55:57 +02:00
description : getAuthorImageById OK
2024-04-01 00:47:14 +02:00
content :
image/* :
schema :
type : string
format : binary
404 :
$ref : './controllers/AuthorController.yaml#/components/responses/author404'
/api/authors/{id}/match:
post :
2024-04-20 21:55:57 +02:00
operationId : matchAuthorById
2024-04-01 00:47:14 +02:00
summary : Match the author against Audible using quick match. Quick match updates the author's description and image (if no image already existed) with information from audible. Either `asin` or `q` must be provided, with `asin` taking priority if both are provided.
tags :
- Authors
parameters :
2024-04-20 21:55:57 +02:00
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorId'
2024-04-01 00:47:14 +02:00
- $ref : './controllers/AuthorController.yaml#/components/parameters/asin'
- $ref : './controllers/AuthorController.yaml#/components/parameters/authorSearchName'
responses :
200 :
2024-04-20 21:55:57 +02:00
description : matchAuthorById OK
2024-04-01 00:47:14 +02:00
content :
application/json :
schema :
allOf :
- $ref : './objects/entities/Author.yaml#/components/schemas/author'
- $ref : './controllers/AuthorController.yaml#/components/schemas/authorUpdated'
404 :
$ref : './controllers/AuthorController.yaml#/components/responses/author404'
2024-03-31 00:47:13 +01:00
tags :
- name : Authors
description : Author endpoints