mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-29 07:09:39 +00:00
1941 lines
64 KiB
YAML
1941 lines
64 KiB
YAML
openapi: 3.0.0
|
|
info:
|
|
title: Audiobookshelf API
|
|
version: 0.2.0
|
|
description: Audiobookshelf API with autogenerated OpenAPI doc
|
|
license:
|
|
name: GPL-3.0
|
|
url: 'https://www.gnu.org/licenses/gpl-3.0.html'
|
|
servers:
|
|
- url: http://abs.mydomain.com:13378
|
|
description: Development server
|
|
security:
|
|
- BearerAuth: []
|
|
components:
|
|
securitySchemes:
|
|
BearerAuth:
|
|
description: Bearer authentication
|
|
type: http
|
|
scheme: bearer
|
|
parameters:
|
|
pathLibraryId:
|
|
name: id
|
|
in: path
|
|
required: true
|
|
description: The ID of the library.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
pathBookId:
|
|
name: id
|
|
in: path
|
|
required: true
|
|
description: The ID of the book.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
pathPodcastId:
|
|
name: id
|
|
in: path
|
|
required: true
|
|
description: The ID of the podcast.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
pathPodcastEpisodeId:
|
|
name: id
|
|
in: path
|
|
required: true
|
|
description: The ID of the podcast episode.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
queryLimit:
|
|
name: limit
|
|
in: query
|
|
required: false
|
|
description: The number of items per page.
|
|
schema:
|
|
type: integer
|
|
minimum: 1
|
|
default: 20
|
|
queryPage:
|
|
name: page
|
|
in: query
|
|
required: false
|
|
description: The page number of items to return. The first page is 1, and the page size is determined by the limit parameter.
|
|
schema:
|
|
type: integer
|
|
minimum: 1
|
|
default: 1
|
|
queryDesc:
|
|
name: desc
|
|
in: query
|
|
required: false
|
|
description: Whether to sort the items in descending order.
|
|
schema:
|
|
type: boolean
|
|
default: false
|
|
queryFilterGenre:
|
|
name: genre
|
|
in: query
|
|
required: false
|
|
description: The genre ID to filter by.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
queryFilterTag:
|
|
name: tag
|
|
in: query
|
|
required: false
|
|
description: The tag ID to filter by.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
queryFilterAuthor:
|
|
name: author
|
|
in: query
|
|
required: false
|
|
description: The author ID to filter by.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
queryFilterNarrator:
|
|
name: narrator
|
|
in: query
|
|
required: false
|
|
description: The narrator ID to filter by.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
queryFilterPublisher:
|
|
name: publisher
|
|
in: query
|
|
required: false
|
|
description: The publisher name to filter by.
|
|
schema:
|
|
type: string
|
|
queryFilterSeries:
|
|
name: series
|
|
in: query
|
|
required: false
|
|
description: The series ID to filter by.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
queryFilterLanguage:
|
|
name: language
|
|
in: query
|
|
required: false
|
|
description: The language to filter by.
|
|
schema:
|
|
type: string
|
|
queryFilterProgress:
|
|
name: progress
|
|
in: query
|
|
required: false
|
|
description: The progress to filter by.
|
|
schema:
|
|
type: string
|
|
enum: ['not-started', 'in-progress', 'completed', 'not-completed']
|
|
queryFilterMissing:
|
|
name: missing
|
|
in: query
|
|
required: false
|
|
description: Which fields to filter by missing values.
|
|
schema:
|
|
type: string
|
|
enum: ['asin', 'isbn', 'author', 'title', 'subtitle', 'publish-year', 'series', 'description', 'genre', 'tag', 'narrator', 'publisher', 'language', 'cover']
|
|
queryFilterTrackCount:
|
|
name: trackCount
|
|
in: query
|
|
required: false
|
|
description: Filter if the book has a single audio file, multiple audio files, or no audio files (ebook).
|
|
schema:
|
|
type: string
|
|
enum: ['single', 'multiple', 'none']
|
|
queryFilterEbook:
|
|
name: ebook
|
|
in: query
|
|
required: false
|
|
description: Filter by presence or abscence of ebook files.
|
|
schema:
|
|
type: string
|
|
enum: ['has-ebook', 'no-ebook', 'has-primary', 'no-primary', 'has-supplementary', 'no-supplementary']
|
|
queryFilterAbridged:
|
|
name: abridged
|
|
in: query
|
|
required: false
|
|
description: Filter by abridged or unabridged books.
|
|
schema:
|
|
type: boolean
|
|
queryFilterExplicit:
|
|
name: explicit
|
|
in: query
|
|
required: false
|
|
description: Filter by explicit or non-explicit content.
|
|
schema:
|
|
type: boolean
|
|
queryFilterIssues:
|
|
name: issues
|
|
in: query
|
|
required: false
|
|
description: Filter by books with issues.
|
|
schema:
|
|
type: boolean
|
|
queryFilterFeedOpen:
|
|
name: feedOpen
|
|
in: query
|
|
required: false
|
|
description: Filter by books with open feeds.
|
|
schema:
|
|
type: boolean
|
|
queryFilterShareOpen:
|
|
name: shareOpen
|
|
in: query
|
|
required: false
|
|
description: Filter by books with open shares.
|
|
schema:
|
|
type: boolean
|
|
querySortBooks:
|
|
name: sort
|
|
in: query
|
|
required: false
|
|
description: The field to sort the books by.
|
|
schema:
|
|
type: string
|
|
enum: ['title', 'publishYear', 'author-fl', 'author-lf', 'size', 'duration', 'progress', 'file-birthtime', 'file-mtime', 'random']
|
|
querySortPodcasts:
|
|
name: sort
|
|
in: query
|
|
required: false
|
|
description: The field to sort the podcasts by.
|
|
schema:
|
|
type: string
|
|
enum: ['title', 'author', 'created', 'size', 'episodeCount', 'random']
|
|
schemas:
|
|
itemId:
|
|
type: string
|
|
description: A unique ID for the item. This ID is unique across all tables.
|
|
format: uuid
|
|
duration:
|
|
type: number
|
|
description: The length of the item in seconds. Will be 0 if no audio is associated with the item.
|
|
bitrate:
|
|
type: number
|
|
description: The bitrate of the audio file.
|
|
progress:
|
|
type: number
|
|
description: The user's progress through the media. Will be 1.0 if completed, and 0.0 or null if not started.
|
|
nullable: true
|
|
size:
|
|
type: integer
|
|
description: The size of the item in bytes.
|
|
trackCount:
|
|
type: integer
|
|
description: The number of tracks in the podcast.
|
|
title:
|
|
type: string
|
|
description: The title of the item.
|
|
titleNullable:
|
|
type: string
|
|
description: The title of the item.
|
|
nullable: true
|
|
subtitle:
|
|
type: string
|
|
description: The subtitle of the item.
|
|
nullable: true
|
|
description:
|
|
type: string
|
|
description: The description of the item.
|
|
nullable: true
|
|
isExplicit:
|
|
type: boolean
|
|
description: Whether the item contains explicit content.
|
|
isAbridged:
|
|
type: boolean
|
|
description: Whether the item is abridged.
|
|
seriesSequence:
|
|
type: object
|
|
description: The series name and sequence number of the item.
|
|
properties:
|
|
seriesId:
|
|
$ref: '#/components/schemas/itemId'
|
|
title:
|
|
$ref: '#/components/schemas/title'
|
|
sequence:
|
|
type: string
|
|
description: The sequence number of the item in the series. If the item does not have a specific sequence, this will be null.
|
|
nullable: true
|
|
seriesSequenceArray:
|
|
type: array
|
|
description: An array of series names and sequence numbers associated with the item.
|
|
nullable: true
|
|
items:
|
|
$ref: '#/components/schemas/seriesSequence'
|
|
imagePath:
|
|
type: string
|
|
description: The absolute path of the image on the server. Null if no image is associated with the item.
|
|
nullable: true
|
|
filePath:
|
|
type: string
|
|
description: The absolute path of the file on the server.
|
|
bookPerson:
|
|
type: object
|
|
description: A person associated with a book.
|
|
properties:
|
|
personId:
|
|
$ref: '#/components/schemas/itemId'
|
|
name:
|
|
type: string
|
|
description: The name of the person.
|
|
authorObjectArray:
|
|
type: array
|
|
description: An array of author objects associated with a book.
|
|
nullable: true
|
|
items:
|
|
$ref: '#/components/schemas/bookPerson'
|
|
authorName:
|
|
type: string
|
|
description: The name of an author associated with a book.
|
|
authorNameArray:
|
|
type: array
|
|
description: An array of author names associated with a book.
|
|
nullable: true
|
|
items:
|
|
type: string
|
|
narratorObjectArray:
|
|
type: array
|
|
description: An array of narrator objects associated with a book.
|
|
nullable: true
|
|
items:
|
|
$ref: '#/components/schemas/bookPerson'
|
|
narratorNameArray:
|
|
type: array
|
|
description: An array of narrator names associated with a book.
|
|
nullable: true
|
|
items:
|
|
type: string
|
|
publisher:
|
|
type: string
|
|
description: The publisher of the book.
|
|
nullable: true
|
|
publishDate:
|
|
type: string
|
|
description: The date the item was published.
|
|
nullable: true
|
|
publishYear:
|
|
type: integer
|
|
description: The year the book was published.
|
|
nullable: true
|
|
isbn:
|
|
type: string
|
|
description: The ISBN of the book.
|
|
nullable: true
|
|
asin:
|
|
type: string
|
|
description: The ASIN of the book.
|
|
nullable: true
|
|
genre:
|
|
type: string
|
|
description: The genre of the item.
|
|
nullable: true
|
|
genreArray:
|
|
type: array
|
|
description: An array of genres associated with the item.
|
|
nullable: true
|
|
items:
|
|
$ref: '#/components/schemas/genre'
|
|
tag:
|
|
type: string
|
|
description: The tag of the item.
|
|
nullable: true
|
|
tagArray:
|
|
type: array
|
|
description: An array of tags associated with the item.
|
|
nullable: true
|
|
items:
|
|
$ref: '#/components/schemas/tag'
|
|
language:
|
|
type: string
|
|
description: The language of the item.
|
|
nullable: true
|
|
hasFeedOpen:
|
|
type: boolean
|
|
description: Whether the item has an open feed.
|
|
rssFeed:
|
|
type: string
|
|
description: The RSS feed of the podcast.
|
|
nullable: true
|
|
itunesId:
|
|
type: string
|
|
description: The iTunes ID of the podcast.
|
|
nullable: true
|
|
podcastType:
|
|
type: string
|
|
description: The type of podcast.
|
|
enum: ['episodic', 'serial']
|
|
episodeNumber:
|
|
type: integer
|
|
nullable: true
|
|
description: The episode number of the podcast.
|
|
seasonNumber:
|
|
type: integer
|
|
nullable: true
|
|
description: The season number of the podcast.
|
|
episodeType:
|
|
type: string
|
|
description: The type of episode.
|
|
enum: ['full', 'trailer', 'bonus', 'teaser', 'sponsored', 'patron']
|
|
autoDownloadEnabled:
|
|
type: boolean
|
|
description: Whether auto-download is enabled for the podcast.
|
|
autoDownloadSchedule:
|
|
type: string
|
|
description: The cron expression of when to check for new episodes to auto-download from the RSS feed for the podcast.
|
|
example: '0 0 * * *'
|
|
nullable: true
|
|
lastEpisodeCheck:
|
|
type: string
|
|
description: The date and time the podcast was last checked for new episodes.
|
|
nullable: true
|
|
maxEpisodesToKeep:
|
|
type: integer
|
|
description: The maximum number of episodes to keep for the podcast. If zero, keep all episodes.
|
|
default: 0
|
|
maxNewEpisodestoDownload:
|
|
type: integer
|
|
description: The maximum number of new episodes to download for the podcast. If zero, download all new episodes.
|
|
default: 3
|
|
bookChapter:
|
|
type: object
|
|
description: A chapter in a book.
|
|
properties:
|
|
title:
|
|
type: string
|
|
description: The title of the chapter.
|
|
start:
|
|
type: number
|
|
description: The start time of the chapter in seconds.
|
|
end:
|
|
type: number
|
|
description: The end time of the chapter in seconds.
|
|
chapterArray:
|
|
type: array
|
|
description: An array of chapters in a book. Will be null if the item has no chapters.
|
|
nullable: true
|
|
items:
|
|
$ref: '#/components/schemas/bookChapter'
|
|
fileType:
|
|
type: string
|
|
description: The type of file.
|
|
enum: ['audio', 'image', 'ebook', 'metadata']
|
|
file:
|
|
type: object
|
|
description: Any media or image file associated with a book or podcast.
|
|
properties:
|
|
fileId:
|
|
$ref: '#/components/schemas/itemId'
|
|
path:
|
|
$ref: '#/components/schemas/filePath'
|
|
fileName:
|
|
type: string
|
|
description: The name of the file.
|
|
size:
|
|
$ref: '#/components/schemas/size'
|
|
duration:
|
|
$ref: '#/components/schemas/duration'
|
|
fileType:
|
|
$ref: '#/components/schemas/fileType'
|
|
audioFileCodec:
|
|
type: string
|
|
description: The codec of an audio file.
|
|
audioTrack:
|
|
type: object
|
|
description: An audio track associated with a book.
|
|
properties:
|
|
fileId:
|
|
$ref: '#/components/schemas/itemId'
|
|
path:
|
|
$ref: '#/components/schemas/filePath'
|
|
fileName:
|
|
type: string
|
|
description: The name of the file.
|
|
size:
|
|
$ref: '#/components/schemas/size'
|
|
duration:
|
|
$ref: '#/components/schemas/duration'
|
|
codec:
|
|
$ref: '#/components/schemas/audioFileCodec'
|
|
bitrate:
|
|
$ref: '#/components/schemas/bitrate'
|
|
ebookFile:
|
|
type: object
|
|
description: An ebook file associated with a book.
|
|
properties:
|
|
fileId:
|
|
$ref: '#/components/schemas/itemId'
|
|
path:
|
|
$ref: '#/components/schemas/filePath'
|
|
fileName:
|
|
type: string
|
|
description: The name of the file.
|
|
isPrimary:
|
|
type: boolean
|
|
description: Whether the file is the primary ebook file.
|
|
size:
|
|
$ref: '#/components/schemas/size'
|
|
displayBookObject:
|
|
type: object
|
|
description: A book object used for displaying items in a library.
|
|
properties:
|
|
bookId:
|
|
$ref: '#/components/schemas/itemId'
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
title:
|
|
$ref: '#/components/schemas/title'
|
|
subtitle:
|
|
$ref: '#/components/schemas/subtitle'
|
|
authors:
|
|
$ref: '#/components/schemas/authorNameArray'
|
|
duration:
|
|
$ref: '#/components/schemas/duration'
|
|
size:
|
|
$ref: '#/components/schemas/size'
|
|
hasEbook:
|
|
type: boolean
|
|
description: Whether the book has an ebook
|
|
example: true
|
|
hasAudio:
|
|
type: boolean
|
|
description: Whether the book has audio
|
|
example: true
|
|
hasRss:
|
|
$ref: '#/components/schemas/hasFeedOpen'
|
|
explicit:
|
|
$ref: '#/components/schemas/isExplicit'
|
|
abridged:
|
|
$ref: '#/components/schemas/isAbridged'
|
|
extraInfo:
|
|
type: string
|
|
description: The extra info displayed when sorting or filtering. For example, the publish year.
|
|
example: '2010'
|
|
count:
|
|
type: integer
|
|
description: The number of books in the series when using the "Collapse Series" option.
|
|
example: 4
|
|
progress:
|
|
$ref: '#/components/schemas/progress'
|
|
displayPodcastObject:
|
|
type: object
|
|
description: A podcast object used for displaying items in a library.
|
|
properties:
|
|
podcastId:
|
|
$ref: '#/components/schemas/itemId'
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
title:
|
|
$ref: '#/components/schemas/title'
|
|
author:
|
|
$ref: '#/components/schemas/authorName'
|
|
explicit:
|
|
$ref: '#/components/schemas/isExplicit'
|
|
extraInfo:
|
|
type: string
|
|
description: The extra info displayed when sorting or filtering. For example, the publish year.
|
|
example: '2010'
|
|
count:
|
|
type: integer
|
|
description: The number of episodes in the podcast.
|
|
example: 50
|
|
displayPodcastEpisodeObject:
|
|
type: object
|
|
description: A podcast episode object used for displaying episodes in a library.
|
|
properties:
|
|
episodeId:
|
|
$ref: '#/components/schemas/itemId'
|
|
podcastId:
|
|
$ref: '#/components/schemas/itemId'
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
title:
|
|
$ref: '#/components/schemas/title'
|
|
description:
|
|
$ref: '#/components/schemas/description'
|
|
seasonNumber:
|
|
$ref: '#/components/schemas/seasonNumber'
|
|
episodeNumber:
|
|
$ref: '#/components/schemas/episodeNumber'
|
|
publishDate:
|
|
type: integer
|
|
description: The publish date of the podcast episode in ms since POSIX epoch.
|
|
example: 1633522963509
|
|
duration:
|
|
$ref: '#/components/schemas/duration'
|
|
progress:
|
|
$ref: '#/components/schemas/progress'
|
|
bookObject:
|
|
type: object
|
|
description: Information about the book and its audio files.
|
|
properties:
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
title:
|
|
$ref: '#/components/schemas/title'
|
|
subtitle:
|
|
$ref: '#/components/schemas/subtitle'
|
|
authors:
|
|
$ref: '#/components/schemas/authorObjectArray'
|
|
narrators:
|
|
$ref: '#/components/schemas/narratorObjectArray'
|
|
description:
|
|
$ref: '#/components/schemas/description'
|
|
genres:
|
|
$ref: '#/components/schemas/genreArray'
|
|
tags:
|
|
$ref: '#/components/schemas/tagArray'
|
|
series:
|
|
$ref: '#/components/schemas/seriesSequenceArray'
|
|
publishYear:
|
|
$ref: '#/components/schemas/publishYear'
|
|
publisher:
|
|
$ref: '#/components/schemas/publisher'
|
|
isbn:
|
|
$ref: '#/components/schemas/isbn'
|
|
asin:
|
|
$ref: '#/components/schemas/asin'
|
|
language:
|
|
$ref: '#/components/schemas/language'
|
|
explicit:
|
|
$ref: '#/components/schemas/isExplicit'
|
|
abridged:
|
|
$ref: '#/components/schemas/isAbridged'
|
|
chapters:
|
|
$ref: '#/components/schemas/chapterArray'
|
|
files:
|
|
type: array
|
|
description: All files associated with the book.
|
|
items:
|
|
$ref: '#/components/schemas/file'
|
|
audioTracks:
|
|
type: array
|
|
nullable: true
|
|
description: The audio tracks of the book. Will be null if the book is an ebook.
|
|
items:
|
|
$ref: '#/components/schemas/audioTrack'
|
|
ebookFiles:
|
|
type: array
|
|
nullable: true
|
|
description: The ebook files of the book. Will be null if no ebooks are associated with the book.
|
|
items:
|
|
$ref: '#/components/schemas/ebookFile'
|
|
hasFeedOpen:
|
|
$ref: '#/components/schemas/hasFeedOpen'
|
|
progress:
|
|
$ref: '#/components/schemas/progress'
|
|
duration:
|
|
$ref: '#/components/schemas/duration'
|
|
size:
|
|
$ref: '#/components/schemas/size'
|
|
podcastObject:
|
|
type: object
|
|
description: Information about the podcast.
|
|
properties:
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
title:
|
|
$ref: '#/components/schemas/title'
|
|
author:
|
|
type: string
|
|
description: The author or publisher of the podcast.
|
|
description:
|
|
$ref: '#/components/schemas/description'
|
|
duration:
|
|
$ref: '#/components/schemas/duration'
|
|
trackCount:
|
|
$ref: '#/components/schemas/trackCount'
|
|
size:
|
|
$ref: '#/components/schemas/size'
|
|
genres:
|
|
$ref: '#/components/schemas/genreArray'
|
|
tags:
|
|
$ref: '#/components/schemas/tagArray'
|
|
releaseDate:
|
|
$ref: '#/components/schemas/publishDate'
|
|
itunesId:
|
|
type: string
|
|
description: The iTunes ID of the podcast.
|
|
language:
|
|
$ref: '#/components/schemas/language'
|
|
explicit:
|
|
$ref: '#/components/schemas/isExplicit'
|
|
hasFeedOpen:
|
|
$ref: '#/components/schemas/hasFeedOpen'
|
|
rssFeed:
|
|
$ref: '#/components/schemas/rssFeed'
|
|
type:
|
|
$ref: '#/components/schemas/podcastType'
|
|
autoDownloadEnabled:
|
|
$ref: '#/components/schemas/autoDownloadEnabled'
|
|
autoDownloadSchedule:
|
|
$ref: '#/components/schemas/autoDownloadSchedule'
|
|
lastEpisodeCheck:
|
|
$ref: '#/components/schemas/lastEpisodeCheck'
|
|
maxEpisodesToKeep:
|
|
$ref: '#/components/schemas/maxEpisodesToKeep'
|
|
maxNewEpisodestoDownload:
|
|
$ref: '#/components/schemas/maxNewEpisodestoDownload'
|
|
podcastMatchObject:
|
|
type: object
|
|
description: Match information for a podcast from an online provider.
|
|
properties:
|
|
id:
|
|
type: integer
|
|
description: The ID of the podcast.
|
|
artistId:
|
|
type: integer
|
|
description: The ID of the artist.
|
|
title:
|
|
$ref: '#/components/schemas/title'
|
|
artistName:
|
|
$ref: '#/components/schemas/authorName'
|
|
description:
|
|
$ref: '#/components/schemas/description'
|
|
releaseDate:
|
|
$ref: '#/components/schemas/publishDate'
|
|
genres:
|
|
$ref: '#/components/schemas/genreArray'
|
|
cover:
|
|
$ref: '#/components/schemas/imagePath'
|
|
trackCount:
|
|
$ref: '#/components/schemas/trackCount'
|
|
feedUrl:
|
|
$ref: '#/components/schemas/rssFeed'
|
|
pageUrl:
|
|
type: string
|
|
description: The URL of the podcast page.
|
|
explicit:
|
|
$ref: '#/components/schemas/isExplicit'
|
|
podcastEpisodeDisplayObject:
|
|
type: object
|
|
description: An episode of a podcast, only includes the information needed to display the episode.
|
|
properties:
|
|
title:
|
|
$ref: '#/components/schemas/title'
|
|
description:
|
|
$ref: '#/components/schemas/description'
|
|
releaseDate:
|
|
$ref: '#/components/schemas/publishDate'
|
|
duration:
|
|
$ref: '#/components/schemas/duration'
|
|
size:
|
|
$ref: '#/components/schemas/size'
|
|
episodeNumber:
|
|
$ref: '#/components/schemas/episodeNumber'
|
|
seasonNumber:
|
|
$ref: '#/components/schemas/seasonNumber'
|
|
explicit:
|
|
$ref: '#/components/schemas/isExplicit'
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
hasFeedOpen:
|
|
$ref: '#/components/schemas/hasFeedOpen'
|
|
progress:
|
|
$ref: '#/components/schemas/progress'
|
|
podcastEpisodeObject:
|
|
type: object
|
|
description: An episode of a podcast.
|
|
properties:
|
|
episodeId:
|
|
$ref: '#/components/schemas/itemId'
|
|
podcastId:
|
|
$ref: '#/components/schemas/itemId'
|
|
title:
|
|
$ref: '#/components/schemas/title'
|
|
subtitle:
|
|
$ref: '#/components/schemas/subtitle'
|
|
description:
|
|
$ref: '#/components/schemas/description'
|
|
releaseDate:
|
|
$ref: '#/components/schemas/publishDate'
|
|
duration:
|
|
$ref: '#/components/schemas/duration'
|
|
size:
|
|
$ref: '#/components/schemas/size'
|
|
episodeType:
|
|
$ref: '#/components/schemas/episodeType'
|
|
episodeNumber:
|
|
$ref: '#/components/schemas/episodeNumber'
|
|
seasonNumber:
|
|
$ref: '#/components/schemas/seasonNumber'
|
|
explicit:
|
|
$ref: '#/components/schemas/isExplicit'
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
rssFeed:
|
|
$ref: '#/components/schemas/rssFeed'
|
|
hasFeedOpen:
|
|
$ref: '#/components/schemas/hasFeedOpen'
|
|
responses:
|
|
badRequest:
|
|
description: Bad request.
|
|
content:
|
|
text/html:
|
|
schema:
|
|
type: string
|
|
example: Bad request.
|
|
forbidden:
|
|
description: Forbidden.
|
|
content:
|
|
text/html:
|
|
schema:
|
|
type: string
|
|
example: Forbidden.
|
|
notFound:
|
|
description: Item not found.
|
|
content:
|
|
text/html:
|
|
schema:
|
|
type: string
|
|
example: Item not found.
|
|
tags:
|
|
- name: Book
|
|
description: Book endpoints
|
|
paths:
|
|
/api/book/{id}:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathBookId'
|
|
get:
|
|
operationId: getBookById
|
|
summary: Get book by ID
|
|
description: Get a book by its ID. This endpoint returns all of the information needed for the book details page and editing.
|
|
tags:
|
|
- Book
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/bookObject'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
post:
|
|
operationId: updateBookById
|
|
summary: Update book by ID
|
|
description: Update a book by its ID. The request body should contain only the fields that need to be updated. If a field should be cleared, the field should exist and have a value of `null`. At least one field must be present.
|
|
tags:
|
|
- Book
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
title:
|
|
$ref: '#/components/schemas/titleNullable'
|
|
subtitle:
|
|
$ref: '#/components/schemas/subtitle'
|
|
authors:
|
|
$ref: '#/components/schemas/authorNameArray'
|
|
narrators:
|
|
$ref: '#/components/schemas/narratorNameArray'
|
|
description:
|
|
$ref: '#/components/schemas/description'
|
|
genres:
|
|
$ref: '#/components/schemas/genreArray'
|
|
tags:
|
|
$ref: '#/components/schemas/tagArray'
|
|
series:
|
|
$ref: '#/components/schemas/seriesSequenceArray'
|
|
publishYear:
|
|
$ref: '#/components/schemas/publishYear'
|
|
publisher:
|
|
$ref: '#/components/schemas/publisher'
|
|
isbn:
|
|
$ref: '#/components/schemas/isbn'
|
|
asin:
|
|
$ref: '#/components/schemas/asin'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/bookObject'
|
|
'400':
|
|
$ref: '#/components/responses/badRequest'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
delete:
|
|
operationId: deleteBookById
|
|
summary: Remove book by ID
|
|
description: Remove the book and associated entries from the database. This does not delete any files from the filesystem. If files should be deleted, use the `/api/book/{id}/hardDelete` endpoint instead.
|
|
tags:
|
|
- Book
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/bookObject'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/book/{id}/hardDelete:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathBookId'
|
|
delete:
|
|
operationId: hardDeleteBookById
|
|
summary: Hard delete book by ID
|
|
description: Hard delete the book and associated entries from the database. This deletes the book's files from the filesystem. This action cannot be undone.
|
|
tags:
|
|
- Book
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/bookObject'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/book/{id}/download:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathBookId'
|
|
get:
|
|
operationId: downloadBookById
|
|
summary: Download book by ID
|
|
description: Download the book by its ID. This endpoint will return the book's files as a zip archive.
|
|
tags:
|
|
- Book
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/zip:
|
|
schema:
|
|
type: string
|
|
format: binary
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/book/{id}/cover:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathBookId'
|
|
get:
|
|
operationId: getBookCoverById
|
|
summary: Get book cover by ID
|
|
description: Get the book cover by its ID. This endpoint will return the book's cover image. If no query parameters are provided, the image will be returned in the original format with the original dimensions.
|
|
tags:
|
|
- Book
|
|
parameters:
|
|
- name: width
|
|
in: query
|
|
required: false
|
|
description: The width of the image in pixels.
|
|
schema:
|
|
type: integer
|
|
minimum: 1
|
|
- name: height
|
|
in: query
|
|
required: false
|
|
description: The height of the image in pixels. If this parameter is not provided, the image will be scaled proportionally to the width.
|
|
schema:
|
|
type: integer
|
|
minimum: 1
|
|
- name: format
|
|
in: query
|
|
required: false
|
|
description: The format of the image. If not provided, the image will be returned in the original format.
|
|
schema:
|
|
type: string
|
|
enum: ['jpeg', 'png', 'webp']
|
|
default: 'jpeg'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
image/jpeg:
|
|
schema:
|
|
type: string
|
|
format: binary
|
|
image/png:
|
|
schema:
|
|
type: string
|
|
format: binary
|
|
image/webp:
|
|
schema:
|
|
type: string
|
|
format: binary
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
post:
|
|
operationId: uploadBookCoverById
|
|
summary: Upload book cover by ID
|
|
description: Upload the book cover image to the book by the book ID. This endpoint will replace the book's cover image with the provided image. The image should be in JPEG, PNG, or WebP format. Alternatively, the image can be provided as a URL to download the image from.
|
|
tags:
|
|
- Book
|
|
requestBody:
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
cover:
|
|
type: string
|
|
format: binary
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
url:
|
|
type: string
|
|
description: The URL to download the image from.
|
|
format: uri
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
success:
|
|
type: boolean
|
|
'400':
|
|
$ref: '#/components/responses/badRequest'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
patch:
|
|
operationId: updateBookCoverById
|
|
summary: Update book cover by ID
|
|
description: Update the book cover to be an existing image in the database. This endpoint will replace the book's cover image with the provided image. The image should be in JPEG, PNG, or WebP format.
|
|
tags:
|
|
- Book
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
coverId:
|
|
$ref: '#/components/schemas/itemId'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
success:
|
|
type: boolean
|
|
'400':
|
|
$ref: '#/components/responses/badRequest'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
delete:
|
|
operationId: deleteBookCoverById
|
|
summary: Remove book cover by ID
|
|
description: Remove the book cover image from the book. The cover image file is not deleted but is no longer associated with the book.
|
|
tags:
|
|
- Book
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
success:
|
|
type: boolean
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/book/{id}/match:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathBookId'
|
|
post:
|
|
operationId: matchBookById
|
|
summary: Match book by ID
|
|
description: Match the book selected by ID against an online database. This performs a quick match against the online database and returns the best match. Quick match will apply the cover from the first match and fill empty metadata fields. Metadata fields are not overwritten unless the "Prefer Matched Metadata" setting is enabled or the "force" query is set.
|
|
tags:
|
|
- Book
|
|
parameters:
|
|
- in: query
|
|
name: force
|
|
required: false
|
|
description: Whether to force the match and overwrite all metadata fields.
|
|
schema:
|
|
type: boolean
|
|
default: false
|
|
- in: query
|
|
name: provider
|
|
required: false
|
|
description: The provider to use for the match. If not provided, the default library provider will be used.
|
|
schema:
|
|
type: string
|
|
enum: ['google', 'openlibrary', 'goodreads']
|
|
- in: query
|
|
name: title
|
|
required: false
|
|
description: The title of the book to match.
|
|
schema:
|
|
type: string
|
|
- in: query
|
|
name: author
|
|
required: false
|
|
description: The author of the book to match.
|
|
schema:
|
|
type: string
|
|
- in: query
|
|
name: isbn
|
|
required: false
|
|
description: The ISBN of the book to match.
|
|
schema:
|
|
type: string
|
|
- in: query
|
|
name: asin
|
|
required: false
|
|
description: The ASIN of the book to match. Note that this needs to match the Audible page, not the Amazon page.
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/components/schemas/bookObject'
|
|
- type: object
|
|
properties:
|
|
updated:
|
|
type: boolean
|
|
description: Whether the book was updated with the match.
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/book/{id}/tracks:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathBookId'
|
|
patch:
|
|
operationId: updateBookTracksById
|
|
summary: Update book tracks
|
|
description: Update the book's audio tracks based on the provided file IDs. This endpoint will replace the book's audio tracks with the provided tracks. The tracks should be in the correct order.
|
|
tags:
|
|
- Book
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
trackIds:
|
|
type: array
|
|
description: The IDs of the audio files to use as tracks.
|
|
items:
|
|
$ref: '#/components/schemas/itemId'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/bookObject'
|
|
'400':
|
|
$ref: '#/components/responses/badRequest'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/book/{id}/scan:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathBookId'
|
|
post:
|
|
operationId: scanBookById
|
|
summary: Scan book by ID
|
|
description: Scan the book by its ID. This endpoint will scan the book's files and update the book's metadata based on the files found according to the metadata priority settings.
|
|
tags:
|
|
- Book
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/bookObject'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/podcast/{id}:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathPodcastId'
|
|
get:
|
|
operationId: getPodcastById
|
|
summary: Get podcast by ID
|
|
description: Get a podcast by its ID. This endpoint returns all of the information needed for the podcast details page and editing, but does not include file information or podcast episode information.
|
|
tags:
|
|
- Podcast
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/podcastObject'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
post:
|
|
operationId: updatePodcastById
|
|
summary: Update podcast by ID
|
|
description: Update a podcast by its ID. The request body should contain only the fields that need to be updated. If a field should be cleared, the field should exist and have a value of `null`. At least one field must be present.
|
|
tags:
|
|
- Podcast
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
title:
|
|
$ref: '#/components/schemas/titleNullable'
|
|
author:
|
|
type: string
|
|
description: The author or publisher of the podcast.
|
|
description:
|
|
$ref: '#/components/schemas/description'
|
|
genres:
|
|
$ref: '#/components/schemas/genreArray'
|
|
tags:
|
|
$ref: '#/components/schemas/tagArray'
|
|
releaseDate:
|
|
$ref: '#/components/schemas/publishDate'
|
|
itunesId:
|
|
$ref: '#/components/schemas/itunesId'
|
|
language:
|
|
$ref: '#/components/schemas/language'
|
|
explicit:
|
|
$ref: '#/components/schemas/isExplicit'
|
|
rssFeed:
|
|
$ref: '#/components/schemas/rssFeed'
|
|
type:
|
|
$ref: '#/components/schemas/podcastType'
|
|
autoDownloadEnabled:
|
|
$ref: '#/components/schemas/autoDownloadEnabled'
|
|
autoDownloadSchedule:
|
|
$ref: '#/components/schemas/autoDownloadSchedule'
|
|
maxEpisodesToKeep:
|
|
$ref: '#/components/schemas/maxEpisodesToKeep'
|
|
maxNewEpisodestoDownload:
|
|
$ref: '#/components/schemas/maxNewEpisodestoDownload'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/podcastObject'
|
|
'400':
|
|
$ref: '#/components/responses/badRequest'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
delete:
|
|
operationId: deletePodcastById
|
|
summary: Remove podcast by ID
|
|
description: Remove the podcast and associated entries from the database. This does not delete any files from the filesystem.
|
|
tags:
|
|
- Podcast
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/podcastObject'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/podcast/{id}/hardDelete:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathPodcastId'
|
|
delete:
|
|
operationId: hardDeletePodcastById
|
|
summary: Hard delete podcast by ID
|
|
description: Hard delete the podcast and associated entries from the database. This deletes the podcast's files from the filesystem. This action cannot be undone.
|
|
tags:
|
|
- Podcast
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/podcastObject'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/podcast/{id}/download:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathPodcastId'
|
|
get:
|
|
operationId: downloadPodcastById
|
|
summary: Download podcast by ID
|
|
description: Download the podcast by its ID. This endpoint will return the podcast's files as a zip archive.
|
|
tags:
|
|
- Podcast
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/zip:
|
|
schema:
|
|
type: string
|
|
format: binary
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/podcast/{id}/cover:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathPodcastId'
|
|
get:
|
|
operationId: getPodcastCoverById
|
|
summary: Get podcast cover by ID
|
|
description: Get the podcast cover by its ID. This endpoint will return the podcast's cover image. If no query parameters are provided, the image will be returned in the original format with the original dimensions.
|
|
tags:
|
|
- Podcast
|
|
parameters:
|
|
- name: width
|
|
in: query
|
|
required: false
|
|
description: The width of the image in pixels.
|
|
schema:
|
|
type: integer
|
|
minimum: 1
|
|
- name: height
|
|
in: query
|
|
required: false
|
|
description: The height of the image in pixels. If this parameter is not provided, the image will be scaled proportionally to the width.
|
|
schema:
|
|
type: integer
|
|
minimum: 1
|
|
- name: format
|
|
in: query
|
|
required: false
|
|
description: The format of the image. If not provided, the image will be returned in the original format.
|
|
schema:
|
|
type: string
|
|
enum: ['jpeg', 'png', 'webp']
|
|
default: 'jpeg'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
image/jpeg:
|
|
schema:
|
|
type: string
|
|
format: binary
|
|
image/png:
|
|
schema:
|
|
type: string
|
|
format: binary
|
|
image/webp:
|
|
schema:
|
|
type: string
|
|
format: binary
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
post:
|
|
operationId: uploadPodcastCoverById
|
|
summary: Upload podcast cover by ID
|
|
description: Upload the podcast cover image to the podcast by the podcast ID. This endpoint will replace the podcast's cover image with the provided image. The image should be in JPEG, PNG, or WebP format. Alternatively, the image can be provided as a URL to download the image from.
|
|
tags:
|
|
- Podcast
|
|
requestBody:
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
cover:
|
|
type: string
|
|
format: binary
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
url:
|
|
type: string
|
|
description: The URL to download the image from.
|
|
format: uri
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
success:
|
|
type: boolean
|
|
'400':
|
|
$ref: '#/components/responses/badRequest'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
patch:
|
|
operationId: updatePodcastCoverById
|
|
summary: Update podcast cover by ID
|
|
description: Update the podcast cover to be an existing image in the database. This endpoint will replace the podcast's cover image with the provided image. The image should be in JPEG, PNG, or WebP format.
|
|
tags:
|
|
- Podcast
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
coverId:
|
|
$ref: '#/components/schemas/itemId'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
success:
|
|
type: boolean
|
|
'400':
|
|
$ref: '#/components/responses/badRequest'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
delete:
|
|
operationId: deletePodcastCoverById
|
|
summary: Remove podcast cover by ID
|
|
description: Remove the podcast cover image from the podcast. The cover image file is not deleted but is no longer associated with the podcast.
|
|
tags:
|
|
- Podcast
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
coverPath:
|
|
$ref: '#/components/schemas/imagePath'
|
|
success:
|
|
type: boolean
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/podcast/{id}/match:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathPodcastId'
|
|
post:
|
|
operationId: matchPodcastById
|
|
summary: Match podcast by ID
|
|
description: Match the podcast selected by ID against an online database. This returns an array of possible matches. The user can select the best match from the list and select which metadata fields should be kept.
|
|
tags:
|
|
- Podcast
|
|
parameters:
|
|
- in: query
|
|
name: provider
|
|
required: false
|
|
description: The provider to use for the match. If not provided, the default library provider will be used.
|
|
schema:
|
|
type: string
|
|
enum: ['itunes', 'google', 'podcastindex']
|
|
- in: query
|
|
name: rssFeed
|
|
required: false
|
|
description: The RSS feed of the podcast to match.
|
|
schema:
|
|
type: string
|
|
- in: query
|
|
name: title
|
|
required: false
|
|
description: The title of the podcast to match.
|
|
schema:
|
|
type: string
|
|
- in: query
|
|
name: itunesId
|
|
required: false
|
|
description: The iTunes ID of the podcast to match.
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/podcastMatchObject'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/podcast/{id}/tracks:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathPodcastId'
|
|
get:
|
|
operationId: getPodcastTracksById
|
|
summary: Get podcast tracks by ID
|
|
description: Get the podcast's audio tracks by its ID. This endpoint will return the podcast's audio tracks.
|
|
tags:
|
|
- Podcast
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/audioTrack'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
patch:
|
|
operationId: updatePodcastTracksById
|
|
summary: Update podcast tracks by ID
|
|
description: Update the podcast's audio tracks based on the provided file IDs. This endpoint will replace the podcast's audio tracks with the provided tracks. The tracks should be in the correct order.
|
|
tags:
|
|
- Podcast
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
trackIds:
|
|
type: array
|
|
description: The IDs of the audio files to use as tracks.
|
|
items:
|
|
$ref: '#/components/schemas/itemId'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/podcastObject'
|
|
'400':
|
|
$ref: '#/components/responses/badRequest'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/podcast/{id}/scan:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathPodcastId'
|
|
post:
|
|
operationId: scanPodcastById
|
|
summary: Scan podcast by ID
|
|
description: Scan the podcast by its ID. This endpoint will scan the podcast's files and update the podcast's metadata based on the files found according to the metadata priority settings.
|
|
tags:
|
|
- Podcast
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/podcastObject'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/podcast/{id}/episodes:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathPodcastId'
|
|
get:
|
|
operationId: getPodcastEpisodesById
|
|
summary: Get podcast episodes by ID
|
|
description: Get the podcast's episodes by its ID. This endpoint will return the podcast's episodes.
|
|
tags:
|
|
- Podcast
|
|
parameters:
|
|
- in: query
|
|
name: limit
|
|
required: true
|
|
description: The maximum number of episodes to return. This defines the page size
|
|
schema:
|
|
type: integer
|
|
minimum: 1
|
|
default: 20
|
|
- in: query
|
|
name: page
|
|
required: true
|
|
description: The page of episodes to return. This is used in conjunction with the limit parameter.
|
|
schema:
|
|
type: integer
|
|
minimum: 1
|
|
default: 1
|
|
- in: query
|
|
name: sort
|
|
required: false
|
|
description: The field to sort the episodes by.
|
|
schema:
|
|
type: string
|
|
enum: ['releaseDate', 'title', 'duration', 'size', 'episodeNumber', 'seasonNumber']
|
|
default: 'releaseDate'
|
|
- in: query
|
|
name: filter
|
|
required: false
|
|
description: The field to filter the episodes by.
|
|
schema:
|
|
type: string
|
|
enum: ['incomplete', 'complete', 'in-progress', 'all']
|
|
default: 'incomplete'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
total:
|
|
type: integer
|
|
description: The total number of episodes.
|
|
returnCount:
|
|
type: integer
|
|
description: The number of episodes returned.
|
|
episodes:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/podcastEpisodeDisplayObject'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/podcast-episode/{id}:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathPodcastEpisodeId'
|
|
get:
|
|
operationId: getPodcastEpisodeById
|
|
summary: Get podcast episode by ID
|
|
description: Get a podcast episode by its ID. This endpoint returns all of the information needed for the podcast episode details page and editing.
|
|
tags:
|
|
- Podcast Episode
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/podcastEpisodeObject'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
post:
|
|
operationId: updatePodcastEpisodeById
|
|
summary: Update podcast episode by ID
|
|
description: Update a podcast episode by its ID. The request body should contain only the fields that need to be updated. If a field should be cleared, the field should exist and have a value of `null`. At least one field must be present.
|
|
tags:
|
|
- Podcast Episode
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
title:
|
|
$ref: '#/components/schemas/titleNullable'
|
|
description:
|
|
$ref: '#/components/schemas/description'
|
|
releaseDate:
|
|
$ref: '#/components/schemas/publishDate'
|
|
episodeNumber:
|
|
$ref: '#/components/schemas/episodeNumber'
|
|
seasonNumber:
|
|
$ref: '#/components/schemas/seasonNumber'
|
|
explicit:
|
|
$ref: '#/components/schemas/isExplicit'
|
|
#coverPath:
|
|
#$ref: '#/components/schemas/imagePath'
|
|
#hasFeedOpen:
|
|
#$ref: '#/components/schemas/hasFeedOpen'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/podcastEpisodeObject'
|
|
'400':
|
|
$ref: '#/components/responses/badRequest'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
delete:
|
|
operationId: deletePodcastEpisodeById
|
|
summary: Remove podcast episode by ID
|
|
description: Remove the podcast episode and associated entries from the database. This does not delete any files from the filesystem.
|
|
tags:
|
|
- Podcast Episode
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/podcastEpisodeObject'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/podcast-episode/{id}/hardDelete:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathPodcastEpisodeId'
|
|
delete:
|
|
operationId: hardDeletePodcastEpisodeById
|
|
summary: Hard delete podcast episode by ID
|
|
description: Hard delete the podcast episode and associated entries from the database. This deletes the podcast episode's files from the filesystem. This action cannot be undone.
|
|
tags:
|
|
- Podcast Episode
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/podcastEpisodeObject'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/podcast-episode/{id}/download:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathPodcastEpisodeId'
|
|
get:
|
|
operationId: downloadPodcastEpisodeById
|
|
summary: Download podcast episode by ID
|
|
description: Download the podcast episode by its ID. This endpoint will return the podcast episode file as a raw file.
|
|
tags:
|
|
- Podcast Episode
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/octet-stream:
|
|
schema:
|
|
type: string
|
|
format: binary
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/podcast-episode/{id}/match:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathPodcastEpisodeId'
|
|
post:
|
|
operationId: matchPodcastEpisodeById
|
|
summary: Match podcast episode by ID
|
|
description: Match the podcast episode selected by ID against an online database. This returns an array of possible matches. The user can select the best match from the list and select which metadata fields should be kept.
|
|
tags:
|
|
- Podcast Episode
|
|
parameters:
|
|
- in: query
|
|
name: title
|
|
required: false
|
|
description: The title of the podcast episode to match.
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
# TODO, verify this schema
|
|
$ref: '#/components/schemas/podcastEpisodeObject'
|
|
'403':
|
|
$ref: '#/components/responses/forbidden'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/library/{id}/books:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathLibraryId'
|
|
get:
|
|
operationId: getLibraryBooksById
|
|
summary: Get books in library
|
|
description: Get the books in the library by its ID. This endpoint will return the books in the library.
|
|
tags:
|
|
- Library
|
|
parameters:
|
|
- $ref: '#/components/parameters/queryLimit'
|
|
- $ref: '#/components/parameters/queryPage'
|
|
- $ref: '#/components/parameters/querySortBooks'
|
|
- $ref: '#/components/parameters/queryDesc'
|
|
- $ref: '#/components/parameters/queryFilterGenre'
|
|
- $ref: '#/components/parameters/queryFilterTag'
|
|
- $ref: '#/components/parameters/queryFilterAuthor'
|
|
- $ref: '#/components/parameters/queryFilterNarrator'
|
|
- $ref: '#/components/parameters/queryFilterSeries'
|
|
- $ref: '#/components/parameters/queryFilterPublisher'
|
|
- $ref: '#/components/parameters/queryFilterLanguage'
|
|
- $ref: '#/components/parameters/queryFilterProgress'
|
|
- $ref: '#/components/parameters/queryFilterMissing'
|
|
- $ref: '#/components/parameters/queryFilterTrackCount'
|
|
- $ref: '#/components/parameters/queryFilterEbook'
|
|
- $ref: '#/components/parameters/queryFilterAbridged'
|
|
- $ref: '#/components/parameters/queryFilterExplicit'
|
|
- $ref: '#/components/parameters/queryFilterIssues'
|
|
- $ref: '#/components/parameters/queryFilterFeedOpen'
|
|
- $ref: '#/components/parameters/queryFilterShareOpen'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
total:
|
|
type: integer
|
|
description: The total number of books.
|
|
returnCount:
|
|
type: integer
|
|
description: The number of books returned.
|
|
books:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/displayBookObject'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/library/{id}/podcasts:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathLibraryId'
|
|
get:
|
|
operationId: getLibraryPodcastsById
|
|
summary: Get podcasts in library
|
|
description: Get the podcasts in the library by its ID. This endpoint will return the podcasts in the library.
|
|
tags:
|
|
- Library
|
|
parameters:
|
|
- $ref: '#/components/parameters/queryLimit'
|
|
- $ref: '#/components/parameters/queryPage'
|
|
- $ref: '#/components/parameters/querySortPodcasts'
|
|
- $ref: '#/components/parameters/queryDesc'
|
|
- $ref: '#/components/parameters/queryFilterGenre'
|
|
- $ref: '#/components/parameters/queryFilterTag'
|
|
- $ref: '#/components/parameters/queryFilterLanguage'
|
|
- $ref: '#/components/parameters/queryFilterIssues'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
total:
|
|
type: integer
|
|
description: The total number of podcasts.
|
|
returnCount:
|
|
type: integer
|
|
description: The number of podcasts returned.
|
|
podcasts:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/displayPodcastObject'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|
|
/api/library/{id}/podcast-episodes:
|
|
parameters:
|
|
- $ref: '#/components/parameters/pathLibraryId'
|
|
get:
|
|
operationId: getLibraryPodcastEpisodesById
|
|
summary: Get podcast episodes in library
|
|
description: Get the podcast episodes in the library by its ID. This endpoint will return the podcast episodes in the library.
|
|
tags:
|
|
- Library
|
|
parameters:
|
|
- $ref: '#/components/parameters/queryLimit'
|
|
- $ref: '#/components/parameters/queryPage'
|
|
- in: query
|
|
name: sort
|
|
required: false
|
|
description: The field to sort the podcast episodes by.
|
|
schema:
|
|
type: string
|
|
enum: ['releaseDate', 'title', 'duration', 'size', 'episodeNumber', 'seasonNumber']
|
|
default: 'releaseDate'
|
|
- $ref: '#/components/parameters/queryDesc'
|
|
- in: query
|
|
name: filter
|
|
required: false
|
|
description: A key-value pair of how to filter podcast episodes. The key is the field to filter by and the value is the value to filter by. If the value is an array, the filter will be an OR filter.
|
|
schema:
|
|
type: string
|
|
enum: ['incomplete', 'complete', 'in-progress', 'all']
|
|
default: 'incomplete'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
total:
|
|
type: integer
|
|
description: The total number of podcast episodes.
|
|
returnCount:
|
|
type: integer
|
|
description: The number of podcast episodes returned.
|
|
episodes:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/displayPodcastEpisodeObject'
|
|
'404':
|
|
$ref: '#/components/responses/notFound'
|