Method:POST
URL
https://192.168.0.01:1000/registration
Parameter
|Name|Type|Example|
|-|-|-|-|
|credential_pass|String|QWERTY|
Response
{
"id": "1_QWAS" // QWAS is generate by random
"time": "01-02-2006 15:04:05"
}
Method:GET
URL
https://192.168.0.01:1000/question/1_QWAS
Parameter
|Name|Type|Example|
|-|-|-|-|
|id|String|1_QWAS|
Response
{
"status": "on" // or off
}
Method:POST
URL
https://192.168.0.01:1000/data/1_QWAS
POST Body
|Input|Type|Example|
|-|-|-|-|
|id|String|1_QWAS|
|sensor|String|Heat|
|value|String|23.05|
|time|String|01-02-2006 15:04:05|
Response
{
"message" : "The data client with ID 1QWAS has been added successfully"
}
Method:GET
URL
https://192.168.0.01:1000/reset/1_QWAS
POST Body
|Input|Type|Example|
|-|-|-|-|
|id|String|1_QWAS|
Response
{
"message" : "The client with ID 1QWAS has been deleted successfully"
}
Method:GET
URL
https://192.168.0.01:1000/sync/1_QWAS
Parameter
|Name|Type|Example|
|-|-|-|-|
|id|String|1_QWAS|
Response
{
"time" : "01-02-2006 15:04:05"
"total" : "1"
}
Method:GET
URL
https://192.168.0.01:1000/history/1_QWAS/1
Parameter
|Name|Type|Example|
|-|-|-|-|
|id|String|1_QWAS|
|n|String|1|
Response
{
"sensor" : "Heat"
"value" : "23.05"
"time" : "01-02-2006 15:04:05"
}