Version resource on API with API and software version

(cherry picked from commit 907f505)
This commit is contained in:
Gina Häußge committed 2014-08-08 17:04:31 +02:00
1 parent ee36c31637
commit f69abdcc14
1 file changed
+10
+10
View File
@@ -30,6 +30,8 @@ from . import users as api_users
from . import log as api_logs
VERSION = "1.0"
#~~ first run setup
@@ -69,6 +71,14 @@ def apiPrinterState():
return jsonify(currentData)
@api.route("/version", methods=["GET"])
@restricted_access
def apiVersion():
return jsonify({
"server": octoprint.server.VERSION,
"api": octoprint.server.api.VERSION
})
#~~ system control