Update 5.3. tool request=service_done

This commit is contained in:
Rainer Gümpelein 2023-01-05 11:04:31 +00:00
parent 9ecffdae3b
commit 23d2035f3e

View file

@ -3,18 +3,19 @@
**request** Insert and/or update services by **bike** OR **station** prefix+number **request** Insert and/or update services by **bike** OR **station** prefix+number
| key | Required | Format | Comment | | key | Required | Format | Comment |
| ---------- | -------- | -------- | ------------------------------------- | |-----|----------|--------|---------|
| authcookie | + | text | unique encrypted key | | authcookie | + | text | unique encrypted key |
| bike | o/+ | text | bike prefix+number | | bike | o/+ | text | bike prefix+number |
| station | o/+ | text | station prefix+number | | station | o/+ | text | station prefix+number |
| work_id | + | text | datafield-key must be selected from DB template | | work_id | + | text | datafield-key must be selected from DB template |
| work_val | + | text | Value for data-key defined by work_id | | 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 **response** "bike- OR station-number" with work-values by JSON-Objects
Parameter | Required | Format | Comment | | Parameter | Required | Format | Comment |
| -------------- | -------- | -------- | -------------------------------------- | |-----------|----------|--------|---------|
| work_id | + | text | internal data key | | work_id | + | text | internal data key |
| work_name | + | text | name of datafield | | work_name | + | text | name of datafield |
| work_val | + | text | data value | | work_val | + | text | data value |
@ -26,32 +27,50 @@ Parameter | Required | Format | Comment |
| owner | + | text | service-user by ID | | owner | + | text | service-user by ID |
| user_name | + | text | service-user by user name | | 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 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 **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 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 **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 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 **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 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 **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 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 **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 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
``` ```
{ {