foundation-API
foundation-API copied to clipboard
Include information about client name and version when calling server API.
As a service provider it is important to identify clients which consume an API and their version. Reason being, sometimes there are bad requests, buggy versions, deprecate old versions, etc.
A suggestion is to use X-Client-Name and X-Client-Version.
Similar to: https://stackoverflow.com/questions/17491730/identifying-the-version-of-a-client-web-app-during-http-requests
From the discussion in the OpenCDE Documents API Project:
- The original idea was to use the
User-Agent
header - Since the
User-Agent
header can't be changed for browser based clients, the new proposal is to add custom headers
However, we're not sure if there's a use case where a browser-based client would use older versions instead of the latest one, and authenticated clients can always be identified via their OAuth2 token that is present in authenticated requests.
@bagabont, could you join the next BCF call to discuss this in more detail?
Hi Georg, we will try to join. Do you know if it would be possible to acquire the client version from the OAuth2 token?