diff --git a/docs/api.md b/docs/api.md index b6c041d..14e7848 100644 --- a/docs/api.md +++ b/docs/api.md @@ -11,6 +11,10 @@ stop a schedule curl -d '{"cmd":"stop"}' -H "Content-Type: application/json" -X POST http://0.0.0.0:8081/api +post a memo + +curl -d '{"cmd":"memo", "memo":"some significant message"}' -H "Content-Type: application/json" -X POST http://0.0.0.0:8081/api + stats for currently running schedule curl -X GET http://0.0.0.0:8081/api/stats diff --git a/kiln-controller.py b/kiln-controller.py index e2660b8..9fc5015 100755 --- a/kiln-controller.py +++ b/kiln-controller.py @@ -86,6 +86,11 @@ def handle_api(): log.info("api stop command received") oven.abort_run() + if bottle.request.json['cmd'] == 'memo': + log.info("api memo command received") + memo = bottle.request.json['memo'] + log.info("memo=%s" % (memo)) + # get stats during a run if bottle.request.json['cmd'] == 'stats': log.info("api stats command received")