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: securitySchemes: BearerAuth: description: Bearer authentication type: http scheme: bearer responses: ok200: description: OK security: - BearerAuth: [] paths: /api/authors/{id}: get: operationId: getAuthorById summary: Get a single author by ID on server tags: - Authors parameters: - $ref: './controllers/AuthorController.yaml#/components/parameters/authorId' - $ref: './controllers/AuthorController.yaml#/components/parameters/authorInclude' - $ref: './controllers/AuthorController.yaml#/components/parameters/authorLibraryId' responses: '200': description: getAuthorById OK 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: operationId: updateAuthorById 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: - $ref: './controllers/AuthorController.yaml#/components/parameters/authorId' - $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': description: updateAuthorById OK 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: operationId: deleteAuthorById summary: Delete a single author by ID on server and remove author from all books. tags: - Authors parameters: - $ref: './controllers/AuthorController.yaml#/components/parameters/authorId' responses: '200': $ref: '#/components/responses/ok200' '404': $ref: './controllers/AuthorController.yaml#/components/responses/author404' /api/authors/{id}/image: post: operationId: setAuthorImageById summary: Set an author image using a provided URL. tags: - Authors parameters: - $ref: './controllers/AuthorController.yaml#/components/parameters/authorId' - $ref: './controllers/AuthorController.yaml#/components/parameters/imageUrl' responses: '200': description: setAuthorImageById OK content: application/json: schema: oneOf: - $ref: './objects/entities/Author.yaml#/components/schemas/author' '404': $ref: './controllers/AuthorController.yaml#/components/responses/author404' delete: operationId: deleteAuthorImageById summary: Delete an author image from the server and remove the image from the database. tags: - Authors parameters: - $ref: './controllers/AuthorController.yaml#/components/parameters/authorId' responses: '200': $ref: '#/components/responses/ok200' '404': $ref: './controllers/AuthorController.yaml#/components/responses/author404' patch: operationId: getAuthorImageById summary: Return the author image by author ID. tags: - Authors parameters: - $ref: './controllers/AuthorController.yaml#/components/parameters/authorId' - $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': description: getAuthorImageById OK content: image/*: schema: type: string format: binary '404': $ref: './controllers/AuthorController.yaml#/components/responses/author404' /api/authors/{id}/match: post: operationId: matchAuthorById 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: - $ref: './controllers/AuthorController.yaml#/components/parameters/authorId' - $ref: './controllers/AuthorController.yaml#/components/parameters/asin' - $ref: './controllers/AuthorController.yaml#/components/parameters/authorSearchName' responses: '200': description: matchAuthorById OK 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' /api/libraries: get: operationId: getLibraries summary: Get all libraries on server tags: - Libraries responses: '200': description: getLibraries OK content: application/json: schema: type: array items: $ref: './objects/Library.yaml#/components/schemas/library' post: operationId: createLibrary summary: Create a new library on server tags: - Libraries parameters: - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryName' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryFolders' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryIcon' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryMediaType' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryProvider' - $ref: './controllers/LibraryController.yaml#/components/parameters/librarySettings' responses: '200': description: createLibrary OK content: application/json: schema: $ref: './objects/Library.yaml#/components/schemas/library' /api/libraries/{id}: get: operationId: getLibraryById summary: Get a single library by ID on server tags: - Libraries parameters: - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryId' responses: '200': description: getLibraryById OK content: application/json: schema: $ref: './objects/Library.yaml#/components/schemas/library' '404': $ref: './controllers/LibraryController.yaml#/components/responses/library404' patch: operationId: updateLibraryById summary: Update a single library by ID on server tags: - Libraries parameters: - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryName' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryFolders' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryDisplayOrder' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryIcon' - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryProvider' - $ref: './controllers/LibraryController.yaml#/components/parameters/librarySettings' responses: '200': description: updateLibraryById OK content: application/json: schema: $ref: './objects/Library.yaml#/components/schemas/library' '404': $ref: './controllers/LibraryController.yaml#/components/responses/library404' delete: operationId: deleteLibraryById summary: Delete a single library by ID on server tags: - Libraries parameters: - $ref: './controllers/LibraryController.yaml#/components/parameters/libraryId' responses: '200': $ref: '#/components/responses/ok200' '404': $ref: './controllers/LibraryController.yaml#/components/responses/library404' tags: - name: Authors description: Author endpoints - name: Libraries description: Library endpoints