Files
Nemera/docs/technical/api/library/written-content-library/book-library/Api.Books.md
T

27 KiB

Nemera API

Book

Add Book

Add Book Request

POST api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books
{
  "path": "/media/libraries/books/the-fellowship-of-the-ring.pdf",
  "metadata": {
    "title": "The Fellowship of the Ring",
    "originalTitle": "The Fellowship of the Ring",
    "description": "The first part of J.R.R. Tolkien's epic adventure The Lord of the Rings. In a sleepy village in the Shire, young Frodo Baggins finds himself faced with an immense task, as his elderly cousin Bilbo entrusts the Ring to his care. Frodo must leave his home and make a perilous journey across Middle-earth to the Cracks of Doom, there to destroy the Ring and foil the Dark Lord in his evil purpose.",
    "releaseInfo": {
      "originalReleaseDate": "1954-07-29",
      "originalReleaseYear": 1954,
      "reReleaseDate": "2001-09-06",
      "reReleaseYear": 2001,
      "releaseCountry": "GB",
      "releaseVersion": "50th Anniversary Edition"
    },
    "genres": [
      { "name": "fantasy" },
      { "name": "adventure" },
      { "name": "classic" }
    ],
    "tags": [
      { "name": "epic fantasy" },
      { "name": "quest" },
      { "name": "middle-earth" }
    ],
    "language": {
      "languageCode": "en",
      "languageName": "English",
      "nativeName": "English"
    },
    "originalLanguage": {
      "languageCode": "en",
      "languageName": "English",
      "nativeName": "English"
    },
    "publisher": "Houghton Mifflin",
    "pageCount": 398
  },
  "format": "Paperback",
  "edition": "50th Anniversary Edition",
  "volumeNumber": 1,
  "series": {
    "title": "The Lord of the Rings"
  },
  "asin": "B007978NPG",
  "goodreadsId": "3",
  "lccn": "54009621",
  "oclcNumber": "ocm00012345",
  "openLibraryId": "OL7603910M",
  "libraryThingId": "3203347",
  "googleBooksId": "aWZzLPhY4o0C",
  "barnesAndNobleId": "1100307790",
  "appleBooksId": "id395211",
  "isbns": [
    {
      "value": "0395272238",
      "format": "Isbn10"
    },
    {
      "value": "9780395272237",
      "format": "Isbn13"
    }
  ],
  "contributors": [
    {
      "contributorId": "6a3f0c2d-1b4e-4f5a-8c6d-9e0f1a2b3c4d",
      "role": "Author"
    },
    {
      "contributorId": "7b4e1d3f-2c5a-4e6b-9d7e-0f1a2b3c4d5e",
      "role": "Illustrator"
    }
  ],
  "ratings": [
    {
      "source": "GoogleBooks",
      "value": 4.36,
      "maxValue": 5,
      "voteCount": 2345678
    },
    {
      "source": "Amazon",
      "value": 4.7,
      "maxValue": 5,
      "voteCount": 87654
    }
  ]
}

Add Book Response

