-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.http
More file actions
65 lines (50 loc) · 1.33 KB
/
api.http
File metadata and controls
65 lines (50 loc) · 1.33 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
# To use this file, install REST Client VScode Extension or any HTTP client that supports `.http` files.
# You can also use Postman or similar tools to run these requests.
# REST Client VScode Extension: https://marketplace.visualstudio.com/items/?itemName=humao.rest-client
### Check data connection
GET http://192.168.0.1:8000/front
Accept: application/json
### Update the configuration
GET http://192.168.0.1:8000/update_config
Accept: application/json
### Close all valves
GET http://192.168.0.1:8000/close_all
Accept: application/json
### Get the current acutators configuration
GET http://192.168.0.1:8000/actuators
Accept: application/json
### Get the current sensors configuration
GET http://192.168.0.1:8000/sensors
Accept: application/json
### Basic commands for individual solenoids and servos
POST http://192.168.0.1:8000/command
Content-Type: application/json
{
"type": "solenoid",
"name": "SVMOVP",
"state": "open"
}
###
POST http://192.168.0.1:8000/command
Content-Type: application/json
{
"type": "solenoid",
"name": "SVMOVP",
"state": "open"
}
###
POST http://192.168.0.1:8000/command
Content-Type: application/json
{
"type": "servo",
"name": "BVGSO",
"state": "closed"
}
###
POST http://192.168.0.1:8000/command
Content-Type: application/json
{
"type": "servo",
"name": "MFV",
"state": "open"
}