-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapiary.apib
39 lines (24 loc) · 1012 Bytes
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FORMAT: 1A
HOST: https://iot-room-climate-regulator.herokuapp.com/webapi
# iot-room-climate-regulator
IOT Room Climate Regulator. Receives tempreture regulation task and reserves
it on the same level. Also provides logging of process.
## Ping [/ping]
### Ping service [GET]
Returns `200` if service is alive.
+ Response 200 (application/json)
## Floor Temperature [/houses/{house_id}/floors/{floor_id}/task]
+ Parameters
+ house_id (required, string, `12`) ... House identifier
+ floor_id (required, string, `3`) ... Floor identifier
### Add new regulation task [PUT]
Returns `200` status code if regulation task is accepted otherwise `404`
`temperature` is a floating point number indicating desired temperature.
`period` is an integer indicating time period in msecs while regulation task is active.
+ Request (application/json)
{
"temperature": 22.5,
"period": 50000
}
+ Response 200 (application/json)
+ Response 404 (application/json)