Project

General

Profile

Actions

User story #6715

closed

Add info about API

Added by Janos Mattyasovszky almost 9 years ago. Updated over 8 years ago.

Status:
Released
Priority:
2
Category:
API
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

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:

# 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 ] "}

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:

availableVersions {
  "latest": 6,
  "all": [
    { "version" : 3, "status": "deprecated" }
  , { "version" : 4, "status": "deprecated" }
  , { "version" : 5, "status": "maintained" }
  , { "version" : 6, "status": "maintained" }
  ]
}
Actions

Also available in: Atom PDF