python rest api for open sprinkler pi
All if the samples below are available in this postman collection. If you don't use postman I suggest take a look at it here.
GET http://0.0.0.0:8081/stations
[
{
"status": 0,
"stationID": 0
},
{
"status": 0,
"stationID": 1
},
{
"status": 0,
"stationID": 2
},
{
"status": 0,
"stationID": 3
},
{
"status": 0,
"stationID": 4
},
{
"status": 0,
"stationID": 5
},
{
"status": 0,
"stationID": 6
},
{
"status": 0,
"stationID": 7
}
]
GET http://0.0.0.0:8081/stations/0
{
"status": 0,
"stationID": 0
}
PUT http://0.0.0.0:8081/stations/0
status=1
{
"status": 1,
"stationID": 0
}
PUT http://0.0.0.0:8081/stations/0
status=0
{
"status": 0,
"stationID": 0
}