Skip to content

REST API

Elias Gürlich edited this page Oct 31, 2016 · 2 revisions

The HTTP server runs at port 2621 by default. (will be configurable soon)

/api/login [POST]

Request: { "username": "YOUR_USERNAME", "pwd": "YOUR_PASSWORD" }

/api/timerule/all [GET]

/api/timerule/:id/save [POST]

URL Params:

  • id: id of time rule

Request: { "ruleBody":"sayohome.println('Hello World!')", "name":"A time rule", "timePattern":[{"year":2016,"dayOfMonth":24}], "active":true }

/api/log/entries [GET]

/api/enviromentscripts/all [GET]

/api/enviromentscripts/active [GET]