With the on-going effort to release FTS-REST-Flask and decommission the old FTS-REST (Pylons) implementation, the need arises to distinguish clients.
This will be useful in tracking how many clients are on the old/new client, as well as providing backwards compatibility server-side.
FTS-REST clients should set the User-Agent header with the client version.
An additional field should be provided to request compatibility with the Pylons implementation.
The compatibility flag will let the FTS-REST-Flask server know whether the response should be backwards compatible.
Since we can't distinguish between the old FTS-Rest clients and other usages (e.g.: curl), the differentiation should be based on the client version.
Example: version >= 3.12.0 benefits from the new behavior, the rest go via the backwards compatible behavior
An extra requirement was raised. To distinguish requests coming from the CLI or the python binding clients, the requests should also set the User-Agent header with the origin of the request.
A request coming from the CLI:
A request coming from the python bindings: