RESTService » History » Version 2

« Previous - Version 2/8 (diff) - Next » - Current version
Philipp Gerling, 08/26/2014 11:39 PM


RESTService

The REST Service is used as a central data access point.
Two URLs are used:
watchstatus/
watchdata/

watchstatus/

This service contains a md5 hash of the whole JSON Dataset we use. Its used to figure out if the smartphone has to download the data again.

1. Pull hash
2. if (known md5 == new md5) {
do nothing - you have the up-to-date data
}
else {
pull new data from watchthisdata/
}

watchdata/

Contains a JSON Object of the whole data we have.

@[{
"name":"printer name",
"type": "RED" or "YELLOW",
"claimed": false or "USER-NAME",
"message": "Message to be displayed. More details. eg. summary of all error messages"
"timeleft": 0seconds - time left, till error gets worse (eg. yellow->red, paper out, ink out...)
}, {
...
}]
@