Update a library
curl --request PATCH \
--url https://demo.komga.org/api/v1/libraries/{libraryId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"analyzeDimensions": true,
"convertToCbz": true,
"emptyTrashAfterScan": true,
"hashFiles": true,
"hashKoreader": true,
"hashPages": true,
"importBarcodeIsbn": true,
"importComicInfoBook": true,
"importComicInfoCollection": true,
"importComicInfoReadList": true,
"importComicInfoSeries": true,
"importComicInfoSeriesAppendVolume": true,
"importEpubBook": true,
"importEpubSeries": true,
"importLocalArtwork": true,
"importMylarSeries": true,
"name": "<string>",
"oneshotsDirectory": "<string>",
"repairExtensions": true,
"root": "<string>",
"scanCbx": true,
"scanDirectoryExclusions": [
"<string>"
],
"scanEpub": true,
"scanForceModifiedTime": true,
"scanOnStartup": true,
"scanPdf": true
}
'import requests
url = "https://demo.komga.org/api/v1/libraries/{libraryId}"
payload = {
"analyzeDimensions": True,
"convertToCbz": True,
"emptyTrashAfterScan": True,
"hashFiles": True,
"hashKoreader": True,
"hashPages": True,
"importBarcodeIsbn": True,
"importComicInfoBook": True,
"importComicInfoCollection": True,
"importComicInfoReadList": True,
"importComicInfoSeries": True,
"importComicInfoSeriesAppendVolume": True,
"importEpubBook": True,
"importEpubSeries": True,
"importLocalArtwork": True,
"importMylarSeries": True,
"name": "<string>",
"oneshotsDirectory": "<string>",
"repairExtensions": True,
"root": "<string>",
"scanCbx": True,
"scanDirectoryExclusions": ["<string>"],
"scanEpub": True,
"scanForceModifiedTime": True,
"scanOnStartup": True,
"scanPdf": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
analyzeDimensions: true,
convertToCbz: true,
emptyTrashAfterScan: true,
hashFiles: true,
hashKoreader: true,
hashPages: true,
importBarcodeIsbn: true,
importComicInfoBook: true,
importComicInfoCollection: true,
importComicInfoReadList: true,
importComicInfoSeries: true,
importComicInfoSeriesAppendVolume: true,
importEpubBook: true,
importEpubSeries: true,
importLocalArtwork: true,
importMylarSeries: true,
name: '<string>',
oneshotsDirectory: '<string>',
repairExtensions: true,
root: '<string>',
scanCbx: true,
scanDirectoryExclusions: ['<string>'],
scanEpub: true,
scanForceModifiedTime: true,
scanOnStartup: true,
scanPdf: true
})
};
fetch('https://demo.komga.org/api/v1/libraries/{libraryId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://demo.komga.org/api/v1/libraries/{libraryId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'analyzeDimensions' => true,
'convertToCbz' => true,
'emptyTrashAfterScan' => true,
'hashFiles' => true,
'hashKoreader' => true,
'hashPages' => true,
'importBarcodeIsbn' => true,
'importComicInfoBook' => true,
'importComicInfoCollection' => true,
'importComicInfoReadList' => true,
'importComicInfoSeries' => true,
'importComicInfoSeriesAppendVolume' => true,
'importEpubBook' => true,
'importEpubSeries' => true,
'importLocalArtwork' => true,
'importMylarSeries' => true,
'name' => '<string>',
'oneshotsDirectory' => '<string>',
'repairExtensions' => true,
'root' => '<string>',
'scanCbx' => true,
'scanDirectoryExclusions' => [
'<string>'
],
'scanEpub' => true,
'scanForceModifiedTime' => true,
'scanOnStartup' => true,
'scanPdf' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://demo.komga.org/api/v1/libraries/{libraryId}"
payload := strings.NewReader("{\n \"analyzeDimensions\": true,\n \"convertToCbz\": true,\n \"emptyTrashAfterScan\": true,\n \"hashFiles\": true,\n \"hashKoreader\": true,\n \"hashPages\": true,\n \"importBarcodeIsbn\": true,\n \"importComicInfoBook\": true,\n \"importComicInfoCollection\": true,\n \"importComicInfoReadList\": true,\n \"importComicInfoSeries\": true,\n \"importComicInfoSeriesAppendVolume\": true,\n \"importEpubBook\": true,\n \"importEpubSeries\": true,\n \"importLocalArtwork\": true,\n \"importMylarSeries\": true,\n \"name\": \"<string>\",\n \"oneshotsDirectory\": \"<string>\",\n \"repairExtensions\": true,\n \"root\": \"<string>\",\n \"scanCbx\": true,\n \"scanDirectoryExclusions\": [\n \"<string>\"\n ],\n \"scanEpub\": true,\n \"scanForceModifiedTime\": true,\n \"scanOnStartup\": true,\n \"scanPdf\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://demo.komga.org/api/v1/libraries/{libraryId}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"analyzeDimensions\": true,\n \"convertToCbz\": true,\n \"emptyTrashAfterScan\": true,\n \"hashFiles\": true,\n \"hashKoreader\": true,\n \"hashPages\": true,\n \"importBarcodeIsbn\": true,\n \"importComicInfoBook\": true,\n \"importComicInfoCollection\": true,\n \"importComicInfoReadList\": true,\n \"importComicInfoSeries\": true,\n \"importComicInfoSeriesAppendVolume\": true,\n \"importEpubBook\": true,\n \"importEpubSeries\": true,\n \"importLocalArtwork\": true,\n \"importMylarSeries\": true,\n \"name\": \"<string>\",\n \"oneshotsDirectory\": \"<string>\",\n \"repairExtensions\": true,\n \"root\": \"<string>\",\n \"scanCbx\": true,\n \"scanDirectoryExclusions\": [\n \"<string>\"\n ],\n \"scanEpub\": true,\n \"scanForceModifiedTime\": true,\n \"scanOnStartup\": true,\n \"scanPdf\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo.komga.org/api/v1/libraries/{libraryId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"analyzeDimensions\": true,\n \"convertToCbz\": true,\n \"emptyTrashAfterScan\": true,\n \"hashFiles\": true,\n \"hashKoreader\": true,\n \"hashPages\": true,\n \"importBarcodeIsbn\": true,\n \"importComicInfoBook\": true,\n \"importComicInfoCollection\": true,\n \"importComicInfoReadList\": true,\n \"importComicInfoSeries\": true,\n \"importComicInfoSeriesAppendVolume\": true,\n \"importEpubBook\": true,\n \"importEpubSeries\": true,\n \"importLocalArtwork\": true,\n \"importMylarSeries\": true,\n \"name\": \"<string>\",\n \"oneshotsDirectory\": \"<string>\",\n \"repairExtensions\": true,\n \"root\": \"<string>\",\n \"scanCbx\": true,\n \"scanDirectoryExclusions\": [\n \"<string>\"\n ],\n \"scanEpub\": true,\n \"scanForceModifiedTime\": true,\n \"scanOnStartup\": true,\n \"scanPdf\": true\n}"
response = http.request(request)
puts response.read_body{
"violations": [
{
"fieldName": "<string>",
"message": "<string>"
}
]
}Libraries
Update a library
You can omit fields you don’t want to update
Required role: ADMIN
PATCH
/
api
/
v1
/
libraries
/
{libraryId}
Update a library
curl --request PATCH \
--url https://demo.komga.org/api/v1/libraries/{libraryId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"analyzeDimensions": true,
"convertToCbz": true,
"emptyTrashAfterScan": true,
"hashFiles": true,
"hashKoreader": true,
"hashPages": true,
"importBarcodeIsbn": true,
"importComicInfoBook": true,
"importComicInfoCollection": true,
"importComicInfoReadList": true,
"importComicInfoSeries": true,
"importComicInfoSeriesAppendVolume": true,
"importEpubBook": true,
"importEpubSeries": true,
"importLocalArtwork": true,
"importMylarSeries": true,
"name": "<string>",
"oneshotsDirectory": "<string>",
"repairExtensions": true,
"root": "<string>",
"scanCbx": true,
"scanDirectoryExclusions": [
"<string>"
],
"scanEpub": true,
"scanForceModifiedTime": true,
"scanOnStartup": true,
"scanPdf": true
}
'import requests
url = "https://demo.komga.org/api/v1/libraries/{libraryId}"
payload = {
"analyzeDimensions": True,
"convertToCbz": True,
"emptyTrashAfterScan": True,
"hashFiles": True,
"hashKoreader": True,
"hashPages": True,
"importBarcodeIsbn": True,
"importComicInfoBook": True,
"importComicInfoCollection": True,
"importComicInfoReadList": True,
"importComicInfoSeries": True,
"importComicInfoSeriesAppendVolume": True,
"importEpubBook": True,
"importEpubSeries": True,
"importLocalArtwork": True,
"importMylarSeries": True,
"name": "<string>",
"oneshotsDirectory": "<string>",
"repairExtensions": True,
"root": "<string>",
"scanCbx": True,
"scanDirectoryExclusions": ["<string>"],
"scanEpub": True,
"scanForceModifiedTime": True,
"scanOnStartup": True,
"scanPdf": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
analyzeDimensions: true,
convertToCbz: true,
emptyTrashAfterScan: true,
hashFiles: true,
hashKoreader: true,
hashPages: true,
importBarcodeIsbn: true,
importComicInfoBook: true,
importComicInfoCollection: true,
importComicInfoReadList: true,
importComicInfoSeries: true,
importComicInfoSeriesAppendVolume: true,
importEpubBook: true,
importEpubSeries: true,
importLocalArtwork: true,
importMylarSeries: true,
name: '<string>',
oneshotsDirectory: '<string>',
repairExtensions: true,
root: '<string>',
scanCbx: true,
scanDirectoryExclusions: ['<string>'],
scanEpub: true,
scanForceModifiedTime: true,
scanOnStartup: true,
scanPdf: true
})
};
fetch('https://demo.komga.org/api/v1/libraries/{libraryId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://demo.komga.org/api/v1/libraries/{libraryId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'analyzeDimensions' => true,
'convertToCbz' => true,
'emptyTrashAfterScan' => true,
'hashFiles' => true,
'hashKoreader' => true,
'hashPages' => true,
'importBarcodeIsbn' => true,
'importComicInfoBook' => true,
'importComicInfoCollection' => true,
'importComicInfoReadList' => true,
'importComicInfoSeries' => true,
'importComicInfoSeriesAppendVolume' => true,
'importEpubBook' => true,
'importEpubSeries' => true,
'importLocalArtwork' => true,
'importMylarSeries' => true,
'name' => '<string>',
'oneshotsDirectory' => '<string>',
'repairExtensions' => true,
'root' => '<string>',
'scanCbx' => true,
'scanDirectoryExclusions' => [
'<string>'
],
'scanEpub' => true,
'scanForceModifiedTime' => true,
'scanOnStartup' => true,
'scanPdf' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://demo.komga.org/api/v1/libraries/{libraryId}"
payload := strings.NewReader("{\n \"analyzeDimensions\": true,\n \"convertToCbz\": true,\n \"emptyTrashAfterScan\": true,\n \"hashFiles\": true,\n \"hashKoreader\": true,\n \"hashPages\": true,\n \"importBarcodeIsbn\": true,\n \"importComicInfoBook\": true,\n \"importComicInfoCollection\": true,\n \"importComicInfoReadList\": true,\n \"importComicInfoSeries\": true,\n \"importComicInfoSeriesAppendVolume\": true,\n \"importEpubBook\": true,\n \"importEpubSeries\": true,\n \"importLocalArtwork\": true,\n \"importMylarSeries\": true,\n \"name\": \"<string>\",\n \"oneshotsDirectory\": \"<string>\",\n \"repairExtensions\": true,\n \"root\": \"<string>\",\n \"scanCbx\": true,\n \"scanDirectoryExclusions\": [\n \"<string>\"\n ],\n \"scanEpub\": true,\n \"scanForceModifiedTime\": true,\n \"scanOnStartup\": true,\n \"scanPdf\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://demo.komga.org/api/v1/libraries/{libraryId}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"analyzeDimensions\": true,\n \"convertToCbz\": true,\n \"emptyTrashAfterScan\": true,\n \"hashFiles\": true,\n \"hashKoreader\": true,\n \"hashPages\": true,\n \"importBarcodeIsbn\": true,\n \"importComicInfoBook\": true,\n \"importComicInfoCollection\": true,\n \"importComicInfoReadList\": true,\n \"importComicInfoSeries\": true,\n \"importComicInfoSeriesAppendVolume\": true,\n \"importEpubBook\": true,\n \"importEpubSeries\": true,\n \"importLocalArtwork\": true,\n \"importMylarSeries\": true,\n \"name\": \"<string>\",\n \"oneshotsDirectory\": \"<string>\",\n \"repairExtensions\": true,\n \"root\": \"<string>\",\n \"scanCbx\": true,\n \"scanDirectoryExclusions\": [\n \"<string>\"\n ],\n \"scanEpub\": true,\n \"scanForceModifiedTime\": true,\n \"scanOnStartup\": true,\n \"scanPdf\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo.komga.org/api/v1/libraries/{libraryId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"analyzeDimensions\": true,\n \"convertToCbz\": true,\n \"emptyTrashAfterScan\": true,\n \"hashFiles\": true,\n \"hashKoreader\": true,\n \"hashPages\": true,\n \"importBarcodeIsbn\": true,\n \"importComicInfoBook\": true,\n \"importComicInfoCollection\": true,\n \"importComicInfoReadList\": true,\n \"importComicInfoSeries\": true,\n \"importComicInfoSeriesAppendVolume\": true,\n \"importEpubBook\": true,\n \"importEpubSeries\": true,\n \"importLocalArtwork\": true,\n \"importMylarSeries\": true,\n \"name\": \"<string>\",\n \"oneshotsDirectory\": \"<string>\",\n \"repairExtensions\": true,\n \"root\": \"<string>\",\n \"scanCbx\": true,\n \"scanDirectoryExclusions\": [\n \"<string>\"\n ],\n \"scanEpub\": true,\n \"scanForceModifiedTime\": true,\n \"scanOnStartup\": true,\n \"scanPdf\": true\n}"
response = http.request(request)
puts response.read_body{
"violations": [
{
"fieldName": "<string>",
"message": "<string>"
}
]
}Authorizations
basicAuthapiKey
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
Body
application/json
Fields to update. You can omit fields you don't want to update.
Available options:
DISABLED, HOURLY, EVERY_6H, EVERY_12H, DAILY, WEEKLY Available options:
FIRST, FIRST_UNREAD_OR_FIRST, FIRST_UNREAD_OR_LAST, LAST Response
No Content