-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Routes
Mystik edited this page Mar 18, 2020
·
2 revisions
Route: /vote
Request Type: POST
Format of data returned:
{
"submitter": <string>,
"vote": <decimal>
}
Route: /sensorSubmit
Request Type: POST
Format of data to be sent:
{
"id": <int>,
"location": <string>, // The sensor's desk number
"temperature": <decimal>,
"time": <string>
}
Route: /sensorData
Request Type: GET
Example:
{
"sensors": [
{
"id": 3,
"location": "2D042",
"temperature": 21.3,
"time": "12:06:21T18:3:2020"
},
{
"id": 83,
"location": "2D041",
"temperature": 20.9,
"time": "12:06:40T18:3:2020"
},
...
]
}
Possible returned status codes:
-
200if the data was found and returned properly -
204if no sensor data exists
Route: /sensorSubmit?id=<int>
Request Type: GET
Format of data returned:
{
"id": <int>,
"location": <string>, // The sensor's desk number
"temperature": <decimal>,
"time": <string>
}
Possible returned status codes:
-
200if the specified sensor exists -
204if no sensor data exists -
404if the specified sensor wasn't found