sharee.bike-Wiki/5.3.-tool-request=service_done.md

300 lines
9.6 KiB
Markdown
Raw Normal View History

2022-01-29 13:13:25 +01:00
### request=service_done
2023-01-05 12:04:31 +01:00
**request** Insert and/or update services by **bike** OR **station** prefix+number
2022-01-29 13:13:25 +01:00
2023-01-05 12:04:31 +01:00
| 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 |
2022-01-29 13:13:25 +01:00
**response** "bike- OR station-number" with work-values by JSON-Objects
2023-01-05 12:04:31 +01:00
| 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
2022-01-29 13:13:25 +01:00
```
2022-12-30 16:59:13 +01:00
https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=int01&work_val=1&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890
```
2023-01-05 12:04:31 +01:00
2023-01-05 12:06:18 +01:00
Example **REST request** insert new task (Aufgabe)
2023-01-05 12:04:31 +01:00
```
2023-01-05 14:55:03 +01:00
https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=txt01&work_val=::new_task::&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890
2023-01-05 12:04:31 +01:00
```
2023-01-05 12:06:18 +01:00
**REST request** update task (Aufgabe) by service_id
2023-01-05 12:04:31 +01:00
2022-12-30 16:59:13 +01:00
```
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
2022-01-29 13:13:25 +01:00
```
2023-01-05 12:04:31 +01:00
2022-01-29 13:13:25 +01:00
**REST request** update bike for redistribution to another station
2023-01-05 12:04:31 +01:00
2022-01-29 13:13:25 +01:00
```
2022-12-31 12:20:00 +01:00
https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=station&work_val=FR101&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890
2022-01-29 13:13:25 +01:00
```
2023-01-05 12:04:31 +01:00
2022-01-29 13:13:25 +01:00
**REST request** update bike state to available OR maintanance OR defect
2023-01-05 12:04:31 +01:00
2022-01-29 13:13:25 +01:00
```
2022-12-30 16:59:13 +01:00
https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=state&work_val=maintanance&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890
2022-01-29 13:13:25 +01:00
```
2023-01-05 12:04:31 +01:00
2022-12-31 12:20:00 +01:00
**REST request** update bike for bike_battery_charge
2023-01-05 12:04:31 +01:00
2022-12-31 12:20:00 +01:00
```
https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=bike_battery_charge&work_val=100&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890
```
2023-01-05 12:04:31 +01:00
2022-12-31 12:20:00 +01:00
**REST request** update bike for smartlock_battery_charge
2023-01-05 12:04:31 +01:00
2022-12-31 12:20:00 +01:00
```
https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=smartlock_battery_charge&work_val=100&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890
```
2023-01-05 12:04:31 +01:00
**response** returns last bike/station service-work values by JSON-Objects depending on _bike_ OR _station_ number
2022-01-29 13:13:25 +01:00
```
{
"shareejson" : {
"authcookie" : "6103_f782a208d9399291ba8d086b5dcc2509_34567890",
"copri_version" : "4.1.10.2",
"response" : "service_done",
"debuglevel" : "1",
"user_id" : "javaminister@example.tld",
"agb_html" : "site/agb.html",
"agb_checked" : "1",
"bike_info_html" : "site/bike_info.html",
"privacy_html" : "site/privacy.html",
"new_authcoo" : "0",
"service_id_done" : "41381",
"lang" : "DE",
"tariff_info_html" : "site/tariff_info.html",
"impress_html" : "site/impress.html",
"user_group" : [
2022-12-30 16:59:13 +01:00
"FR300001",
"FR300029"
2022-01-29 13:13:25 +01:00
],
"user_tour" : [
2022-12-30 16:59:13 +01:00
"FR1",
"FR2"
2022-01-29 13:13:25 +01:00
],
2022-12-30 16:59:13 +01:00
"uri_operator" : "https://shareeapp-operator.example.tld",
2022-01-29 13:13:25 +01:00
"service_template" : "401",
"response_state" : "OK, service_update",
"clearing_cache" : "0",
2022-12-30 16:59:13 +01:00
"uri_primary" : "https://shareeapp-primary.example.tld",
"FR1541" : {
2022-01-29 13:13:25 +01:00
"int15" : {
"owner" : "0",
"mtime" : "",
"service_type" : "1",
"work_val" : "1",
"service_id" : "0",
"time_over" : "0",
"interval" : "10",
"work_name" : "BC Halterung",
"work_id" : "int15",
"user_name" : ""
},
"int10" : {
"work_id" : "int10",
"user_name" : "",
"work_name" : "Speichenspannung",
"time_over" : "0",
"interval" : "30",
"service_id" : "0",
"work_val" : "1",
"mtime" : "",
"service_type" : "1",
"owner" : "0"
},
"int11" : {
"work_id" : "int11",
"user_name" : "",
"work_name" : "Steuersatz",
"interval" : "30",
"time_over" : "0",
"service_id" : "0",
"work_val" : "1",
"mtime" : "",
"service_type" : "1",
"owner" : "0"
},
"int14" : {
"owner" : "0",
"service_type" : "0",
"mtime" : "",
"service_id" : "0",
"work_val" : "1",
"time_over" : "0",
"interval" : "",
"work_name" : "Inspektion in der Werkstatt",
"user_name" : "",
"work_id" : "int14"
},
"int02" : {
"user_name" : "Rainer Gümpelein",
"work_id" : "int02",
"work_name" : "Gepaecktraeger",
"time_over" : "0",
"interval" : "10",
"service_id" : "41381",
"work_val" : "1",
"service_type" : "1",
"mtime" : "2021-04-15 12:42:54.917257+02",
"owner" : "6103"
},
"int01" : {
"time_over" : "0",
"interval" : "5",
"work_name" : "Reifen-Bremse-Lampe",
"work_id" : "int01",
"user_name" : "Rainer Gümpelein",
"owner" : "6103",
"service_type" : "2",
"mtime" : "2021-04-15 12:42:54.917257+02",
"work_val" : "1",
"service_id" : "41381"
},
"int06" : {
"time_over" : "0",
"interval" : "10",
"work_name" : "Klingel",
"user_name" : "",
"work_id" : "int06",
"owner" : "0",
"mtime" : "",
"service_type" : "1",
"service_id" : "0",
"work_val" : "1"
},
"int05" : {
"owner" : "0",
"service_type" : "1",
"mtime" : "",
"work_val" : "1",
"service_id" : "0",
"interval" : "10",
"time_over" : "0",
"work_name" : "Staender",
"work_id" : "int05",
"user_name" : ""
},
"int03" : {
"interval" : "10",
"time_over" : "0",
"work_name" : "Licht",
"user_name" : "",
"work_id" : "int03",
"owner" : "0",
"mtime" : "",
"service_type" : "1",
"work_val" : "1",
"service_id" : "0"
},
"int16" : {
"time_over" : "0",
"interval" : "8",
"work_id" : "int16",
"user_name" : "",
"work_name" : "Probefahrt",
"mtime" : "",
"service_type" : "1",
"owner" : "0",
"service_id" : "0",
"work_val" : "1"
},
"int08" : {
"service_id" : "0",
"work_val" : "1",
"service_type" : "1",
"mtime" : "",
"owner" : "0",
"work_id" : "int08",
"user_name" : "",
"work_name" : "Schnellspanner Sattel",
"interval" : "10",
"time_over" : "0"
},
"int09" : {
"work_name" : "Reifenluftdruck",
"user_name" : "",
"work_id" : "int09",
"interval" : "30",
"time_over" : "0",
"work_val" : "1",
"service_id" : "0",
"owner" : "0",
"mtime" : "",
"service_type" : "1"
},
"int13" : {
"mtime" : "",
"service_type" : "1",
"owner" : "0",
"work_val" : "1",
"service_id" : "0",
"time_over" : "0",
"interval" : "30",
"work_id" : "int13",
"user_name" : "",
"work_name" : "Achsschrauben"
},
"txt01" : {
"work_name" : "Aufgaben",
"interval" : "0",
2022-12-30 16:59:13 +01:00
"work_val" : "Speiche locker\n",
2022-01-29 13:13:25 +01:00
"time_over" : "0",
2022-12-30 16:59:13 +01:00
"service_id" : "41514",
"user_name" : "copri admin",
"work_id" : "txt01",
"mtime" : "2022-11-29 10:40:46.186788+01",
2022-01-29 13:13:25 +01:00
"service_type" : "0",
2022-12-30 16:59:13 +01:00
"owner" : "18520"
2022-01-29 13:13:25 +01:00
},
"int12" : {
"user_name" : "",
"work_id" : "int12",
"work_name" : "Schutzblech",
"time_over" : "0",
"interval" : "30",
"service_id" : "0",
"work_val" : "1",
"mtime" : "",
"service_type" : "1",
"owner" : "0"
},
"int07" : {
"work_name" : "Schloss",
"user_name" : "",
"work_id" : "int07",
"interval" : "10",
"time_over" : "0",
"work_val" : "1",
"service_id" : "0",
"owner" : "0",
"service_type" : "1",
"mtime" : ""
}
}
}
}
2023-01-05 12:04:31 +01:00
```