201 Created
{
  "id": "32b336e8-dafc-4a08-9dec-9454e66dd55d",
  "libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
  "path": "/media/libraries/books/the-fellowship-of-the-ring.pdf",
  "metadata": {
    "publisher": "Houghton Mifflin",
    "pageCount": 398,
    "title": "The Fellowship of the Ring",
    "originalTitle": "The Fellowship of the Ring",
    "description": "The first part of J.R.R. Tolkien's epic adventure The Lord of the Rings. In a sleepy village in the Shire, young Frodo Baggins finds himself faced with an immense task, as his elderly cousin Bilbo entrusts the Ring to his care. Frodo must leave his home and make a perilous journey across Middle-earth to the Cracks of Doom, there to destroy the Ring and foil the Dark Lord in his evil purpose.",
    "releaseInfo": {
      "originalReleaseDate": "1954-07-29",
      "originalReleaseYear": 1954,
      "reReleaseDate": "2001-09-06",
      "reReleaseYear": 2001,
      "releaseCountry": "GB",
      "releaseVersion": "50th Anniversary Edition"
    },
    "language": {
      "languageCode": "en",
      "languageName": "English",
      "nativeName": "English"
    },
    "originalLanguage": {
      "languageCode": "en",
      "languageName": "English",
      "nativeName": "English"
    },
    "tags": [
      {
        "name": "epic fantasy"
      },
      {
        "name": "quest"
      },
      {
        "name": "middle-earth"
      }
    ],
    "genres": [
      {
        "name": "fantasy"
      },
      {
        "name": "adventure"
      },
      {
        "name": "classic"
      }
    ]
  },
  "format": "Paperback",
  "edition": "50th Anniversary Edition",
  "volumeNumber": 1,
  "series": null,
  "asin": "B007978NPG",
  "goodreadsId": "3",
  "lccn": "54009621",
  "oclcNumber": "ocm00012345",
  "openLibraryId": "OL7603910M",
  "libraryThingId": "3203347",
  "googleBooksId": "aWZzLPhY4o0C",
  "barnesAndNobleId": "1100307790",
  "appleBooksId": "id395211",
  "isbns": [
    {
      "value": "0395272238",
      "format": "Isbn10"
    },
    {
      "value": "9780395272237",
      "format": "Isbn13"
    }
  ],
  "contributors": [
    { "contributorId": "6a3f0c2d-1b4e-4f5a-8c6d-9e0f1a2b3c4d", "role": "Author" },
    { "contributorId": "7b4e1d3f-2c5a-4e6b-9d7e-0f1a2b3c4d5e", "role": "Illustrator" }
  ],
  "ratings": [
    {
      "source": "GoogleBooks",
      "value": 4.36,
      "maxValue": 5,
      "voteCount": 2345678
    },
    {
      "source": "Amazon",
      "value": 4.7,
      "maxValue": 5,
      "voteCount": 87654
    }
  ],
  "metadataStatus": "Pending",
  "lastMetadataUpdateUtc": null,
  "metadataProvider": null,
  "createdOnUtc": "2025-01-01T12:00:00.0000000Z",
  "updatedOnUtc": null,
  "coverPath": "/media/books/books-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/J.R.R. Tolkien/The Fellowship of the Ring-32b336e8-dafc-4a08-9dec-9454e66dd55d/cover.jpg"
}

Get Book

Get Book Request

GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books/{bookId}

Get Book Response

200 Ok
{
  "id": "32b336e8-dafc-4a08-9dec-9454e66dd55d",
  "libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
  "path": "/media/libraries/books/the-fellowship-of-the-ring.pdf",
  "metadata": {
    "publisher": "Houghton Mifflin",
    "pageCount": 398,
    "title": "The Fellowship of the Ring",
    "originalTitle": "The Fellowship of the Ring",
    "description": "The first part of J.R.R. Tolkien's epic adventure The Lord of the Rings. In a sleepy village in the Shire, young Frodo Baggins finds himself faced with an immense task, as his elderly cousin Bilbo entrusts the Ring to his care. Frodo must leave his home and make a perilous journey across Middle-earth to the Cracks of Doom, there to destroy the Ring and foil the Dark Lord in his evil purpose.",
    "releaseInfo": {
      "originalReleaseDate": "1954-07-29",
      "originalReleaseYear": 1954,
      "reReleaseDate": "2001-09-06",
      "reReleaseYear": 2001,
      "releaseCountry": "GB",
      "releaseVersion": "50th Anniversary Edition"
    },
    "language": {
      "languageCode": "en",
      "languageName": "English",
      "nativeName": "English"
    },
    "originalLanguage": {
      "languageCode": "en",
      "languageName": "English",
      "nativeName": "English"
    },
    "tags": [
      {
        "name": "epic fantasy"
      },
      {
        "name": "quest"
      },
      {
        "name": "middle-earth"
      }
    ],
    "genres": [
      {
        "name": "fantasy"
      },
      {
        "name": "adventure"
      },
      {
        "name": "classic"
      }
    ]
  },
  "format": "Paperback",
  "edition": "50th Anniversary Edition",
  "volumeNumber": 1,
  "series": null,
  "asin": "B007978NPG",
  "goodreadsId": "3",
  "lccn": "54009621",
  "oclcNumber": "ocm00012345",
  "openLibraryId": "OL7603910M",
  "libraryThingId": "3203347",
  "googleBooksId": "aWZzLPhY4o0C",
  "barnesAndNobleId": "1100307790",
  "appleBooksId": "id395211",
  "isbns": [
    {
      "value": "0395272238",
      "format": "Isbn10"
    },
    {
      "value": "9780395272237",
      "format": "Isbn13"
    }
  ],
  "contributors": [
    { "contributorId": "6a3f0c2d-1b4e-4f5a-8c6d-9e0f1a2b3c4d", "role": "Author" },
    { "contributorId": "7b4e1d3f-2c5a-4e6b-9d7e-0f1a2b3c4d5e", "role": "Illustrator" }
  ],
  "ratings": [
    {
      "source": "GoogleBooks",
      "value": 4.36,
      "maxValue": 5,
      "voteCount": 2345678
    },
    {
      "source": "Amazon",
      "value": 4.7,
      "maxValue": 5,
      "voteCount": 87654
    }
  ],
  "metadataStatus": "Pending",
  "lastMetadataUpdateUtc": null,
  "metadataProvider": null,
  "createdOnUtc": "2025-01-01T12:00:00.0000000Z",
  "updatedOnUtc": null,
  "coverPath": "/media/books/books-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/J.R.R. Tolkien/The Fellowship of the Ring-32b336e8-dafc-4a08-9dec-9454e66dd55d/cover.jpg"
}

