-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapi_test.http
43 lines (30 loc) · 932 Bytes
/
api_test.http
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
# testing EMS-ESP API
# use with https://marketplace.visualstudio.com/items?itemName=humao.rest-client
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiYWRtaW4iOnRydWV9.2bHpWya2C7Q12WjNUBD6_7N3RCD7CMl-EGhyQVzFdDg
GET http://ems-esp.local/api/system/info
###
GET http://ems-esp.local/api/thermostat/seltemp
###
POST http://ems-esp.local/api/thermostat/seltemp
Content-Type: application/json
Authorization: Bearer {{token}}
{
"value" : 21.0
}
###
POST http://ems-esp.local/api/thermostat
Content-Type: application/json
Authorization: Bearer {{token}}
{
"entity" : "seltemp",
"value" : 21.0
}
###
POST http://10.10.10.134/api
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiYWRtaW4iOnRydWV9.2bHpWya2C7Q12WjNUBD6_7N3RCD7CMl-EGhyQVzFdDg
{
"device" : "boiler",
"entity" : "wwtapactivated",
"value" : "on"
}