Skip to content

Get a library

GET
/api/v1/libraries/{libraryId}
curl --request GET \
--url http://localhost:8080/api/v1/libraries/1 \
--header 'Authorization: Bearer <token>'
libraryId
required
integer format: int64

The library, including the state of its last scan.

Media typeapplication/json
object
id
required
integer format: int64
name
required
string
kind
required
string
Allowed values: folder source
path
required

The folder on the server, for folder libraries.

string | null
source

Where a source library reads from. Present only on source libraries.

object
type
required
string
Allowed values: komga kavita extension
url

The Komga or Kavita server’s address. Absent for an extension library.

string
extensionId

The extension an extension library runs on.

string
libraryIds

The Komga or Kavita libraries read; absent when every library the account sees is read. Kavita’s numeric ids are returned as strings.

Array<string>
progressUserId

The Chek user whose reading progress is written back to the Komga or Kavita account. Absent when none is.

integer format: int64
scan
required
object
status
required
string
Allowed values: idle scanning failed
error
required

Why the last scan failed.

string | null
finishedAt
required

When the last scan finished, whether or not it succeeded.

string | null format: date-time
createdAt
required
string format: date-time

Example

{
"kind": "folder",
"source": {
"type": "komga"
},
"scan": {
"status": "idle"
}
}

The request has no valid session token.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}

The resource does not exist.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}

The server failed; details are in its log.

Media typeapplication/json
object
code
required
string
Allowed values: bad_request unauthorized forbidden not_found unavailable scan_in_progress content_changed already_set_up name_taken last_admin progress_conflict too_many_attempts not_linked identity_taken last_sign_in provider_unavailable too_many_sign_ins repository_exists repository_not_allowed repository_unreadable repository_needs_token repository_needs_password repository_needs_credentials repository_credentials_refused extension_invalid source_failed source_unavailable source_check_failed internal
message
required

Explains the problem to a developer.

string

Example

{
"code": "bad_request"
}