From 23d2035f3ee645e80cc25f2179dfdc735a607db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rainer=20G=C3=BCmpelein?= Date: Thu, 5 Jan 2023 11:04:31 +0000 Subject: [PATCH] Update 5.3. tool request=service_done --- 5.3.-tool-request=service_done.md | 69 ++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 25 deletions(-) diff --git a/5.3.-tool-request=service_done.md b/5.3.-tool-request=service_done.md index 8fa8423..840cf9d 100644 --- a/5.3.-tool-request=service_done.md +++ b/5.3.-tool-request=service_done.md @@ -1,57 +1,76 @@ ### request=service_done -**request** Insert and/or update services by **bike** OR **station** prefix+number - -| key | Required | Format | Comment | -| ---------- | -------- | -------- | ------------------------------------- | -| authcookie | + | text | unique encrypted key | -| bike | o/+ | text | bike prefix+number | -| station | o/+ | text | station prefix+number | -| work_id | + | text | datafield-key must be selected from DB template | -| work_val | + | text | Value for data-key defined by work_id | +**request** Insert and/or update services by **bike** OR **station** prefix+number +| key | Required | Format | Comment | +|-----|----------|--------|---------| +| authcookie | + | text | unique encrypted key | +| bike | o/+ | text | bike prefix+number | +| station | o/+ | text | station prefix+number | +| work_id | + | text | datafield-key must be selected from DB template | +| work_val | + | text | Value for data-key defined by work_id | +| service_id | o | text | update task (Aufgabe) by service_id, else last open entry will be used | +| new_task | o | text | insert new task (Aufgabe) | **response** "bike- OR station-number" with work-values by JSON-Objects -Parameter | Required | Format | Comment | -| -------------- | -------- | -------- | -------------------------------------- | -| work_id | + | text | internal data key | -| work_name | + | text | name of datafield | -| work_val | + | text | data value | -| service_id | + | text | internal dataset id | -| service_type | + | text | hart=1, weich=0 | -| interval | + | text | Service interval in days | -| time_over | + | text | time_over=1 if service_interval exceeded | -| mtime | + | date time| ISO 8601 last service timestamp | -| owner | + | text | service-user by ID | -| user_name | + | text | service-user by user name | +| Parameter | Required | Format | Comment | +|-----------|----------|--------|---------| +| work_id | + | text | internal data key | +| work_name | + | text | name of datafield | +| work_val | + | text | data value | +| service_id | + | text | internal dataset id | +| service_type | + | text | hart=1, weich=0 | +| interval | + | text | Service interval in days | +| time_over | + | text | time_over=1 if service_interval exceeded | +| mtime | + | date time | ISO 8601 last service timestamp | +| owner | + | text | service-user by ID | +| user_name | + | text | service-user by user name | + + +Example **REST request** insert/update work_id with work_val -Example -**REST request** insert/update work_id with work_val ``` https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=int01&work_val=1&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890 ``` + +Example **REST request** insert new task + +``` +https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&new_task=1&work_id=txt01&work_val=Neue Aufgabe&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890 +``` + **REST request** update "Aufgaben" by service_id + ``` https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=txt01&work_val=%3A%3Aerledigt%3A%3A&service_id=41519&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890 ``` + **REST request** update bike for redistribution to another station + ``` https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=station&work_val=FR101&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890 ``` + **REST request** update bike state to available OR maintanance OR defect + ``` https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=state&work_val=maintanance&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890 ``` + **REST request** update bike for bike_battery_charge + ``` https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=bike_battery_charge&work_val=100&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890 ``` + **REST request** update bike for smartlock_battery_charge + ``` https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=smartlock_battery_charge&work_val=100&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890 ``` -**response** returns last bike/station service-work values by JSON-Objects depending on *bike* OR *station* number + +**response** returns last bike/station service-work values by JSON-Objects depending on _bike_ OR _station_ number ``` { @@ -279,4 +298,4 @@ https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=F } } } -``` +``` \ No newline at end of file