Get Books

Get Books Request

GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books?currentPage=1&perPage=10&searchTerm=fellowship&sortBy=title&sortOrder=Ascending
Query Parameter Type Description
currentPage int Optional. The page of results to retrieve.
perPage int Optional. The maximum number of books to retrieve per page.
searchTerm string Optional. The search term used to filter results.
sortBy string Optional. The name of the field by which to sort the results.
sortOrder string Optional. The direction in which to sort the results (Ascending or Descending).

Get Books Response

200 Ok
{
  "data": [
    {
      "id": "32b336e8-dafc-4a08-9dec-9454e66dd55d",
      "libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
      "path": "/media/libraries/books/the-fellowship-of-the-ring.pdf",
      "metadata": {
        "title": "The Fellowship of the Ring",
        "originalTitle": "The Fellowship of the Ring",
        "description": "The first part of J.R.R. Tolkien's epic adventure The Lord of the Rings.",
        "releaseInfo": {
          "originalReleaseDate": "1954-07-29",
          "originalReleaseYear": 1954,
          "reReleaseDate": "2001-09-06",
          "reReleaseYear": 2001,
          "releaseCountry": "GB",
          "releaseVersion": "50th Anniversary Edition"
        },
        "genres": [
          { "name": "fantasy" },
          { "name": "adventure" },
          { "name": "classic" }
        ],
        "tags": [
          { "name": "epic fantasy" },
          { "name": "quest" },
          { "name": "middle-earth" }
        ],
        "language": {
          "languageCode": "en",
          "languageName": "English",
          "nativeName": "English"
        },
        "originalLanguage": {
          "languageCode": "en",
          "languageName": "English",
          "nativeName": "English"
        },
        "publisher": "Houghton Mifflin",
        "pageCount": 398
      },
      "format": "Paperback",
      "edition": "50th Anniversary Edition",
      "volumeNumber": 1,
      "series": null,
      "asin": "B007978NPG",
      "goodreadsId": "3",
      "lccn": "54009621",
      "oclcNumber": "ocm00012345",
      "openLibraryId": "OL7603910M",
      "libraryThingId": "3203347",
      "googleBooksId": "aWZzLPhY4o0C",
      "barnesAndNobleId": "1100307790",
      "appleBooksId": "id395211",
      "isbns": [
        {
          "value": "0395272238",
          "format": "Isbn10"
        },
        {
          "value": "9780395272237",
          "format": "Isbn13"
        }
      ],
      "contributors": [
        { "contributorId": "6a3f0c2d-1b4e-4f5a-8c6d-9e0f1a2b3c4d", "role": "Author" },
        { "contributorId": "7b4e1d3f-2c5a-4e6b-9d7e-0f1a2b3c4d5e", "role": "Illustrator" }
      ],
      "ratings": [
        {
          "source": "GoogleBooks",
          "value": 4.36,
          "maxValue": 5,
          "voteCount": 2345678
        },
        {
          "source": "Amazon",
          "value": 4.7,
          "maxValue": 5,
          "voteCount": 87654
        }
      ],
      "metadataStatus": "Pending",
      "lastMetadataUpdateUtc": null,
      "metadataProvider": null,
      "createdOnUtc": "2025-01-01T12:00:00.0000000Z",
      "updatedOnUtc": null,
      "coverPath": "/media/books/books-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/J.R.R. Tolkien/The Fellowship of the Ring-32b336e8-dafc-4a08-9dec-9454e66dd55d/cover.jpg"
    }
  ],
  "currentPage": 1,
  "perPage": 10,
  "count": 1,
  "numberOfPages": 1
}

