REST API to expose the Redmine version
|Target version:||Candidate for next major release|
After reading Alexey Skor's forum post about the API versions, I think it would make 3rd party development easier if Redmine had a REST API method to find out what version of Redmine the server is running.
That way a client can check to see if the server supports the API requests it needs (e.g. 1.0+ has an issues API, 0.9 doesn't).
#9 Updated by Alex Last over 6 years ago
Redmine 3.x broke backward compatibility again - the date format used by it is different from Redmine 2.6.2:
From redmine 2.6.0: "updated_on":"2015-01-23T00:15:24Z"
From redmine 3.0.0: "updated_on":"2015-01-29T10:06:19.000Z"
one of our users submitted this bug report: https://github.com/taskadapter/redmine-java-api/pull/175
if we could query Redmine to see its version, we could pick the right date format instead of guessing... now we will have to check "are there 3 more digits after this and before that?"..
another (actually better!) option would be querying Redmine to see what date format it uses for long dates and short dates - because this is what the library actually cares about. I will submit this as a separate feature request.
#11 Updated by Alex Last over 6 years ago
another example: I see 'spent_hours' default value for new issues created through REST API is NULL for Redmine 3.0.0 and is equal to "0.0" for Redmine 2.6.2.
there is no way for the java api library to detect the Redmine version (well, unless we start parsing 'redmine/admin/info' HTML page, which is definitely not what we want to do).
#13 Updated by shadowbq - almost 6 years ago
Not the best route implementation, but will bridge the gap for people that dont want to wait another five years..
- Download plugin
- Extract to your Redmine into vendor/plugins/redmine_info_api
- Restart web server
- request with admin user & basic auth https://redmine.example.com/adminapi/info.json