sharee.bike-Wiki/5.2.-tool-request=bikes_all.md
2022-01-29 12:01:25 +00:00

78 lines
3.1 KiB
Markdown

### request=bikes_all
**request** GET all rental bikes with the optional limitations of station and/or bike number
| key | Required | Format | Comment |
| ---------- | -------- | -------- | ------------------------------------- |
| authcookie | + | text | unique encrypted key |
| station | o | text | station prefix+number |
| bike | o | text | bike prefix+number |
**response** "bikes" by JSON-Objects
| key | Required | Format | Comment |
| -------------- | -------- | -------- | -------------------------------------- |
| state | + | text | bike available state |
| lock_state | + | text | smartlock locking state |
| station_state | o | text | station smartlock locking state |
| service_state | o | text | service state for maintanance |
| bike_charge | o | text | bike akku capacity |
| description | o | text | short bike description |
| bike | + | text | bike prefix_number |
| gps | + | array | GPS: latitude, longitude |
| station | + | text | station prefix_number |
| bike_group | + | array | bike group, describes bike dependent fleets |
| todo_info | o | text | key if Aufgaben defined |
| system | + | text | bike lock system (BC or Ilockit) |
| uri_operator | + | text | URI of Operator-Server |
| lockit_ID | + | text | bluetooth ID |
| lockit_GUID | + | text | bluetooth GUID |
| service_code | o | array | color keys, only available for servicetool users |
Example
**request** to get all bikes with states
```
https://shareeapp-primary.copri-bike.de/APIjsonserver?request=bikes_all&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_23456789
```
**response** sharee JSON defaults + **response** multiple bike objects
```
{
"shareejson" : {
***sharee JSON defaults***
},
"bikes" : {
"WUE5526" : {
"state" : "available",
"service_code" : [
"blue",
"red",
"green",
"green",
"red",
"red"
],
"gps" : {
"longitude" : "7.8167567567",
"latitude" : "47.98797891085045"
},
"service_state" : "0",
"lock_state" : "locked",
"description" : "Lasten-Dreirad Bert",
"bike" : "WUE5526",
"todo_info" : "0",
"bike_group" : [
"WUE300029"
],
"station" : "WUE303",
"Ilockit_GUID" : "",
"uri_operator" : "https://shareeapp-wue.copri-bike.de",
"system" : "Ilockit",
"Ilockit_ID" : "00000000-0000-0000-0000-fc3c045a2ade"
},
"WUE5525" {
...
}
}
}
```