Get Books Lite

Get Books Lite Request

GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books/lite?currentPage=1&perPage=10&searchTerm=fellowship&filterAlphaKey=f&shouldIgnoreThePrefixForAlphaPicker=true&sortBy=title&sortOrder=Ascending
Query Parameter Type Description
currentPage int Optional. The page of results to retrieve.
perPage int Optional. The maximum number of books to retrieve per page.
searchTerm string Optional. The search term used to filter results.
filterAlphaKey string Optional. Filters results by the first character of their title. A single ASCII letter (case-insensitive), # for titles starting with a digit, or * for titles starting with any other character.
shouldIgnoreThePrefixForAlphaPicker bool Whether the leading "The " prefix of a title should be ignored when computing the alpha key.
sortBy string Optional. The name of the field by which to sort the results.
sortOrder string Optional. The direction in which to sort the results (Ascending or Descending).

Get Books Lite Response

200 Ok
{
  "data": [
    {
      "id": "32b336e8-dafc-4a08-9dec-9454e66dd55d",
      "title": "The Fellowship of the Ring",
      "releaseYear": 1954,
      "coverPath": "/media/books/books-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/J.R.R. Tolkien/The Fellowship of the Ring-32b336e8-dafc-4a08-9dec-9454e66dd55d/cover.jpg"
    }
  ],
  "currentPage": 1,
  "perPage": 10,
  "count": 1,
  "numberOfPages": 1
}

Update Book

Update Book Request

PUT api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books/{bookId}
{
  "metadata": {
    "title": "The Fellowship of the Ring",
    "originalTitle": "The Fellowship of the Ring",
    "description": "The first part of J.R.R. Tolkien's epic adventure The Lord of the Rings. In a sleepy village in the Shire, young Frodo Baggins finds himself faced with an immense task, as his elderly cousin Bilbo entrusts the Ring to his care. Frodo must leave his home and make a perilous journey across Middle-earth to the Cracks of Doom, there to destroy the Ring and foil the Dark Lord in his evil purpose.",
    "releaseInfo": {
      "originalReleaseDate": "1954-07-29",
      "originalReleaseYear": 1954,
      "reReleaseDate": "2001-09-06",
      "reReleaseYear": 2001,
      "releaseCountry": "GB",
      "releaseVersion": "50th Anniversary Edition"
    },
    "genres": [
      { "name": "fantasy" },
      { "name": "adventure" },
      { "name": "classic" }
    ],
    "tags": [
      { "name": "epic fantasy" },
      { "name": "quest" },
      { "name": "middle-earth" }
    ],
    "language": {
      "languageCode": "en",
      "languageName": "English",
      "nativeName": "English"
    },
    "originalLanguage": {
      "languageCode": "en",
      "languageName": "English",
      "nativeName": "English"
    },
    "publisher": "Houghton Mifflin",
    "pageCount": 398
  },
  "format": "Paperback",
  "edition": "50th Anniversary Edition",
  "volumeNumber": 1,
  "series": {
    "title": "The Lord of the Rings"
  },
  "asin": "B007978NPG",
  "goodreadsId": "3",
  "lccn": "54009621",
  "oclcNumber": "ocm00012345",
  "openLibraryId": "OL7603910M",
  "libraryThingId": "3203347",
  "googleBooksId": "aWZzLPhY4o0C",
  "barnesAndNobleId": "1100307790",
  "appleBooksId": "id395211",
  "isbns": [
    {
      "value": "0395272238",
      "format": "Isbn10"
    },
    {
      "value": "9780395272237",
      "format": "Isbn13"
    }
  ],
  "contributors": [
    {
      "contributorId": "6a3f0c2d-1b4e-4f5a-8c6d-9e0f1a2b3c4d",
      "role": "Author"
    },
    {
      "contributorId": "7b4e1d3f-2c5a-4e6b-9d7e-0f1a2b3c4d5e",
      "role": "Illustrator"
    }
  ],
  "ratings": [
    {
      "source": "GoogleBooks",
      "value": 4.36,
      "maxValue": 5,
      "voteCount": 2345678
    },
    {
      "source": "Amazon",
      "value": 4.7,
      "maxValue": 5,
      "voteCount": 87654
    }
  ]
}

