adding post memo to api
This commit is contained in:
parent
50f48cae78
commit
df7c550ab1
@ -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
|
||||
|
||||
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user