-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose a version method to the HTTP Rest API. #505
Conversation
Should this not be in a response header? |
@freeformz what do you have in mind ? Return the version as a header with every response or just when the endpoint is hit |
I think having the version exposed in the header of every response would be fantastic. Unfortunately this pull request is not about that.
|
My use case was more a simple way (without then need for calling a authenticated method) to get the version of the influxdb instance. For example a client application create a new connection and prints information about the new established connection. If the version information is only available for regular method, i need to make a call like describeDatabases just to get the version info. Maybe we can do both: |
I think we should add the header for now. I don't like adding a new endpoint, since we're planning on exposing a stats endpoint. The stats endpoint will replace the |
Ok, sounds like a plan. But actually there is no single place to add/set response headers in http/api.go. |
See |
… to every response.
Ok, i removed the /version call and put the version info into the Header. |
This will be great for Grafana :) |
Add a handy http rest api call to make it possible that clients can query the installed influxdb version.
Example usage:
curl http://localhost:8086/version
{"version":"dev","gitSha":"b12783456a0c6bfcdf4da5e71a431de35e6ad56b"}