2024-05-09 06:10:02 +00:00
components :
2024-05-17 05:08:39 +00:00
schemas :
sortBy :
type : string
description : The field to sort by from the request.
example : 'media.metadata.title'
sortDesc :
name : sortDesc
description : Whether to sort in descending order.
type : boolean
example : true
filterBy :
type : string
description : The field to filter by from the request. TODO
example : 'media.metadata.title'
collapseSeries :
type : boolean
description : Whether collapse series was set in the request.
example : true
2024-05-09 06:10:02 +00:00
libraryFolders :
description : The folders of the library. Only specify the fullPath.
2024-05-18 22:25:52 +00:00
type : array
items :
$ref : '../objects/Folder.yaml#/components/schemas/folder'
2024-05-12 07:01:46 +00:00
libraryDisplayOrder :
description : The display order of the library. Must be >= 1.
2024-05-18 22:25:52 +00:00
type : integer
minimum : 1
example : 1
2024-05-09 06:10:02 +00:00
libraryIcon :
description : The icon of the library. See Library Icons for a list of possible icons.
2024-05-18 22:25:52 +00:00
type : string
example : 'audiobookshelf'
2024-05-09 06:10:02 +00:00
libraryMediaType :
description : The type of media that the library contains. Must be `book` or `podcast`.
2024-05-18 22:25:52 +00:00
type : string
example : 'book'
2024-05-09 06:10:02 +00:00
libraryProvider :
description : Preferred metadata provider for the library. See Metadata Providers for a list of possible providers.
2024-05-18 22:25:52 +00:00
type : string
example : 'audible'
2024-05-09 06:10:02 +00:00
librarySettings :
2024-05-18 22:25:52 +00:00
$ref : '../objects/Library.yaml#/components/schemas/librarySettings'
2024-05-17 05:08:39 +00:00
librarySort :
description : The sort order of the library. For example, to sort by title use 'sort=media.metadata.title'.
2024-05-18 22:25:52 +00:00
type : string
example : 'media.metadata.title'
2024-05-17 05:08:39 +00:00
libraryFilter :
description : The filter for the library.
2024-05-18 22:25:52 +00:00
type : string
example : 'media.metadata.title'
2024-05-17 05:08:39 +00:00
libraryCollapseSeries :
description : Whether to collapse series.
2024-05-18 22:25:52 +00:00
type : boolean
example : true
default : false
2024-05-17 05:08:39 +00:00
libraryInclude :
description : The fields to include in the response. The only current option is `rssfeed`.
2024-05-18 22:25:52 +00:00
type : string
example : 'rssfeed'
2024-05-12 07:01:46 +00:00
responses :
2024-05-12 07:13:38 +00:00
library200 :
description : Library found.
content :
application/json :
schema :
$ref : '../objects/Library.yaml#/components/schemas/library'
2024-05-12 07:01:46 +00:00
library404 :
description : Library not found.
content :
text/html :
schema :
type : string
example : Library not found.
2024-05-12 19:07:42 +00:00
paths :
/api/libraries :
get :
operationId : getLibraries
summary : Get all libraries on server
description : 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
description : Create a new library on server.
tags :
- Libraries
requestBody :
2024-05-15 04:28:15 +00:00
description : The library object to create.
2024-05-15 03:03:48 +00:00
content :
application/json :
schema :
type : object
2024-05-18 22:25:52 +00:00
required : [ name, folders]
2024-05-15 03:03:48 +00:00
properties :
name :
2024-05-18 22:25:52 +00:00
$ref : '../objects/Library.yaml#/components/schemas/libraryName'
2024-05-15 03:03:48 +00:00
folders :
2024-05-18 22:25:52 +00:00
$ref : '#/components/schemas/libraryFolders'
2024-05-15 03:03:48 +00:00
displayOrder :
2024-05-18 22:25:52 +00:00
$ref : '#/components/schemas/libraryDisplayOrder'
2024-05-15 03:03:48 +00:00
icon :
2024-05-18 22:25:52 +00:00
$ref : '#/components/schemas/libraryIcon'
2024-05-15 03:03:48 +00:00
mediaType :
2024-05-18 22:25:52 +00:00
$ref : '#/components/schemas/libraryMediaType'
2024-05-15 03:03:48 +00:00
provider :
2024-05-18 22:25:52 +00:00
$ref : '#/components/schemas/libraryProvider'
2024-05-15 03:03:48 +00:00
settings :
2024-05-18 22:25:52 +00:00
$ref : '#/components/schemas/librarySettings'
2024-05-12 19:07:42 +00:00
responses :
'200' :
$ref : '#/components/responses/library200'
'404' :
$ref : '#/components/responses/library404'
/api/libraries/{id}:
2024-05-15 03:03:48 +00:00
parameters :
2024-05-15 04:18:29 +00:00
- name : id
in : path
description : The ID of the library.
required : true
schema :
$ref : '../objects/Library.yaml#/components/schemas/libraryId'
2024-05-12 19:07:42 +00:00
get :
operationId : getLibraryById
summary : Get a single library by ID on server
description : Get a single library by ID on server.
tags :
- Libraries
responses :
'200' :
$ref : '#/components/responses/library200'
'404' :
$ref : '#/components/responses/library404'
patch :
operationId : updateLibraryById
summary : Update a single library by ID on server
description : Update a single library by ID on server.
tags :
- Libraries
requestBody :
2024-05-15 03:03:48 +00:00
required : true
2024-05-15 04:28:15 +00:00
description : The library object to update.
2024-05-15 03:03:48 +00:00
content :
application/json :
schema :
type : object
properties :
name :
2024-05-18 22:25:52 +00:00
$ref : '../objects/Library.yaml#/components/schemas/libraryName'
2024-05-15 03:03:48 +00:00
folders :
2024-05-18 22:25:52 +00:00
$ref : '#/components/schemas/libraryFolders'
2024-05-15 03:03:48 +00:00
displayOrder :
2024-05-18 22:25:52 +00:00
$ref : '#/components/schemas/libraryDisplayOrder'
2024-05-15 03:03:48 +00:00
icon :
2024-05-18 22:25:52 +00:00
$ref : '#/components/schemas/libraryIcon'
2024-05-15 03:03:48 +00:00
mediaType :
2024-05-18 22:25:52 +00:00
$ref : '#/components/schemas/libraryMediaType'
2024-05-15 03:03:48 +00:00
provider :
2024-05-18 22:25:52 +00:00
$ref : '#/components/schemas/libraryProvider'
2024-05-15 03:03:48 +00:00
settings :
2024-05-18 22:25:52 +00:00
$ref : '#/components/schemas/librarySettings'
2024-05-12 19:07:42 +00:00
responses :
'200' :
$ref : '#/components/responses/library200'
'404' :
$ref : '#/components/responses/library404'
delete :
operationId : deleteLibraryById
summary : Delete a single library by ID on server
description : Delete a single library by ID on server and return the deleted object.
tags :
- Libraries
responses :
'200' :
$ref : '#/components/responses/library200'
'404' :
$ref : '#/components/responses/library404'
2024-05-17 05:10:59 +00:00
/api/libraries/{id}/issues:
parameters :
- name : id
in : path
description : The ID of the library.
required : true
schema :
$ref : '../objects/Library.yaml#/components/schemas/libraryId'
delete :
operationId : deleteLibraryIssues
summary : Delete items with issues in a library.
description : Delete all items with issues in a library by library ID on the server. This only removes the items from the ABS database and does not delete media files.
tags :
- Libraries
responses :
'200' :
description : deleteLibraryIssues OK
content :
application/json :
schema :
type : string
example : 'Issues deleted.'
'404' :
$ref : '#/components/responses/library404'
2024-05-18 22:50:44 +00:00
/api/libraries/{id}/items:
parameters :
- name : id
in : path
description : The ID of the library.
required : true
schema :
$ref : '../objects/Library.yaml#/components/schemas/libraryId'
get :
operationId : getLibraryItems
summary : Get items in a library
description : Get items in a library by ID on server.
tags :
- Libraries
requestBody :
required : false
description : The filters to apply to the requested library items.
content :
application/json :
schema :
type : object
properties :
limit :
$ref : '../schemas.yaml#/components/schemas/limit'
page :
$ref : '../schemas.yaml#/components/schemas/page'
sort :
$ref : '#/components/schemas/librarySort'
desc :
$ref : '../schemas.yaml#/components/schemas/sortDesc'
filter :
$ref : '#/components/schemas/libraryFilter'
minified :
$ref : '../schemas.yaml#/components/schemas/minified'
collapseSeries :
$ref : '#/components/schemas/libraryCollapseSeries'
include :
$ref : '#/components/schemas/libraryInclude'
responses :
'200' :
description : getLibraryItems OK
content :
application/json :
schema :
type : object
properties :
results :
type : array
items :
2024-05-18 23:01:02 +00:00
$ref : '../objects/LibraryItem.yaml#/components/schemas/libraryItemBase'
2024-05-18 22:50:44 +00:00
total :
$ref : '../schemas.yaml#/components/schemas/total'
limit :
$ref : '../schemas.yaml#/components/schemas/limit'
page :
$ref : '../schemas.yaml#/components/schemas/page'
sortBy :
$ref : '#/components/schemas/sortBy'
sortDesc :
$ref : '#/components/schemas/sortDesc'
filterBy :
$ref : '#/components/schemas/filterBy'
mediaType :
$ref : '../objects/mediaTypes/media.yaml#/components/schemas/mediaType'
minified :
$ref : '../schemas.yaml#/components/schemas/minified'
collapseSeries :
$ref : '#/components/schemas/collapseSeries'
include :
$ref : '#/components/schemas/libraryInclude'
'404' :
$ref : '#/components/responses/library404'
/api/libraries/{id}/authors:
parameters :
- name : id
in : path
description : The ID of the library.
required : true
schema :
$ref : '../objects/Library.yaml#/components/schemas/libraryId'
get :
operationId : getLibraryAuthors
summary : Get all authors in a library
description : Get all authors in a library by ID on server.
tags :
- Libraries
responses :
'200' :
description : getLibraryAuthors OK
content :
application/json :
schema :
2024-05-19 01:30:30 +00:00
type : object
properties :
authors :
type : array
items :
$ref : '../objects/entities/Author.yaml#/components/schemas/authorExpanded'
2024-05-18 22:50:44 +00:00
'404' :
$ref : '#/components/responses/library404'
2024-05-19 01:11:53 +00:00
/api/libraries/{id}/series:
parameters :
- name : id
in : path
description : The ID of the library.
required : true
schema :
$ref : '../objects/Library.yaml#/components/schemas/libraryId'
get :
operationId : getLibrarySeries
summary : Get library series
description : Get series in a library. Filtering and sorting can be applied.
tags :
- Libraries
requestBody :
required : false
description : The filters to apply to the requested library series.
content :
application/json :
schema :
type : object
properties :
limit :
$ref : '../schemas.yaml#/components/schemas/limit'
page :
$ref : '../schemas.yaml#/components/schemas/page'
sort :
description : The field to sort by from the request.
type : string
enum : [ 'name' , 'numBooks' , 'totalDuration' , 'addedAt' , 'lastBookAdded' , 'lastBookUpdated' ]
example : 'numBooks'
default : 'name'
desc :
$ref : '../schemas.yaml#/components/schemas/sortDesc'
filter :
$ref : '#/components/schemas/libraryFilter'
include :
$ref : '#/components/schemas/libraryInclude'
responses :
'200' :
description : getLibrarySeries OK
content :
application/json :
schema :
type : object
properties :
results :
type : array
items :
$ref : '../objects/entities/Series.yaml#/components/schemas/seriesBooks'
total :
$ref : '../schemas.yaml#/components/schemas/total'
limit :
$ref : '../schemas.yaml#/components/schemas/limit'
page :
$ref : '../schemas.yaml#/components/schemas/page'
sortBy :
$ref : '#/components/schemas/sortBy'
sortDesc :
$ref : '#/components/schemas/sortDesc'
filterBy :
$ref : '#/components/schemas/filterBy'
minified :
$ref : '../schemas.yaml#/components/schemas/minified'
include :
$ref : '#/components/schemas/libraryInclude'
'404' :
$ref : '#/components/responses/library404'