This repository was archived by the owner on Feb 16, 2023. It is now read-only.
Improve API Versioning #957
bauerj
started this conversation in
Feature Requests
Replies: 1 comment 1 reply
-
I can certainly change the behavior. The reason for serving version 1 by default is as follows: don't break existing API clients when users update their paperless server. I don't think I can do Does this sound about right?
I don't have all that much experience with this stuff, unfortunately :( |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As it is currently implemented, the API versioning leads to a lot of additional requests from the client to determine a common API version.
See this example for a client that supports API version 3 and a server that supports version 2:
X-API-Version
header)X-API-Version: 2
X-API-Version: 2
Those are two unnecessary requests before any data can be shown to the user, which would slow the app down dramatically.
For my use-case it would be better if the server would return the highest available API version if the requested version is not supported. If there are already clients that rely on the 406-handshake behaviour, maybe a special syntax like
Accept: application/json, version<3
could be used.What do you think? Would it be possible to change the behaviour like that?
Beta Was this translation helpful? Give feedback.
All reactions