-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtesting.http
More file actions
65 lines (50 loc) · 1.44 KB
/
testing.http
File metadata and controls
65 lines (50 loc) · 1.44 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
### Create account
POST http://localhost:8080/account/create
Content-Type: application/json
### Login into account
POST http://localhost:8080/account/login
Content-Type: application/json
{
"uuid": "{{uuid}}",
"secret": "{{secret}}"
}
### Create device for account
POST http://localhost:8080/device/create/1
Content-Type: application/json
Authorization: {{token}}
{
"deviceName": "Shelly Pro 3",
"timezone": "Europe/Helsinki"
}
### Create control for account
POST http://localhost:8080/control/create
Content-Type: application/json
Authorization: {{token}}
{
"accountId": 1,
"name": "Test control 1",
"maxPriceSnt": 8.5,
"dailyOnMinutes": 120
}
### Get all controls for account
GET http://localhost:8080/control/controls
Content-Type: application/json
Authorization: {{token}}
### Link device to control
POST http://localhost:8080/control/1/create/device?deviceId=1&deviceChannel=1
Content-Type: application/json
Authorization: {{token}}
### Get control statuses for device with uuid
GET http://localhost:8080/control/2077f2d8-e469-449a-b216-f3fe6032a7cb
Content-Type: application/json
### Get timetable for device with uuid
GET http://localhost:8080/control/2077f2d8-e469-449a-b216-f3fe6032a7cb/timetable
Content-Type: application/json
### Post power limit data
POST http://localhost:8080/power/f728f6b3-a8d9-4eab-917b-d1b21950b80b
Content-Type: application/json
{
"currentKw": 3.81,
"totalKwh": 1200.605,
"measuredAt": 1770046375598
}