Returns the currently running version of the server
-
/api/v0/version
-
GET
-
- Code: 200
Content:{ "name": "OpenTMI", "version": "0.2.0", "dependencies": { "bluebird": { "version": "3.5.0", "from": "[email protected]", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz" }, "mongoose": { "version": "4.11.5", "from": "mongoose@>=4.11.3 <5.0.0", "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.11.5.tgz" }, } }
- Code: 200
-
-
Code: 401 UNAUTHORIZED
Content:{"message": "No authorization token was found"}
-
Code: 500 INTERNAL SERVER ERROR
Content:{ "message": "some error message", "error": "serialized error" }
-
Post a new version for the server. The server will try to update to the provided version
-
/api/v0/version
-
POST
-
-
Required:
Property Description revision github commit hash or some other checkout identifier -
Example:
{ "revision": "7d1b31e74ee336d15cbd21741bc88a537ed063a0" }
-
-
- Code: 204 NO CONTENT
-
-
Code: 401 UNAUTHORIZED
Content:{"message": "No authorization token was found"}
-
Code: 403 FORBIDDEN
Content:{"message": "Invalid or missing revision"}
-
Code: 500 INTERNAL SERVER ERROR
Content:{"message": "Update failed: some reason here"}
-
Starts the restart sequence
-
/api/v0/restart
-
POST
-
- Code: 204 NO CONTENT
-
-
Code: 401 UNAUTHORIZED:
Content:{"message": "No authorization token was found"}
-
Code: 500 INTERNAL SERVER ERROR:
Content{"message": "some internal error"}
-