Skip to content

Create a library

POST
/api/v1/libraries
curl --request POST \
--url http://127.0.0.1:58259/api/v1/libraries \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "icon": "example", "iconType": "PRIME_NG", "paths": [ { "id": 1, "libraryId": 1, "path": "example" } ], "watch": true, "formatPriority": [ "PDF" ], "allowedFormats": [ "PDF" ], "metadataSource": "EMBEDDED", "organizationMode": "BOOK_PER_FILE" }'

Create a new library. Requires admin or manipulation permission.

Media type application/json

Library creation request with paths to scan

object
name
required
string
>= 1 characters
icon
string
iconType
string
Allowed values: PRIME_NG CUSTOM_SVG
paths
required
Array<object>
>= 1 items
object
id
integer format: int64
libraryId
integer format: int64
path
string
watch
boolean
formatPriority
Array<string>
Allowed values: PDF EPUB CBX FB2 MOBI AZW3 AUDIOBOOK
allowedFormats
Array<string>
Allowed values: PDF EPUB CBX FB2 MOBI AZW3 AUDIOBOOK
metadataSource
string
Allowed values: EMBEDDED SIDECAR PREFER_SIDECAR PREFER_EMBEDDED NONE
organizationMode
string
Allowed values: BOOK_PER_FILE BOOK_PER_FOLDER AUTO_DETECT

Library created successfully

Media type */*
object
id
integer format: int64
name
string
sort
object
field
string
direction
string
Allowed values: ASCENDING DESCENDING
icon
string
iconType
string
Allowed values: PRIME_NG CUSTOM_SVG
fileNamingPattern
string
watch
boolean
paths
Array<object>
object
id
integer format: int64
libraryId
integer format: int64
path
string
formatPriority
Array<string>
Allowed values: PDF EPUB CBX FB2 MOBI AZW3 AUDIOBOOK
allowedFormats
Array<string>
Allowed values: PDF EPUB CBX FB2 MOBI AZW3 AUDIOBOOK
organizationMode
string
Allowed values: BOOK_PER_FILE BOOK_PER_FOLDER AUTO_DETECT
metadataSource
string
Allowed values: EMBEDDED SIDECAR PREFER_SIDECAR PREFER_EMBEDDED NONE