Add full version string to API
This commit is contained in:
1 parent
e30f1b9f82
commit
99225244f1
2 files changed
+6
-3
No files matched your search
@@ -7,7 +7,8 @@ Version information
|
||||
.. http:get:: /api/version
|
||||
|
||||
Retrieve information regarding server and API version. Returns a JSON object with two keys, ``api`` containing
|
||||
the API version, ``server`` containing the server version.
|
||||
the API version, ``server`` containing the server version, ``text`` containing the server version including
|
||||
the prefix ``OctoPrint `` (to determine that this is indeed a genuine OctoPrint instance).
|
||||
|
||||
**Example Request**
|
||||
|
||||
@@ -26,7 +27,8 @@ Version information
|
||||
|
||||
{
|
||||
"api": "0.1",
|
||||
"server": "1.1.0"
|
||||
"server": "1.3.10",
|
||||
"text": "OctoPrint 1.3.10"
|
||||
}
|
||||
|
||||
:statuscode 200: No error
|
||||
@@ -177,7 +177,8 @@ def apiPrinterState():
|
||||
def apiVersion():
|
||||
return jsonify({
|
||||
"server": octoprint.server.VERSION,
|
||||
"api": VERSION
|
||||
"api": VERSION,
|
||||
"text": "OctoPrint {}".format(octoprint.server.DISPLAY_VERSION)
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user