Update Book Response

200 Ok
{
  "id": "32b336e8-dafc-4a08-9dec-9454e66dd55d",
  "libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
  "path": "/media/libraries/books/the-fellowship-of-the-ring.pdf",
  "metadata": {
    "publisher": "Houghton Mifflin",
    "pageCount": 398,
    "title": "The Fellowship of the Ring",
    "originalTitle": "The Fellowship of the Ring",
    "description": "The first part of J.R.R. Tolkien's epic adventure The Lord of the Rings. In a sleepy village in the Shire, young Frodo Baggins finds himself faced with an immense task, as his elderly cousin Bilbo entrusts the Ring to his care. Frodo must leave his home and make a perilous journey across Middle-earth to the Cracks of Doom, there to destroy the Ring and foil the Dark Lord in his evil purpose.",
    "releaseInfo": {
      "originalReleaseDate": "1954-07-29",
      "originalReleaseYear": 1954,
      "reReleaseDate": "2001-09-06",
      "reReleaseYear": 2001,
      "releaseCountry": "GB",
      "releaseVersion": "50th Anniversary Edition"
    },
    "language": {
      "languageCode": "en",
      "languageName": "English",
      "nativeName": "English"
    },
    "originalLanguage": {
      "languageCode": "en",
      "languageName": "English",
      "nativeName": "English"
    },
    "tags": [
      {
        "name": "epic fantasy"
      },
      {
        "name": "quest"
      },
      {
        "name": "middle-earth"
      }
    ],
    "genres": [
      {
        "name": "fantasy"
      },
      {
        "name": "adventure"
      },
      {
        "name": "classic"
      }
    ]
  },
  "format": "Paperback",
  "edition": "50th Anniversary Edition",
  "volumeNumber": 1,
  "series": null,
  "asin": "B007978NPG",
  "goodreadsId": "3",
  "lccn": "54009621",
  "oclcNumber": "ocm00012345",
  "openLibraryId": "OL7603910M",
  "libraryThingId": "3203347",
  "googleBooksId": "aWZzLPhY4o0C",
  "barnesAndNobleId": "1100307790",
  "appleBooksId": "id395211",
  "isbns": [
    {
      "value": "0395272238",
      "format": "Isbn10"
    },
    {
      "value": "9780395272237",
      "format": "Isbn13"
    }
  ],
  "contributors": [
    { "contributorId": "6a3f0c2d-1b4e-4f5a-8c6d-9e0f1a2b3c4d", "role": "Author" },
    { "contributorId": "7b4e1d3f-2c5a-4e6b-9d7e-0f1a2b3c4d5e", "role": "Illustrator" }
  ],
  "ratings": [
    {
      "source": "GoogleBooks",
      "value": 4.36,
      "maxValue": 5,
      "voteCount": 2345678
    },
    {
      "source": "Amazon",
      "value": 4.7,
      "maxValue": 5,
      "voteCount": 87654
    }
  ],
  "metadataStatus": "Enriched",
  "lastMetadataUpdateUtc": "2025-01-01T12:00:00.0000000Z",
  "metadataProvider": "GoogleBooks",
  "createdOnUtc": "2025-01-01T12:00:00.0000000Z",
  "updatedOnUtc": "2025-02-01T12:00:00.0000000Z",
  "coverPath": "/media/books/books-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/J.R.R. Tolkien/The Fellowship of the Ring-32b336e8-dafc-4a08-9dec-9454e66dd55d/cover.jpg"
}

Update Book Cover

Updates the cover image of the book identified by bookId with the image uploaded in the multipart form of the request. The book must belong to the media library identified by libraryId, and the uploaded file must be an image.

Update Book Cover Request

PUT api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books/{bookId}/cover
Content-Type: multipart/form-data; boundary=NemeraBoundary

--NemeraBoundary
Content-Disposition: form-data; name="cover"; filename="cover.jpg"
Content-Type: image/jpeg

< ./cover.jpg
--NemeraBoundary--

Update Book Cover Response

200 Ok
{
  "coverPath": "/media/books/books-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/J.R.R. Tolkien/The Fellowship of the Ring-32b336e8-dafc-4a08-9dec-9454e66dd55d/cover.jpg"
}

Get Reading Availability

Get Reading Availability Request

GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books/{bookId}/reading/availability

