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