From e855bafdf9e5d6217d929e1f4d1933e673e3acac Mon Sep 17 00:00:00 2001 From: Manuel Knitza Date: Tue, 12 Feb 2013 21:47:40 +0100 Subject: [PATCH 1/3] Update src/node/hooks/express/apicalls.js --- src/node/hooks/express/apicalls.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/node/hooks/express/apicalls.js b/src/node/hooks/express/apicalls.js index e57e1d35..0971a877 100644 --- a/src/node/hooks/express/apicalls.js +++ b/src/node/hooks/express/apicalls.js @@ -57,4 +57,9 @@ exports.expressCreateServer = function (hook_name, args, cb) { res.end("OK"); }); }); + + //Provide a possibility to query the latest available API version + args.app.get('/api', function (req, res) { + res.json({"currentVersion" : apiHandler.latestApiVersion}); + }); } From 8c9ad6ee504bc1aa8d057118354a4eaacb077a50 Mon Sep 17 00:00:00 2001 From: Manuel Knitza Date: Tue, 12 Feb 2013 21:50:14 +0100 Subject: [PATCH 2/3] Update src/node/handler/APIHandler.js --- src/node/handler/APIHandler.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/node/handler/APIHandler.js b/src/node/handler/APIHandler.js index 9f86277a..8be5b5fe 100644 --- a/src/node/handler/APIHandler.js +++ b/src/node/handler/APIHandler.js @@ -216,6 +216,9 @@ var version = } }; +// set the latest available API version here +exports.latestApiVersion = '1.2.7'; + /** * Handles a HTTP API call * @param functionName the name of the called function From fde10052ca5d9c80bc0837e00bdd87a2eeff4c72 Mon Sep 17 00:00:00 2001 From: Manuel Knitza Date: Tue, 12 Feb 2013 21:57:01 +0100 Subject: [PATCH 3/3] Update doc/api/http_api.md Updated --- doc/api/http_api.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/http_api.md b/doc/api/http_api.md index 0543ef71..7e05ff86 100644 --- a/doc/api/http_api.md +++ b/doc/api/http_api.md @@ -61,7 +61,9 @@ Portal submits content into new blog post ## Usage ### API version -The latest version is `1.2` +The latest version is `1.2.7` + +The current version can be queried via /api. ### Request Format