Create 5.4. tool request=service_work

This commit is contained in:
Rainer Gümpelein 2022-01-29 12:17:40 +00:00
parent f68d45bc2c
commit 403a4158c7

View file

@ -0,0 +1,258 @@
### request=service_work
*request** returns last service values by bike ORstation prefix+number
| Parameter | Required | Format | Comment |
| ---------- | -------- | -------- | ------------------------------------- |
| authcookie | + | text | unique encrypted key |
| bike | o /+ | text | bike prefix+number |
| station | o /+ | text | station prefix+number |
**response** bike OR station prefix+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 |
Example
**REST request** read last work values by bike or station prefix+number
```
https://shareeapp-fr01.copri-bike.de/APIjsonserver?request=service_work&bike=FR_1541&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890
```
**response**
```
{
"shareejson" : {
"bike_info_html" : "site/bike_info.html",
"agb_html" : "site/agb.html",
"tariff_info_html" : "site/tariff_info.html",
"clearing_cache" : "0",
"impress_html" : "site/impress.html",
"agb_checked" : "1",
"uri_primary" : "https://shareeapp-primary.copri-bike.de",
"response" : "service_work",
"copri_version" : "4.0.1.3",
"lang" : "DE",
"user_group" : [
"FR_300001",
"FR_300029"
],
"user_tour" : [
"FR_1",
"FR_2"
],
"uri_operator" : "https://shareeapp-fr01.copri-bike.de",
"service_template" : "401",
"privacy_html" : "site/privacy.html",
"authcookie" : "6103_f782a208d9399291ba8d086b5dcc2509_34567890",
"new_authcoo" : "0",
"user_id" : "javaminister@example.tld",
"debuglevel" : "1",
"response_state" : "OK: nothing todo",
"FR_1541" : {
"int09" : {
"work_name" : "Reifenluftdruck",
"service_id" : "0",
"interval" : "30",
"owner" : "0",
"time_over" : "0",
"service_type" : "1",
"user_name" : "",
"mtime" : "",
"work_id" : "int09",
"work_val" : "1"
},
"txt01" : {
"user_name" : "",
"mtime" : "",
"work_id" : "txt01",
"work_name" : "Aufgaben",
"interval" : "0",
"service_id" : "0",
"owner" : "0",
"service_type" : "0",
"time_over" : "0"
},
"int06" : {
"service_id" : "0",
"interval" : "10",
"owner" : "0",
"service_type" : "1",
"time_over" : "0",
"work_name" : "Klingel",
"work_id" : "int06",
"work_val" : "1",
"user_name" : "",
"mtime" : ""
},
"int16" : {
"work_val" : "1",
"work_id" : "int16",
"mtime" : "",
"user_name" : "",
"service_type" : "1",
"time_over" : "0",
"owner" : "0",
"interval" : "8",
"service_id" : "0",
"work_name" : "Probefahrt"
},
"int05" : {
"work_name" : "Staender",
"interval" : "10",
"service_id" : "0",
"time_over" : "0",
"service_type" : "1",
"owner" : "0",
"mtime" : "",
"user_name" : "",
"work_id" : "int05",
"work_val" : "1"
},
"int10" : {
"work_name" : "Speichenspannung",
"owner" : "0",
"service_type" : "1",
"time_over" : "0",
"service_id" : "0",
"interval" : "30",
"user_name" : "",
"mtime" : "",
"work_val" : "1",
"work_id" : "int10"
},
"int08" : {
"owner" : "0",
"service_type" : "1",
"time_over" : "0",
"service_id" : "0",
"interval" : "10",
"work_name" : "Schnellspanner Sattel",
"work_val" : "1",
"work_id" : "int08",
"user_name" : "",
"mtime" : ""
},
"int14" : {
"interval" : "",
"service_id" : "0",
"service_type" : "0",
"time_over" : "0",
"owner" : "0",
"work_name" : "Inspektion in der Werkstatt",
"work_id" : "int14",
"work_val" : "1",
"mtime" : "",
"user_name" : ""
},
"int11" : {
"work_name" : "Steuersatz",
"owner" : "0",
"time_over" : "0",
"service_type" : "1",
"service_id" : "0",
"interval" : "30",
"user_name" : "",
"mtime" : "",
"work_val" : "1",
"work_id" : "int11"
},
"int01" : {
"work_name" : "Reifen-Bremse-Lampe",
"service_id" : "41381",
"interval" : "5",
"time_over" : "0",
"service_type" : "2",
"owner" : "6103",
"mtime" : "2021-04-15 12:47:46.939586+02",
"user_name" : "Rainer Gümpelein",
"work_id" : "int01",
"work_val" : "1"
},
"int07" : {
"work_name" : "Schloss",
"owner" : "0",
"service_type" : "1",
"time_over" : "0",
"service_id" : "0",
"interval" : "10",
"user_name" : "",
"mtime" : "",
"work_val" : "1",
"work_id" : "int07"
},
"int13" : {
"owner" : "0",
"time_over" : "0",
"service_type" : "1",
"service_id" : "0",
"interval" : "30",
"work_name" : "Achsschrauben",
"work_val" : "1",
"work_id" : "int13",
"user_name" : "",
"mtime" : ""
},
"int03" : {
"work_id" : "int03",
"work_val" : "1",
"mtime" : "",
"user_name" : "",
"interval" : "10",
"service_id" : "0",
"time_over" : "0",
"service_type" : "1",
"owner" : "0",
"work_name" : "Licht"
},
"int15" : {
"work_name" : "BC Halterung",
"owner" : "0",
"time_over" : "0",
"service_type" : "1",
"service_id" : "0",
"interval" : "10",
"user_name" : "",
"mtime" : "",
"work_val" : "1",
"work_id" : "int15"
},
"int02" : {
"work_val" : "1",
"work_id" : "int02",
"mtime" : "2021-04-15 12:47:46.939586+02",
"user_name" : "Rainer Gümpelein",
"service_type" : "1",
"time_over" : "0",
"owner" : "6103",
"service_id" : "41381",
"interval" : "10",
"work_name" : "Gepaecktraeger"
},
"int12" : {
"work_name" : "Schutzblech",
"time_over" : "0",
"service_type" : "1",
"owner" : "0",
"service_id" : "0",
"interval" : "30",
"mtime" : "",
"user_name" : "",
"work_val" : "1",
"work_id" : "int12"
}
}
}
}
```