You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a consumer of the API, I want to know what version of the API/Schema the endpoint is implementing, so that I know how to marshall the response and what further queries, filters, etc are possible.
The text was updated successfully, but these errors were encountered:
This one's important for 1.3 IMO, I'd vote for the HTTP header implementation, it's simple and in every response automagically. A "cheap" HEAD request will get you the info you want then.
Letting people know the API version they are using is the first aim here. For that, I would suggest a custom HTTP response header that advertises the default version supported, e.g. PAR-Default-Version: 1.3 in the header. A quick HTTP HEAD request could then establish the version. There would be no way of knowing the version used for a URL as that information is in the header. ALL PAR response messages should contain a version attribute somewhere so that it's clear when looking at responses.
This would NOT be enough to support version negotiation. Support that through HTTP headers feels potentially clunky, but the following might work.
advertise the available versions in a second HTTP response header list, e.g. PAR-Available-Versions: 1.3; 1.2; 1.1`;
support negotiation via an HTTP request header, e.g. PAR-Version: 1.2; and
add a custom HTTP response in case the requested version is unavailable.
This would still leave some implementation details for endpoints to support different versions, as the incoming request header would have to be checked, and the appropriate routing would have to be done behind the scenes.
As a consumer of the API, I want to know what version of the API/Schema the endpoint is implementing, so that I know how to marshall the response and what further queries, filters, etc are possible.
The text was updated successfully, but these errors were encountered: