mirror of
https://gitlab.com/t6353/sharee.bike.wiki.git
synced 2024-11-16 07:16:33 +01:00
9.6 KiB
9.6 KiB
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 |
service_id | o | text | update task (Aufgabe) by service_id, else last open entry will be used |
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 |
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 (Aufgabe)
https://shareeapp-operator.example.tld/APIjsonserver?request=service_done&bike=FR1541&work_id=txt01&work_val=::new_task::&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_34567890
REST request update task (Aufgabe) 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
{
"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" : [
"FR300001",
"FR300029"
],
"user_tour" : [
"FR1",
"FR2"
],
"uri_operator" : "https://shareeapp-operator.example.tld",
"service_template" : "401",
"response_state" : "OK, service_update",
"clearing_cache" : "0",
"uri_primary" : "https://shareeapp-primary.example.tld",
"FR1541" : {
"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",
"work_val" : "Speiche locker\n",
"time_over" : "0",
"service_id" : "41514",
"user_name" : "copri admin",
"work_id" : "txt01",
"mtime" : "2022-11-29 10:40:46.186788+01",
"service_type" : "0",
"owner" : "18520"
},
"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" : ""
}
}
}
}