Reports whether the book identified by bookId can be opened for reading: the book reader that supports the format of the book is resolved and its enablement for the media library of the book is checked, without extracting the book. When the book cannot be read, the response carries the code of the error preventing it, so the client can tell a missing book reader apart from a disabled one.

Get Reading Availability Response

200 Ok
{
  "bookId": "32b336e8-dafc-4a08-9dec-9454e66dd55d",
  "libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
  "isAvailable": true,
  "errorCode": null
}

Get Reading Manifest

Get Reading Manifest Request

GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books/{bookId}/reading/manifest

Opens the book identified by bookId for reading by extracting its contents through the book reader that is enabled for its media library, and returns the reading manifest: the title and author of the book, its hierarchical table of contents, its ordered spine of reading sections, the keys of its resources, and whether it has extractable text content. A scanned book, whose pages are only images, has no text content and is displayed as page images.

Get Reading Manifest Response

200 Ok
{
  "title": "The Fellowship of the Ring",
  "author": "J.R.R. Tolkien",
  "coverResourceKey": "0f4d6e2b1c9a4f3e8d7c6b5a4f3e2d1c",
  "tableOfContents": [
    {
      "label": "Chapter One",
      "locationRef": "chapter1",
      "children": [
        {
          "label": "Part One",
          "locationRef": "chapter1",
          "children": []
        }
      ]
    }
  ],
  "spine": [
    {
      "locationRef": "chapter1",
      "title": "Chapter One"
    },
    {
      "locationRef": "chapter2",
      "title": "Chapter Two"
    }
  ],
  "resourceKeys": [
    "0f4d6e2b1c9a4f3e8d7c6b5a4f3e2d1c"
  ],
  "hasTextContent": true
}

Get Reading Section

Get Reading Section Request

GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books/{bookId}/reading/sections/{locationRef}

Returns the reading section identified by locationRef of the book identified by bookId. The section content is sanitized by the host before it is served, and its references to the resources of the book are resolved by the client through the resource endpoint. The locationRef of a section is taken from the spine of the reading manifest of the book.

Get Reading Section Response

200 Ok
{
  "locationRef": "chapter1",
  "title": "Chapter One",
  "contentHtml": "<section><h1>Chapter One</h1><p>First paragraph.</p></section>"
}

Get Reading Resource

Get Reading Resource Request

GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books/{bookId}/reading/resources/{resourceKey}

Returns the binary resource identified by resourceKey of the book identified by bookId (for example an image, a font, or a stylesheet of the book, or a page image of a scanned PDF that is rendered on demand). The resourceKey of a resource is taken from the reading manifest of the book.

Get Reading Resource Response

200 Ok

The response is the raw bytes of the resource, served with the Content-Type of the resource and with X-Content-Type-Options: nosniff. A resource whose declared media type could be rendered as an active document (for example an SVG) is served as an opaque binary download instead.

Get Deleted Books

Get Deleted Books Request

GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books/deleted-items

Returns the books of the media library identified by the route that the user deleted and that can still be restored. The books are ordered by the time they were deleted, most recent first.

Get Deleted Books Response

200 Ok
[
  {
    "id": "f4c8a9a0-3d77-4e86-9b1a-2f7a5c4b6d31",
    "libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
    "title": "The Fellowship of the Ring",
    "originalTitle": null,
    "path": "/media/libraries/books/the-fellowship-of-the-ring.pdf",
    "deletedOnUtc": "2026-11-12T10:15:30Z",
    "coverPath": "/media/books/books-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/J.R.R. Tolkien/The Fellowship of the Ring-f4c8a9a0-3d77-4e86-9b1a-2f7a5c4b6d31/cover.jpg"
  }
]

Delete Book

Delete Book Request

DELETE api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books/{bookId}

Delete Book Response

200 Ok

Moves the book identified by the route to the deleted items of its media library. The book is no longer listed, read or materialized again by automatic scans, and its metadata and stored artwork are kept so that it can be restored. The deleted row keeps its file system path reserved in the library, so a later scan does not add the file back. The path stays reserved until the book is restored, or until the file disappears from disk and the scan permanently removes the deleted row.

Restore Book

Restore Book Request

POST api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/books/{bookId}/restore

Restore Book Response

200 Ok

Restores the deleted book identified by the route to the catalogue of its media library, together with the metadata and artwork that were kept while it was deleted. The path of the restored book stops being reserved by the deletion state, and the book is returned to the ordinary catalogue reads and scans.