Vehicle Rental Service Directory API support
This adds support for the GBFS service directory endpoint component Lamassu. OTP uses the service directory to lookup and connects to all GBFS endpoints registered in the directory. This simplifies the management of the GBFS endpoints, since multiple services/components like OTP can connect to the directory and get the necessary configuration from it.
Contact Info
- Entur, Norway
Changelog
- Initial implementation of bike share updater API support
- Make json tag names configurable #3447
- Enable GBFS geofencing with VehicleRentalServiceDirectory #5324
- Enable
allowKeepingVehicleAtDestination#5944 - Rewrite to use manifest.json from GBFS v3 as the service directory #6900
Configuration
To enable this you need to specify a url for the vehicleRentalServiceDirectory in
the router-config.json
Parameter Summary
| Config Parameter | Type | Summary | Req./Opt. | Default Value | Since |
|---|---|---|---|---|---|
| language | string |
Language code for GBFS feeds. | Optional | 2.1 | |
| url | uri |
URL or file path to the GBFS v3 manifest.json | Required | 2.1 | |
| headers | map of string |
HTTP headers to add to the request. Any header key, value can be inserted. | Optional | 2.1 | |
| networks | object[] |
List all networks to include. Use "network": "default-network" to set defaults. | Optional | 2.4 | |
| allowKeepingVehicleAtDestination | boolean |
Enables allowKeepingVehicleAtDestination for the given network. |
Optional | false |
2.5 |
| geofencingZones | boolean |
Enables geofencingZones for the given network | Optional | false |
2.4 |
| network | string |
The network name | Required | 2.4 |
Parameter Details
url
Since version: 2.1 ∙ Type: uri ∙ Cardinality: Required
Path: /vehicleRentalServiceDirectory
URL or file path to the GBFS v3 manifest.json
Can be either a remote URL (http/https) or a local file path (file://). The manifest must conform to the GBFS v3.0 specification.
headers
Since version: 2.1 ∙ Type: map of string ∙ Cardinality: Optional
Path: /vehicleRentalServiceDirectory
HTTP headers to add to the request. Any header key, value can be inserted.
networks
Since version: 2.4 ∙ Type: object[] ∙ Cardinality: Optional
Path: /vehicleRentalServiceDirectory
List all networks to include. Use "network": "default-network" to set defaults.
If no default network exists only the listed networks are used. Configure a network with name "default-network" to include all unlisted networks. If not present, all unlisted networks are dropped. Note! The values in the "default-network" are not used to set missing field values in networks listed.
allowKeepingVehicleAtDestination
Since version: 2.5 ∙ Type: boolean ∙ Cardinality: Optional ∙ Default value: false
Path: /vehicleRentalServiceDirectory/networks/[0]
Enables allowKeepingVehicleAtDestination for the given network.
Configures if a vehicle rented from a station must be returned to another one or can be kept at the end of the trip.
See the regular GBFS documentation for more information.
geofencingZones
Since version: 2.4 ∙ Type: boolean ∙ Cardinality: Optional ∙ Default value: false
Path: /vehicleRentalServiceDirectory/networks/[0]
Enables geofencingZones for the given network
See the regular GBFS documentation for more information.