komga icon indicating copy to clipboard operation
komga copied to clipboard

API v3 considerations and requirements

Open gotson opened this issue 4 years ago • 0 comments
trafficstars

Komga had a public api since the beginning, and despite very few change of contracts, it's been mostly stable so far. It has however some limitations that starts to show.

This is to summarize what will need to be done when bumping the API endpoints to v3.

  • Should not return serialized PageImpl as the contract is not guaranteed
  • collections should always return paged data, never a scalar
  • collections should support unpaged
  • collections should return shallow resources
  • single resource endpoints should return detailed resource
  • when it makes sense, we should break up single resource endpoint in multiple. For example how we get the book and it's pages separately.
  • enum parameters should not leak from the domain model?
  • Library deletion should return 202 Accepted and be done asynchronously, as deletion can take a long time with a huge library

gotson avatar May 28 '21 02:05 gotson

Question, does the api allow for third party apps to update things like read status, what page you're on, ect?

Bitwolfies avatar Jun 10 '21 11:06 Bitwolfies

Question, does the api allow for third party apps to update things like read status, what page you're on, ect?

Out of topic, but yes of course. See https://komga.org/guides/rest.html

gotson avatar Jun 10 '21 11:06 gotson