Project

General

Profile

User story #6715

Updated by François ARMAND almost 9 years ago

Please expose the Version of the API with a clean request, as currently it can only be parsed from a "free text" by setting an invalid version: 

 <pre> 
 # curl -k -X GET -H 'X-API-Token: <valid_token>' -H "X-API-Version: foo" https://rudder-server/rudder/api/nodes/root 
 {"action": "nodes","result": "error","errorDetails": "Version used does not exists, please use one of the following: [ latest, 2, 3, 4 ] "} 
 </pre> 

 This should be exposed by a clean JSON answer. 

 This "info" endpoint should also say which API version are deprecated, so the final format may look like: 

 <pre> 
 availableVersions { 
   "latest": 6, 
   "all": [ 
     { "version" : 3, "status": "deprecated" } 
   , { "version" : 4, "status": "deprecated" } 
   , { "version" : 5, "status": "maintained" } 
   , { "version" : 6, "status": "maintained" } 
   ] 
 } 
 </pre>

Back