Version resource on API with API and software version
(cherry picked from commit 907f505)
This commit is contained in:
1 parent
ee36c31637
commit
f69abdcc14
1 file changed
+10
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user